毕业论文论文范文课程设计实践报告法律论文英语论文教学论文医学论文农学论文艺术论文行政论文管理论文计算机安全
您现在的位置: 毕业论文 >> 管理论文 >> 正文

医院药品管理系统分析与设计 第11页

更新时间:2014-6-28:  来源:毕业论文

医院药品管理系统分析与设计 第11页
   Private Sub cmdEnter_Click()                        ‘还原数据库
       On Error Resume Next
       ' 设置“CancelError”为 True
       CommonDialog1.CancelError = True
       On Error GoTo ErrHandler
       ' 设置标志
       CommonDialog1.Flags = cdlOFNHideReadOnly
       Me.CommonDialog1.DialogTitle = "请输入目标文件"
       Me.CommonDialog1.ShowOpen
       Data1.DatabaseName = Me.CommonDialog1.FileName
       Data1.Refresh
       Option3.Value = True
   ErrHandler:
       ' 用户按了“取消”按钮
       Data1.DatabaseName = App.Path & "\date\date.mdb"
   End Sub
   
   Private Sub cmdF_Click()
       On Error Resume Next
       If Option3.Value = True Then
          If Combo5.Text = "" Then
             MsgBox ("请输入要查询的条件")
             Combo5.SetFocus
          ElseIf Text1.Text = "" Then
             MsgBox ("请输入要查询的条件")
             Text1.SetFocus
          Else
             Data1.Recordset.FindFirst Combo5.Text & "='" & Text1.Text & "'" 
             If Data1.Recordset.NoMatch Then             ‘查找记录
                MsgBox ("没有这种药品")
             End If
          End If
       ElseIf Option4.Value = True Then
          If Combo6.Text = "" Then
             MsgBox ("请输入要查询的条件")
             Combo6.SetFocus
          ElseIf Text1.Text = "" Then
             MsgBox ("请输入要查询的条件")
             Text1.SetFocus
          Else
             Data1.Recordset.FindFirst Combo6.Text & "='" & Text1.Text & "'"
             If Data1.Recordset.NoMatch Then
                MsgBox ("没有此供货商")
             End If
          End If
       End If
   End Sub
   
   Private Sub cmdF_LostFocus()
       Text1.Text = ""
   End Sub
   
   Private Sub cmdFind_Click()
       Frame1.Visible = True
       Image1.Visible = False
       If Option3.Value = True Then
           Option1.Value = True
       ElseIf Option4.Value = True Then
           Option2.Value = True
       End If
   End Sub
   
   Private Sub cmdOut_Click()
        On Error Resume Next
        If cmdOut.Caption = "出仓(&O)" Then
           txtFields(9).SetFocus
           txtFields(9).SelStart = 0
           txtFields(9).SelLength = Len(txtFields(9).Text)
           cmdOut.Caption = "确定(&O)"
           cmdAdd.Enabled = False
           cmdDelete.Enabled = False
           cmdFind.Enabled = False
           cmdRefresh.Enabled = False
           cmdBackup.Enabled = False
           cmdEnter.Enabled = False
           cmdReport.Enabled = False
           cmdUpdate.Enabled = False
        ElseIf cmdOut.Caption = "确定(&O)" Then
           If IsNum(txtFields(9).Text) = False Then
               MsgBox "“已售数量”请输入数字"
               txtFields(9).Text = ""
               txtFields(9).SetFocus
           ElseIf Val(txtFields(9).Text) > Val(txtFields(10).Text) Then
               MsgBox ("销售数量不能大于库存数量,请重新输入")
               txtFields(9).SetFocus
               txtFields(9).Text = ""
           Else
               txtFields(10).Text = txtFields(10).Text - txtFields(9).Text
               txtFields(9).Text = txtFields(8).Text - txtFields(10).Text
               Data1.UpdateRecord
               cmdOut.Caption = "出仓(&O)"
               cmdUpdate.Enabled = True
               cmdAdd.Enabled = True
               cmdDelete.Enabled = True
               cmdFind.Enabled = True
               cmdRefresh.Enabled = True
               cmdBackup.Enabled = True
               cmdEnter.Enabled = True
               cmdReport.Enabled = True
           End If
        End If
   End Sub
   
   Private Sub cmdRefresh_Click()
        On Error Resume Next
        Data1.Refresh
        If Data1.Recordset.EOF And Data1.Recordset.BOF Then
          cmdDelete.Enabled = False
          cmdFind.Enabled = False
          Image1.Visible = True
          Frame1.Visible = False
        End If
   End Sub
   
   Private Sub cmdReport_Click()
        On Error Resume Next
        If Option3.Value = True And Option5.Value = True Then
           DataReport3.Show
        ElseIf Option3.Value = True Then
           DataReport1.Show
        ElseIf Option4.Value = True Then
           DataReport2.Show
        End If
   End Sub

 << 上一页  [11] [12] [13] [14] [15] [16] [17] 下一页

医院药品管理系统分析与设计 第11页下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©youerw.com 优文论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。