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

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

更新时间:2010-2-26:  来源:毕业论文
VB医药进销存管理系统(结构图+ER图) 第5页
附 录
登录窗口的代码如下:
Public objRS As New ADODB.Recordset
Private Sub Command1_Click()
If RTrim(objRS.Source) = RTrim(Text2.Text) Then
   Unload Me
 frm_Main.Show
Else
   MsgBox "密码不正确,请您重新录入!", 0 + 64, "提示"
   End If
   End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
   Set objRS = Nothing
   objRS.Open "select * from login where daihao='" & Text1.Text & "'", cn, 3, 3
   If objRS.EOF = True Then
      MsgBox "没有找到记录,请您重新录入!", 0 + 64, "提示"
      Exit Sub
   Else
      Label4.Caption = objRS!Name
      Text2.SetFocus
   End If
End If
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
   SendKeys "{tab}"
End If
End Sub

主窗体的代码如下:
Private Sub Form_Load()

End Sub

Private Sub Menu_im_add_Click()
    frm_im_add.Show
End Sub
Private Sub Menu_im_del_Click()
    frm_im_del.Show
End Sub
Private Sub Menu_im_upd_Click()
    frm_im_upd.Show
End Sub
Private Sub Menu_im_que_Click()
    frm_im_que.Show
End Sub
Private Sub Menu_inf_add_Click()
    frm_inf_add.Show
End Sub
Private Sub Menu_inf_del_Click()
    frm_inf_del.Show
End Sub
Private Sub Menu_inf_upd_Click()
    frm_inf_upd.Show
End Sub
Private Sub Menu_inf_que_Click()
    frm_inf_que.Show
End Sub
Private Sub Menu_ex_add_Click()
    frm_ex_add.Show
End Sub
Private Sub Menu_ex_del_Click()
    frm_ex_del.Show
End Sub
Private Sub Menu_ex_upd_Click()
    frm_ex_upd.Show
End Sub
Private Sub Menu_ex_que_Click()
    frm_ex_que.Show
End Sub
Private Sub Menu_quit_Click()
    Unload Me
End Sub
声明数据库的代码如下:'
保存执行SQL语句的字符串
Public SqlStmt As String
'服务器名称
Public ServerName As String
'读取表中列值的变量
Public ColVal As String
'保存药品入库信息
'Public Import As New Durg_import
'保存库存药品信息
'Public Information As New Drug_info
'保存药品出库信息
'Public Export As New Drug_export
Public objConn As New ADODB.Connection
Public objRS As New ADODB.Recordset
Public Sub OpenDB()
    objConn.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=药品管理系统;Data Source=YE-1DE908B5D56F"
    objConn.Open  
End Sub
Public Sub CloseDB()
    objConn.Close
End Sub
添加药品库存信息的代码如下:
Private Sub Cmd_Add_Click()   
    Dim strSQL As String
    OpenDB
    strSQL = "Select * from Drug_info"
    objRS.Open strSQL, objConn, adOpenDynamic, adLockOptimistic
    objRS.AddNew
        objRS.Fields(1).Value = Trim(Drug_name.Text)
        'objRS.Fields(2).Value = Trim(Drug_type.Text)
        objRS.Fields(3).Value = Trim(Import_price.Text)
        objRS.Fields(4).Value = Trim(Export_price.Text)
        'objRS.Fields(5).Value = Trim(Drug_num.Text)
        objRS.Fields(6).Value = Trim(Import_time.Text)
        objRS.Fields(7).Value = Trim(Prodcom.Text)
        'objRS.Fields(8).Value = Trim(Prodplace.Text)

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

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

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