'mnExit
'
Me.mnExit.Index = 3
Me.mnExit.Text = "退出系统(&Z)"
'
'frmMain
'
Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
Me.ClientSize = New System.Drawing.Size(472, 277)
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
Me.IsMdiContainer = True
Me.Menu = Me.MainMenu1
Me.Name = "frmMain"
Me.Text = "HIS医院管理系统"
End Sub
#End Region
Private Function GetInstanceState(ByVal name As String) As Boolean
'获得frmMain窗体的子窗体的数量
Dim i As Integer = Me.MdiChildren.Length
'循环判断是否有名为name的子窗体实例
For i = 0 To Me.MdiChildren.Length - 1
If Me.MdiChildren(i).Name = name Then
'存在名为name的子窗体,是子窗体获得焦点并返回True
Me.MdiChildren(i).Focus()
Return True
End If
Next
'不存在名为Name的子窗体False
Return False
End Function
Private Sub mnMedicine_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnMedicine.Click
If GetInstanceState("frmMedicine") Then
Exit Sub
End If
Dim childFrm As frmMedicine = New frmMedicine
childFrm.MdiParent = Me
childFrm.Show()
End Sub
s = dr("金额")
dTotal = dTotal + CType(s.Trim, Double)
Next
Me.txbMoney.Text = dTotal.ToString
End Sub
Private Sub txbNumber_TextChanged(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles txbNumber.TextChanged
CalMXMoney()
End Sub
Private Sub btnAdd_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles btnAdd.Click
If txbName.Text.Trim.Length = 0 Or _
txbMXId.Text.Trim.Length = 0 Then
Return
End If
CalMXMoney()
Dim dr As DataRow = Me.dtDetail.NewRow
dr("编号") = Me.txbMXId.Text.Trim
dr("名称") = Me.txbMName.Text.Trim()
dr("规格") = Me.txbGuiGe.Text.Trim
dr("单位") = Me.txbUnit.Text.Trim
dr("单价") = Me.txbPrice.Text.Trim
dr("数量") = Me.txbNumber.Text.Trim
dr("金额") = Me.txbMMoney.Text.Trim
dr("拼音码") = Me.txbPY.Text.Trim
dtDetail.Rows.Add(dr)
ClearMX()
CalTotalMoney()
End Sub
Private Sub txbNumber_KeyPress(ByVal sender As Object, _
ByVal e As System.Windows.Forms.KeyPressEventArgs) _
Handles txbNumber.KeyPress
'判断输入的字符是否为数字
If e.KeyChar.IsDigit(e.KeyChar) = False Then
'不是数字的字符不处理
e.Handled = True
Me.txbNumber.Text = "1"
End If
End Sub
Private Sub btnOpen_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles btnOpen.Click
Dim dlg As frmSelectHuaJia = New frmSelectHuaJia
dlg.ShowDialog()
Dim strId As String = dlg.GetInfo().Trim
Dim db As DataBase = New DataBase
Dim strSQL As String = "select * from 门诊挂号 where 编号='"
strSQL += strId + "' and 是否已划价='否'"
Dim dv As DataView = db.RunSelectSQL(strSQL)
Me.txbId.Text = strId
Me.txbName.Text = dv(0)("姓名")
Me.txbSex.Text = dv(0)("性别")
Me.cbbDoctor.Text = dv(0)("医生")
Me.cbbRoom.Text = dv(0)("挂号科室")
db.Dispose()
End Sub
Private Sub frmHuaJia_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Me.cbbRoom.ValueMember = "编号"
dv = db.RunSelectSQL("select 编号,姓名 from 医生资料")
Me.cbbDoctor.DataSource = dv
Me.cbbDoctor.DisplayMember = "姓名"
Me.cbbDoctor.ValueMember = "编号"
db.Dispose()
上一页 [1] [2] [3] [4] [5] [6] [7] 下一页