Foxtable(狐表)用户栏目专家坐堂 → 请大师看看这段代码


  共有3043人关注过本帖平板打印复制链接

主题:请大师看看这段代码

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


加好友 发短信
等级:狐精 帖子:3358 积分:24758 威望:0 精华:0 注册:2012/3/26 21:47:00
请大师看看这段代码  发帖心情 Post By:2014/5/13 15:32:00 [只看该作者]

 Case "审核"
        If e.NewValue IsNot Nothing Then
            If e.DataRow.GetChildRows("采购合同明细").count>0 Then
                For Each drr As DataRow In e.DataRow.getchildrows("采购合同明细")
                    drr("审核")=e.DataRow("审核")
                    drr.save
                Next
            End If
            If e.NewValue=True Then
                MessageBox.show("审核成功!")
                e.DataRow("审核人")=_username
                e.DataRow("审核日期")=Functions.Execute("stime","A5 ERP")
               
                If MessageBox.Show("是否发送信息通知相关操作员?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question)=DialogResult.Yes Then
                    djlx="采购合同"
                    bhlx="采购合同号"
                    djbh=e.DataRow("采购合同号")
                    msg="编号为:【" & e.DataRow("采购合同号") & "】的【" & e.DataTable.Name & "】通过审核,请尽快处理!"
                    Forms("信息").show
                   
                End If
            Else
                If e.DataRow.RowState<>DataRowState.Detached Then
                    MessageBox.show("反审核成功!")
                    e.DataRow("审核人")=Nothing
                    e.DataRow("审核日期")=Nothing
                End If
            End If
            e.DataRow.save
        End If

 

这个代码目前有个问题 经常出现父行的审核=true了 子行却还是false 但大部分时候都是运作正常  非常郁闷

 

 


 回到顶部