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

VB仓库管理系统 第4页

更新时间:2007-12-3:  来源:毕业论文

 MsgBox "请输器名", vbOKOnly + vbExclamation, "信息提示"

         txtyqmc.SetFocus

         Exit Sub

       End If

       If Trim(txtxh.Text) = "" Then

          MsgBox "请输器型", vbOKOnly + vbExclamation, "信息提示"

          txtxh.SetFocus

          Exit Sub

       End If

       If Trim(txtgg.Text) = "" Then

          MsgBox "请输格!", vbOKOnly + vbExclamation, "信息提示"

          txtgg.SetFocus

          Exit Sub

       End If

       If Trim(txtdj.Text) = "" Then

          MsgBox "请输价!", vbOKOnly + vbExclamation, "信息提示"

          txtdj.SetFocus

          Exit Sub

       End If

       If Trim(txtcj.Text) = "" Then

          MsgBox "请输家!", vbOKOnly + vbExclamation, "信息提示"

          txtcj.SetFocus

          Exit Sub

       End If

       If Trim(txtgzrq.Text) = "" Then

           MsgBox "请输置日期!", vbOKOnly + vbExclamation, "信息提示"

           txtgzrq.SetFocus

           Exit Sub

       End If

       If Trim(txtxz.Text) = "" Then

         MsgBox "请输现状", vbOKOnly + vbExclamation, "信息提示"

         txtxz.SetFocus

         Exit Sub

       End If

       If Trim(txtlyr.Text) = "" Then

          MsgBox "请输用人!", vbOKOnly + vbExclamation, "信息提示"

          txtlyr.SetFocus

          Exit Sub

       End If

       If Trim(txtjsr.Text) = "" Then

          MsgBox "请输手人!", vbOKOnly + vbExclamation, "信息提示"

          txtjsr.SetFocus

          Exit Sub

       End If

       If Trim(txtrksj.Text) = "" Then

          MsgBox "请输rksj", vbOKOnly + vbExclamation, "信息提示"

          txtrksj.SetFocus

          Exit Sub

       End If

       rstxinxi.Find ("yiqibianhao = '" + txtyqbh.Text + "'")

       If Not rstxinxi.EOF Then

            MsgBox "编号存在!", vbOKOnly + vbExclamation, "警告"

            txtyqbh.Text = ""

            txtyqbh.SetFocus

       Else

           rstxinxi.AddNew

           rstxinxi.Fields("yiqibianhao") = Trim(txtyqbh.Text)

           rstxinxi.Fields("fenleihao") = Trim(txtflh.Text)

           rstxinxi.Fields("xinghao") = Trim(txtxh.Text)

           rstxinxi.Fields("yiqimingcheng") = Trim(txtyqmc.Text)

           rstxinxi.Fields("guige") = Trim(txtgg.Text)

           rstxinxi.Fields("danjia") = Trim(txtdj.Text)

           rstxinxi.Fields("changjia") = Trim(txtcj.Text)

           rstxinxi.Fields("gouzhiriqi") = Trim(txtgzrq.Text)

           rstxinxi.Fields("xianzhuang") = Trim(txtxz.Text)

           rstxinxi.Fields("lingyongren") = Trim(txtlyr.Text)

           rstxinxi.Fields("jingshouren") = Trim(txtjsr.Text)

           rstxinxi.Fields("rukushijian") = Trim(txtrksj.Text)

           rstxinxi.Update

           MsgBox "添加信息成功", vbOKOnly + vbExclamation, "信息提示"

           Call Command1_Click

           rstxinxi.Close

           xinxi.Close

       End If

    End If

End Sub

 

Private Sub Command3_Click()

   Option1.Value = False

   Option2.Value = False

   txtyqbh.Text = ""

   txtflh.Text = ""

   txtyqmc.Text = ""

   txtxh.Text = ""

   txtgg.Text = ""

   txtdj.Text = ""

   txtcj.Text = ""

   txtgzrq.Text = ""

   txtxz.Text = ""

   txtjsr.Text = ""

   txtlyr.Text = ""

   txtrksj.Text = ""

End Sub

 

Private Sub Form_Load()

    Set xinxi = New ADODB.Connection

    xinxi.CursorLocation = adUseClient

    xinxi.Open "Provider=Microsoft.Jet.OLEDB.4.0;User ID=admin;Data Source=F:\仓库管理系\cangkuzl.mdb;Persist Security Info=False"

    Set rstxinxi = New ADODB.Recordset

    Set rstxinxi.ActiveConnection = xinxi

    rstxinxi.Open "select * from yiqixinxi", xinxi, adOpenStatic, adLockOptimistic

