Foxtable(狐表)用户栏目专家坐堂 → 请高手指教


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

主题:请高手指教

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


加好友 发短信
等级:三尾狐 帖子:788 积分:6297 威望:0 精华:0 注册:2012/6/11 17:21:00
请高手指教  发帖心情 Post By:2013/5/6 20:20:00 [显示全部帖子]

If e.DataCol.Name="学期" OrElse e.DataCol.Name="教工编号" Then
    If e.DataRow.IsNull("学期")=False AndAlso e.DataRow.IsNull("教工编号")=False Then
        Dim jgxx As DataRow = DataTables("教工基本信息").Find("教工编号='" & e.DataRow("教工编号") & "'")
        Dim bzgz As DataRow = DataTables("标准工资").Find("学期='" & e.DataRow("学期") & "'")
        If jgxx IsNot Nothing AndAlso bzgz IsNot Nothing Then
            e.DataRow("教工姓名")=jgxx("教工姓名")
            e.DataRow("岗位工资")=bzgz("岗位工资")
            e.DataRow("生活津贴")=bzgz("生活津贴")
            e.DataRow("通讯津贴")=bzgz("通讯津贴")
            e.DataRow("交通津贴")=bzgz("交通津贴")
            e.DataRow("公积金津贴")=bzgz("公积金津贴")
            e.DataRow("全勤奖")=bzgz("全勤奖")
            e.DataRow("值日津贴")=bzgz("值日津贴")
            e.DataRow("工龄工资")=jgxx("教龄")*bzgz("工龄基数")
        End If
    End If
End If

Select Case e.DataCol.Name
    Case "学期","教工编号"
        Dim dr As DataRow = e.DataRow
        Dim pr As DataRow
        If dr.IsNull("学期") OrElse dr.IsNull("教工编号") Then
            dr("职务津贴") = Nothing
        Else
            Dim filter As String
            filter = "学期 = '" & dr("学期") & "' And 教工编号 = '" & dr("教工编号") & "'"
            pr = DataTables("班主任津贴").Find(filter)
            If pr IsNot Nothing Then
                dr("职务津贴") = pr("班主任津贴")
            End If
        End If
End Select

Select Case e.DataCol.Name
    Case "学期","教工编号"
        Dim dr As DataRow = e.DataRow
        Dim pr As DataRow
        If dr.IsNull("学期") OrElse dr.IsNull("教工编号") Then
            dr("职务津贴") = Nothing
        Else
            Dim filter As String
            filter = "学期 = '" & dr("学期") & "' And 教工编号 = '" & dr("教工编号") & "'"
            pr = DataTables("干部职务津贴").Find(filter)
            If pr IsNot Nothing Then
                dr("职务津贴") = pr("岗位津贴")
            End If
        End If
End Select

Select Case e.DataCol.Name
    Case "学期","教工编号"
        Dim dr As DataRow = e.DataRow
        Dim pr As DataRow
        If dr.IsNull("学期") OrElse dr.IsNull("教工编号") Then
            dr("绩效工资") = Nothing
        Else
            Dim filter As String
            filter = "学期 = '" & dr("学期") & "' And 教工编号 = '" & dr("教工编号") & "'"
            pr = DataTables("教师绩效工资").Find(filter)
            If pr IsNot Nothing Then
                dr("绩效工资") = pr("绩效工资")
            End If
        End If
End Select

 

请高手指教,帮我优化。


 回到顶部