Foxtable(狐表)用户栏目专家坐堂 → 求助,谢谢


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

主题:求助,谢谢

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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/11/21 22:41:00 [显示全部帖子]

dr = DataTables("患者").Find("[患者姓名] = '" & hzxm & "' ")

 

改成

 

dr = DataTables("患者").Find("[患者姓名] = '" & hzxm & "' ")

If dr is Nothing then dr = DataTables("患者信息").AddNew()


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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/11/22 21:34:00 [显示全部帖子]

Dim hzxm As String = e.Form.Controls("TextBox1").Value
Dim zyh As String = e.Form.Controls("TextBox2").Value
Dim ssfy As String = e.Form.Controls("TextBox3").Value
Dim gcys As String = e.Form.Controls("ComboBox1").Value
Dim yblx As String = e.Form.Controls("ComboBox2").Value
Dim sslx As String = e.Form.Controls("ComboBox3").Value
Dim qdys As String = e.Form.Controls("ComboBox4").Value
Dim zdys As String = e.Form.Controls("ComboBox5").Value
Dim dyzs As String = e.Form.Controls("ComboBox6").Value
Dim hsdr As String = e.Form.Controls("ComboBox7").Value
Dim hssr As String = e.Form.Controls("CheckedComboBox1").Value

Dim jsr As String = user.name
jsr = jsr.Trim("登","录","账","号","[","]",":"," ")
Dim pbx As WinForm.PictureBox
Dim ssrq As WinForm.DateTimePicker
ssrq = e.Form.Controls("DateTimePicker1")
Dim dr As DataRow
Dim rdo1 As WinForm.RadioButton
Dim rdo2 As WinForm.RadioButton
rdo1 = e.Form.Controls("RadioButton1")
rdo2 = e.Form.Controls("RadioButton2")

If hzxm = "" Then
    MessageBox.Show("姓名不能为空!","提示")
ElseIf zyh = "" Then
    MessageBox.Show("住院号不能为空!","提示")
ElseIf sslx = "" Then
    MessageBox.Show("手术类型不能为空!","提示")
Else
    dr = DataTables("患者").Find("[患者姓名] = '" & hzxm & "' ")
   
    If dr Is Nothing Then dr = DataTables("患者信息").AddNew()
    dr("住院号") = zyh
    dr("手术日期") = ssrq
    dr("管床医师") = gcys
    dr("医保类型") = yblx
    dr("手术类型") = sslx
    dr("全刀医师") = qdys
    dr("主刀医师") = zdys
    dr("第一助手") = dyzs
    dr("护士单人") = hsdr
    dr("护士双人") = hssr
    dr("手术费用") = ssrq
    If rdo1.Checked = True Then
        dr("是否急诊") = True
    Else
        dr("是否急诊") = False
    End If
   
    DataTables("患者信息").LoadFilter=" [患者姓名] = '" & hzxm & "'"
    DataTables("患者信息").Load
    DataTables.Save()
    e.Form.Controls("TextBox1").Value = ""
    e.Form.Controls("TextBox2").Value = ""
    e.Form.Controls("TextBox3").Value = ""
    e.Form.Controls("ComboBox1").Value = ""
    e.Form.Controls("ComboBox2").Value = ""
    e.Form.Controls("ComboBox3").Value = ""
    e.Form.Controls("ComboBox4").Value = ""
    e.Form.Controls("ComboBox5").Value = ""
    e.Form.Controls("ComboBox6").Value = ""
    e.Form.Controls("ComboBox7").Value = ""
    e.Form.Controls("CheckedComboBox1").Value = ""
    e.Form.Controls("DateTimePicker1").Value = ""
    MessageBox.Show("提交成功!","提示")
End If


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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/11/22 22:53:00 [显示全部帖子]

1、你有两个按钮啊,一个【新增数据】,一个【确认修改】,请去修改对应的按钮的代码。

 

2、加入msgbox定位出错位置 http://www.foxtable.com/webhelp/scr/1485.htm

 

 

 


 回到顶部