End Sub

 

Private Sub a11_Click(Index As Integer)

    Select Case Index

       Case 0

          Unload Me

          Load Formtianjia

          Formtianjia.Show

       Case 2

          Unload Me

          Load Formxiugai

          Formxiugai.Show

       Case 3

          Unload Me

          Load Formshanchu

          Formshanchu.Show

    End Select

End Sub

 

Private Sub f11_Click(Index As Integer)

    Select Case Index

       Case 0

          Unload Me

          Load mainForm

          mainForm.Show

       Case 2

          Dim i As Byte

          Beep

          i = MsgBox("确定要退出仓库管理系统吗", vbYesNo, "退出系")

          If i = vbYes Then

             End

          End If

    End Select

End Sub

 

Private Sub s11_Click(Index As Integer)

    Select Case Index

       Case 0

          Unload Me

          Load Formchaxun

          Formchaxun.Show

    End Select

End Sub

 

Private Sub Timer1_Timer()

   Labelsj.Caption = Now

End Sub

 

3.6.8 创建删除信息窗体(formshanchu.frm

visual basic中新建一个form,保存为formshanchu.frm。从工具箱中选择相应控件将其添加到窗体中,根据需要设置其各项属性,最后的删除信息窗体如图所示。

 

将窗体及其各控件的属性设置完毕后,根据需要为窗体及控件添加事件处理函数,程序如下:

Dim xinxi As New ADODB.Connection

Dim rstxinxi As New ADODB.Recordset

 

Private Sub Command3_Click()

   Option1.Value = False

   Option2.Value = False

   txtyqbh.Text = ""

   txtflh.Text = ""

   txtyqmc.Text = ""

   txtxh.Text = ""

   txtgg.Text = ""

   txtdj.Text = ""

   txtcj.Text = ""

   txtgzrq.Text = ""

   txtxz.Text = ""

   txtjsr.Text = ""

   txtlyr.Text = ""

   txtrksj.Text = ""

End Sub

Private Sub Form_Load()

    Set xinxi = New ADODB.Connection

    xinxi.CursorLocation = adUseClient

    xinxi.Open "Provider=Microsoft.Jet.OLEDB.4.0;User ID=admin;Data Source=F:\仓库管理系\cangkuzl.mdb;Persist Security Info=False"

    Set rstxinxi = New ADODB.Recordset

    Set rstxinxi.ActiveConnection = xinxi

    rstxinxi.Open "select * from yiqixinxi", xinxi, adOpenStatic, adLockOptimistic

End Sub

Private Sub Command1_Click()

   If Option1.Value = True Then

     Option2.Value = False

     Text1.SetFocus

     Set xinxi = New ADODB.Connection

     xinxi.CursorLocation = adUseClient

     xinxi.Open "Provider=Microsoft.Jet.OLEDB.4.0;User ID=admin;Data Source=F:\仓库管理系\cangkuzl.mdb;Persist Security Info=False"

     Set rstxinxi = New ADODB.Recordset

     Set rstxinxi.ActiveConnection = xinxi

     rstxinxi.Open "select * from yiqixinxi", xinxi, adOpenStatic, adLockOptimistic

       If Text1.Text = "" Then

         MsgBox "请输编号", vbOKOnly, "警告"

         Text1.SetFocus

       Else

         rstxinxi.Find ("yiqibianhao = '" + Text1.Text + "'")

         If rstxinxi.EOF Then

            MsgBox "编号不存在,重新入!", vbOKOnly, "警告"

            Text1.Text = ""

         Else

            txtyqbh.Text = rstxinxi.Fields("yiqibianhao")

            txtflh.Text = rstxinxi.Fields("fenleihao")

            txtyqmc.Text = rstxinxi.Fields("yiqimingcheng")

            txtxh.Text = rstxinxi.Fields("xinghao")

            txtgg.Text = rstxinxi.Fields("guige")

            txtdj.Text = rstxinxi.Fields("danjia")

            txtcj.Text = rstxinxi.Fields("changjia")

            txtgzrq.Text = rstxinxi.Fields("gouzhiriqi")

            txtxz.Text = rstxinxi.Fields("xianzhuang")

            txtlyr.Text = rstxinxi.Fields("lingyongren")

            txtjsr.Text = rstxinxi.Fields("jingshouren")

            txtrksj.Text = rstxinxi.Fields("rukushijian")

            rstxinxi.Close

            xinxi.Close

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

VB仓库管理系统 第4页下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

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