Foxtable(狐表)用户栏目专家坐堂 → 求助窗口录入


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

主题:求助窗口录入

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


加好友 发短信
等级:童狐 帖子:211 积分:1948 威望:0 精华:0 注册:2017/3/6 20:47:00
求助窗口录入  发帖心情 Post By:2019/2/24 14:41:00 [只看该作者]


图片点击可在新窗口打开查看此主题相关图片如下:2-24.png
图片点击可在新窗口打开查看

登记按钮代码:
Dim nm1 As String = e.Form.Controls("nm1").value
Dim nm As String = e.Form.Controls("nm").value
Dim tb As Table=Tables("数据更改统计表")
Dim dr As DataRow=DataTables("设计进度跟踪表").find("模号='" & nm & "'")
Dim Result As DialogResult
Dim tm As Date= e.Form.Controls("DateTimePicker1")=Date.Today
Dim bt1 As WinForm.Button = e.Form.Controls("Button1")
Dim starck As WinForm.RadioButton = e.Form.Controls("starck")


'''''''''''''''''''''''
'If starck.Checked Then
    
    If dr IsNot Nothing Then
        Select Case task
            Case "设计"
                If dr("设计_设计人员") <>""  Then
                    result=MessageBox.Show(nm & "模具已经分配设计,是否重新分配","提示",MessageBoxButtons.OKCancel)
                    If result=DialogResult.OK Then
                        dr("设计_设计人员")=nm1
                        dr("设计_开始时间")=tm
                    End If
                Else
                    dr("设计_设计人员")=nm1
                    dr("设计_开始时间")=tm
                End If
        End Select
    End If
单击按钮后应该在设计区域增加设计人员 开始时间的记录,但现在没有反应,不知哪里出错了,请老师帮忙查下,谢谢
[此贴子已经被作者于2019/2/24 14:42:44编辑过]

 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2019/2/24 21:07:00 [只看该作者]

参考

 

If dr IsNot Nothing Then
    msgbox(task)
    If task.startswith("设计_") Then
        If dr("设计_设计人员") <>""  Then
            result=MessageBox.Show(nm & "模具已经分配设计,是否重新分配","提示",MessageBoxButtons.OKCancel)
            If result=DialogResult.OK Then
                dr("设计_设计人员")=nm1
                dr("设计_开始时间")=tm
            End If
        Else
            dr("设计_设计人员")=nm1
            dr("设计_开始时间")=tm
        End If
    End If
End If

 回到顶部
帅哥哟,离线,有人找我吗?
ts9277
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:童狐 帖子:211 积分:1948 威望:0 精华:0 注册:2017/3/6 20:47:00
  发帖心情 Post By:2019/2/25 10:02:00 [只看该作者]

奇怪了,msgbox(task)  怎么会没有反应呢, 我把前面的If 语句 取消,也不会跳出对话框

 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2019/2/25 10:15:00 [只看该作者]

测试,如

 

Dim nm1 As String = e.Form.Controls("nm1").value
Dim nm As String = e.Form.Controls("nm").value
Dim tb As Table=Tables("数据更改统计表")
Dim dr As DataRow=DataTables("设计进度跟踪表").find("模号='" & nm & "'")
msgbox(nm)
msgbox(dr is nothing)

 回到顶部