VB+SQL Server2000中小型医院药品管理系统 第11页

VB+SQL Server2000中小型医院药品管理系统 第11页

End If

    If Trim(Text2.Text) <> Trim(Text3.Text) Then

       MsgBox "两次密码不一致", vbOKOnly + vbExclamation, ""

       Text2.SetFocus

       Text2.Text = ""

       Text3.Text = ""

       Exit Sub

    ElseIf Trim(Combo1.Text) <> "system" And Trim(Combo1.Text) <> "guest" Then

       MsgBox "请选择正确的用户权限", vbOKOnly + vbExclamation, ""

       Combo1.SetFocus

       Combo1.Text = ""

       Exit Sub

    Else

       rs_add.AddNew

       rs_add.Fields(0) = Text1.Text

       rs_add.Fields(1) = Text2.Text

       rs_add.Fields(2) = Combo1.Text

       rs_add.Update

       rs_add.Close

       MsgBox "添加用户成功", vbOKOnly + vbExclamation, ""

       Unload Me

    End If

End If

End Sub

Private Sub Command2_Click()

Unload Me

Main.Show

End Sub

Private Sub Form_Load()

Combo1.AddItem "system"

Combo1.AddItem "guest"

End Sub

Private Sub Label1_Click()

Unload Me

Main.Show

End Sub

Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)

If Button = 1 Then

    Dim ReturnVal As Long

    Xs = ReleaseCapture()

    ReturnVal = SendMessage(hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0)

  End If

End Sub

6.5药品查询表界面

6.5药品查询表界面图

Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)

If Button = 1 Then

    Dim ReturnVal As Long

    Xs = ReleaseCapture()

    ReturnVal = SendMessage(hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0)

  End If

End Sub

 

Private Sub Text1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

If Combo1.Text = "按名称" Then

   Adodc1.CommandType = adCmdText

   Adodc1.RecordSource = "Select * from medicdate where medicname like '%" & Text1.Text & "%'"

   Adodc1.Refresh

   Set DataGrid1.DataSource = Adodc1

ElseIf Combo1.Text = "按类型" Then

   Adodc1.CommandType = adCmdText

   Adodc1.RecordSource = "Select * from medicdate where leixing like '%" & Text1.Text & "%'"

   Adodc1.Refresh

   Set DataGrid1.DataSource = Adodc1

ElseIf Combo1.Text = "按商品名" Then

   Adodc1.CommandType = adCmdText

   Adodc1.RecordSource = "Select * from medicdate where shangpinming like '%" & Text1.Text & "%'"

   Adodc1.Refresh

   Set DataGrid1.DataSource = Adodc1

ElseIf Combo1.Text = "按拼音简码" Then

   Adodc1.CommandType = adCmdText

   Adodc1.RecordSource = "Select * from medicdate where pingyinjianma like '%" & Text1.Text & "%'"

   Adodc1.Refresh

   Set DataGrid1.DataSource = Adodc1

End If

End If

End Sub

 << 上一页  [11] [12] [13] [14] 下一页

Copyright © 2007-2012 www.chuibin.com 六维论文网 版权所有