Foxtable(狐表)用户栏目专家坐堂 → 代码问题


  共有2103人关注过本帖树形打印复制链接

主题:代码问题

美女呀,离线,留言给我吧!
susu312
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:四尾狐 帖子:997 积分:6752 威望:0 精华:0 注册:2018/6/8 16:17:00
代码问题  发帖心情 Post By:2018/8/9 20:02:00 [显示全部帖子]

Dim nums1() As String={"cardID","name","sex","age","birth","tel","jiguan","rational", _
                     "edu","health","workdate","politicalStatus", _
                     "hobbies","retiredPost","title","address","leaOrRetire", _
                    "retireTime","proTecPost","proSpecialty","partyBranch","partyTime", _
                     "presonalClass","organName","partyStanding","retiredDep", _
                     "guanZhu"}
Dim nums2()  As String={"身份证号", "姓名","性别","年龄","出生年月","联系方式","籍贯","民族", _
                     "学历","健康状况","参加工作日期","政治面貌", _
                     "兴趣爱好","离退休职务","享受待遇","地址","状态", _
                    "离退休时间","专业技术职务","专业特长","所在党支部","入党时间", _
                     "个人成分","单位","党龄","部门", _
                     "纪委关注"}

Dim List As WinForm.ListBox = e.Form.Controls("ListBox2")
'MessageBox.Show(List.Items.Count)

Dim nms As New List(of String)
For i As Integer = 0 To List.Items.count - 1 '获取已经勾选的列
    int index As Integer=nums2.Indexof(nums2,List.Items(i))
    nms.Add(nums1(index))
    MessageBox.Show(nums1(index))
Next

 

 

 

老师,麻烦您帮我看看这个代码有啥问题?


 回到顶部