Foxtable(狐表)用户栏目专家坐堂 → 代码不执行,高手请进


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

主题:代码不执行,高手请进

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


加好友 发短信
等级:管理员 帖子:47497 积分:251403 威望:0 精华:91 注册:2008/6/17 17:14:00
  发帖心情 Post By:2011/8/1 10:24:00 [显示全部帖子]

If e.form.Controls("ComboBox1").Value Is Nothing Or e.form.Controls("ComboBox4").Value Is Nothing Then
    MsgBox("请选择患者住院号和追加类别!",64,"提示")
    Return
End If
With Tables("长期医嘱")
    .Position = .Rows.Count - 1
End With
If Tables("长期医嘱").Rows.count >0 Then
    Dim cm4 As WinForm.ComboBox = e.Form.Controls("ComboBox4")
    Dim f As New Filler
    f.SourceTable = DataTables("追加项目")
    f.SourceCols = "拼音码,项目名称"
    f.DataTable = DataTables("长期医嘱")
    f.DataCols = "拼音码,项目名称"
    f.Filter = "分组名称 ='" & cm4.Value & "'"
    f.Fill()
    Dim Nu ,X ,Rq,Ys As String
    Nu =CurrentTable.Current("编号")
    X = e.Form.Controls("ComboBox1").value
    Rq= e.Form.Controls("DateTimePicker1").value
    Ys=e.Form.Controls("ComboBox5").value
    Dim drs As List(Of DataRow)
    drs = DataTables("长期医嘱").Select("[编号] >'" & Nu &"'")
    For Each dr As DataRow In drs
        dr("住院号") = X
        dr("开嘱日期") = Rq
        dr("医生") = Ys
    Next
    With Tables("长期医嘱")
        .Position = .Rows.Count - 1
    End With
Else
    Dim cm4 As WinForm.ComboBox = e.Form.Controls("ComboBox4")
    Dim f As New Filler
    f.SourceTable = DataTables("追加项目")
    f.SourceCols = "拼音码,项目名称"
    f.DataTable = DataTables("长期医嘱")
    f.DataCols = "拼音码,项目名称"
    f.Filter = "分组名称 ='" & cm4.Value & "'"
    f.Fill()
    Dim Nu ,X ,Rq,Ys As String
    Nu =CurrentTable.Current("编号")
    X = e.Form.Controls("ComboBox1").value
    Rq= e.Form.Controls("DateTimePicker1").value
    Ys=e.Form.Controls("ComboBox5").value
    Dim drs As List(Of DataRow)
    drs = DataTables("长期医嘱").Select("[编号] ='" & Nu &"'")
    For Each dr As DataRow In drs
        dr("住院号") = X
        dr("开嘱日期") = Rq
        dr("医生") = Ys
    Next
    With Tables("长期医嘱")
        .Position = .Rows.Count - 1
    End With
End If

 回到顶部