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

VB医药进销存管理系统(结构图+ER图) 第6页

更新时间:2010-2-26:  来源:毕业论文
VB医药进销存管理系统(结构图+ER图) 第6页
  objRS.Update
    objRS.Close
    CloseDB
    MsgBox "记录已添加!", vbOKOnly
Unload Me
End Sub

Private Sub Fault_Click()
    Unload Me
End Sub

删除药品库存信息的代码如下:

Private Sub Cmd_del_Click()
Dim QueName As String
Dim strSQL As String
    QueName = Trim(del_que.Text)
If QueName = "" Then
    MsgBox "查询内容不能为空", vbOKOnly
    Exit Sub
Else
    OpenDB
    strSQL = "Select * from Drug_info Where Drug_name ='" + QueName + "'"
    objRS.Open strSQL, objConn, adOpenDynamic, adLockPessimistic
    If objRS.EOF Then
        MsgBox "没有所查询的药品", vbOKOnly
        objRS.Close
        CloseDB
        Exit Sub
    Else
         objRS.Close
         strSQL = "Delete from Drug_info Where Drug_name='" + QueName + "'"
         objConn.Execute (strSQL)
         CloseDB
         MsgBox "记录已删除", vbOKOnly
    End If
   
End If
End Sub

Private Sub Cmd_del_que_Click()
Dim QueName As String
Dim strSQL As String
    QueName = Trim(del_que.Text)
If QueName = "" Then
    MsgBox "查询内容不能为空", vbOKOnly
    Exit Sub
Else
    OpenDB
    strSQL = "Select * from Drug_info Where Drug_name ='" + QueName + "'"
    objRS.Open strSQL, objConn, adOpenDynamic, adLockPessimistic
    If objRS.EOF Then
        MsgBox "没有所查询的药品", vbOKOnly
        objRS.Close
        CloseDB       
        Exit Sub
    Else
        Drug_name.Text = objRS.Fields(1).Value
       ' Drug_type.Text = objRS.Fields(2).Value
        Import_price.Text = Str(objRS.Fields(3).Value)
        Export_price.Text = Str(objRS.Fields(4).Value)
       ' Import_time.Text = Str(objRS.Fields(5).Value)
        'Drug_num.Text = Str(objRS.Fields(6).Value)
        Prodcom.Text = objRS.Fields(7).Value
        'Prodplace.Text = objRS.Fields(8).Value       
    End If
    End If
objRS.Close
CloseDB
End Sub
Private Sub Fault_Click()
Unload Me
End Sub
修改药品库存信息的代码如下:
Private Sub Cmd_upd_Click()
Dim QueName As String
Dim strSQL As String
    QueName = Trim(del_que.Text)
If QueName = "" Then
    MsgBox "查询内容不能为空", vbOKOnly
    Exit Sub
Else
    OpenDB
    strSQL = "Select * from Drug_info Where Drug_name ='" + QueName + "'"
    objRS.Open strSQL, objConn, adOpenDynamic, adLockPessimistic
    If objRS.EOF Then
        MsgBox "没有所查询的药品", vbOKOnly
        objRS.Close
        CloseDB
        Exit Sub
    Else
      objRS.Fields(1).Value = Drug_name.Text
      objRS.Fields(2).Value = Drug_type.Text
       objRS.Fields(3).Value = CDbl(Import_price.Text)
        objRS.Fields(4).Value = CDbl(Export_price.Text)
        'Import_time.Text = Str(objRS.Fields(6).Value
        objRS.Fields(5).Value = CDbl(Drug_num.Text)
        objRS.Fields(7).Value = Prodcom.Text
        objRS.Fields(7).Value = Prodplace.Text
        MsgBox "记录已修改", vbOKOnly
        objRS.Update
        objRS.Close
    CloseDB
    End If   
End If
End Sub
Private Sub Cmd_upd_que_Click()
Dim QueName As String
Dim strSQL As String
    QueName = Trim(del_que.Text)
If QueName = "" Then
    MsgBox "查询内容不能为空", vbOKOnly
    Exit Sub
Else
    OpenDB
    strSQL = "Select * from Drug_info Where Drug_name ='" + QueName + "'"
    objRS.Open strSQL, objConn, adOpenDynamic, adLockPessimistic
    If objRS.EOF Then
        MsgBox "没有所查询的药品", vbOKOnly
        objRS.Close
        CloseDB
                Exit Sub
    Else
        Drug_name.Text = objRS.Fields(1).Value
        Drug_type.Text = objRS.Fields(2).Value
        Import_price.Text = Str(objRS.Fields(3).Value)
        Export_price.Text = Str(objRS.Fields(3).Value)
        Import_time.Text = Str(objRS.Fields(5).Value)
        Drug_num.Text = Str(objRS.Fields(2).Value)
        Prodcom.Text = objRS.Fields(7).Value
        Prodplace.Text = objRS.Fields(7).Value       
    End If  
End If
objRS.Close
CloseDB
End Sub

Private Sub Fault_Click()
Unload Me
End Sub
询药品库存信息的代码如下:
Private Sub Cmd_del_Click()
Dim QueName As String
Dim strSQL As String
    QueName = Trim(del_que.Text)
If QueName = "" Then
    MsgBox "查询内容不能为空", vbOKOnly
    Exit Sub
Else
    OpenDB
    strSQL = "Select * from Drug_info Where Drug_name ='" + QueName + "'"
    objRS.Open strSQL, objConn, adOpenDynamic, adLockPessimistic
    If objRS.EOF Then
        MsgBox "没有所查询的药品", vbOKOnly
        objRS.Close
        CloseDB
        Exit Sub
    Else
         objRS.Close
         strSQL = "Delete from Drug_info Where Drug_name='" + QueName + "'"
         objConn.Execute (strSQL)
         CloseDB
    End If   
End If

上一页  [1] [2] [3] [4] [5] [6] [7] 下一页

VB医药进销存管理系统(结构图+ER图) 第6页下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

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