If e.form.Controls("ComboBox1").Value Is Nothing Then MsgBox("请选择患者住院号!",64,"提示") Return End If Dim r As Row = CurrentTable.AddNew If e.Form.Controls("DateTimePicker1").Value Is Nothing And e.Form.Controls("ComboBox5").Value IsNot Nothing Then r("住院号") =e.Form.Controls("ComboBox1").value.split(":")(2) r("开嘱日期") =Date.Today r("医生") =e.Form.Controls("ComboBox5").value.split(":")(1) End If If e.Form.Controls("DateTimePicker1").Value Is Nothing And e.Form.Controls("ComboBox5").Value Is Nothing Then r("住院号") =e.Form.Controls("ComboBox1").value.split(":")(2) r("开嘱日期") =Date.Today End If If e.Form.Controls("DateTimePicker1").Value IsNot Nothing And e.Form.Controls("ComboBox5").Value Is Nothing Then r("住院号") =e.Form.Controls("ComboBox1").value.split(":")(2) r("开嘱日期") =e.Form.Controls("DateTimePicker1").value End If If e.Form.Controls("DateTimePicker1").Value IsNot Nothing And e.Form.Controls("ComboBox5").Value IsNot Nothing Then r("住院号") =e.Form.Controls("ComboBox1").value.split(":")(2) r("开嘱日期") =e.Form.Controls("DateTimePicker1").value r("医生") =e.Form.Controls("ComboBox5").value.split(":")(1) End If
|