Foxtable(狐表)用户栏目专家坐堂 → 我想把复制的内容调动添加的内容新增在“在编人员调动记录”一行,怎么改代码?


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

主题:我想把复制的内容调动添加的内容新增在“在编人员调动记录”一行,怎么改代码?

帅哥哟,离线,有人找我吗?
有点色
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:13837 积分:69650 威望:0 精华:0 注册:2016/11/1 14:42:00
  发帖心情 Post By:2019/4/16 12:37:00 [显示全部帖子]

你datacolchanged事件的代码,删除。确定按钮的代码改成,如

 

Dim ydw As WinForm.TextBox = e.Form.Controls("原工作单位")
Dim yrj As WinForm.TextBox = e.Form.Controls("原任教学科")
Dim xdw As WinForm.ComboBox = e.Form.Controls("新调单位")
Dim xrj As WinForm.ComboBox = e.Form.Controls("任教学科")
Dim ddsj As WinForm.DateTimePicker = e.Form.Controls("调动时间")
Dim ddlx As WinForm.ComboBox = e.Form.Controls("调动类型")
Dim ddyy As WinForm.TextBox = e.Form.Controls("调动原因")
Dim pzdw As WinForm.TextBox = e.Form.Controls("批准单位")
Dim ddbz As WinForm.TextBox = e.Form.Controls("备注")
If xdw.Value = ydw.Value Then   '若新工作单位与原工作单位的值均相同
    MessageBox.Show("兄弟,工作单位未发生变化,不需要调动!")
ElseIf xdw.Value = "" AndAlso xrj.Value = "" Then   '若新工作单位/新任教均为输入内容
    MessageBox.Show("兄弟,未输入新调单位和任教学科!")
Else
    Dim r0 As Row = Tables("在编人员信息").Current
    Dim r As Row = Tables("在编人员调动记录").AddNew
    r("序号") = r0("_identify")
    r("原工作单位") = r0("单位简称")
    r("任教学科") = r0("现任教学科")
    r("新调单位") = xdw.Value
    r("任教学科") = xrj.Value
    r("调动类型") = ddlx.Value
    r("调动时间") = ddsj.Value
    r("调动原因") = ddyy.Value
    r("批准单位") = pzdw.Value
    r("备注") = ddbz.Value
    r0("单位简称") = xdw.Value
    r0("现任教学科") = xrj.Value
   
   
    Dim nma() As String = {"姓名","身份证号码","性别","年龄","籍贯","政治面貌","婚姻状况","现任职务","现任教学段","现任教学科","所在村小","全日制学历_学历","全日制学历_所学专业","全日制学历_毕业院校","最高学历_学历","最高学历_所学专业","最高学历_毕业院校","是否师范类","参加工作时间","连续工龄计算时间","岗位等级","薪级","进入本单位时间","进入本单位形式","联系电话","备注"} 'A表数据来源列
    Dim nmb() As String = {"姓名","身份证号码","性别","年龄","籍贯","政治面貌","婚姻状况","原任职务","曾任教学段","曾任教学科","所在村小","全日制学历_学历","全日制学历_所学专业","全日制学历_毕业院校","最高学历_学历","最高学历_所学专业","最高学历_毕业院校","是否师范类","参加工作时间","连续工龄计算时间","岗位等级","薪级","进入原单位时间","进入原单位形式","联系电话","备注"}  'B表数据接收列
    For i As Integer = 0 To nma.Length - 1
        r(nmb(i)) = r0(nma(i))
    Next
   
   
    e.Form.Close
End If


 回到顶部