Foxtable(狐表)用户栏目专家坐堂 → 控制生产累计数不允许大于计划生产数


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

主题:控制生产累计数不允许大于计划生产数

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


加好友 发短信
等级:超级版主 帖子:106481 积分:541558 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2016/11/21 22:06:00 [只看该作者]

生产计划表,DataColChanging事件

Select Case e.DataCol.name
    Case "订单号"
        Dim dr As DataRow = e.DataRow
        If e.NewValue > "" AndAlso dr.IsNull("型号") = False Then
            If e.DataTable.Find("订单号 = '" & e.NewValue & "' And 型号 = '" & dr("型号") & "'") IsNot Nothing Then
                MessageBox.Show("已经存在相同产品名称和订单号的行!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
                e.Cancel = True
            End If
        End If
    Case "型号"
        Dim dr As DataRow = e.DataRow
        If dr.IsNull("订单号") = False AndAlso e.NewValue > "" Then
            If e.DataTable.Find("订单号 = '" & dr("订单号") & "' And 型号 = '" & e.NewValue & "'") IsNot Nothing  Then
                MessageBox.Show("已经存在相同产品名称和订单号的行!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
                e.Cancel = True
            End If
        End If
End Select

 回到顶部
总数 137 1 2 3 4 5 6 7 8 9 10 下一页 ..14