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

VB音像信息管理系统 第7页

更新时间:2010-1-26:  来源:毕业论文
VB音像信息管理系统 第7页
  End If
     tb.MoveNext
   Next i
Set db = OpenDatabase(App.Path + "\shujuzunku.mdb", False, False, "")
Set tb = db.OpenRecordset("chushou", dbOpenDynaset)
  tb.AddNew
  tb.Fields("bianhao") = Trim(Text1.Text)
  tb.Fields("mingcheng") = Label11.Caption
  If Text2.Text = "" Then Text2.Text = 0
  tb.Fields("shuliang") = Text2.Text
  tb.Fields("danjia") = Text3.Text
  tb.Fields("chushouriqi") = Label10.Caption
  tb.Fields("jingbanren") = Label9.Caption
  tb.Fields("beizhu") = Text5.Text
  tb.Update
  MsgBox ("商品:" + Label11.Caption + "已经出售成功!对方付现金:" + Text4.Text + ",合计:" + Str(Val(Text2.Text) * Val(Text3.Text)) + ",找零:" + Str(Val(Text4.Text) - Val(Text2.Text) * Val(Text3.Text)))
 Set db = OpenDatabase(App.Path + "\shujuzunku.mdb", False, False, "")
 Set tb = db.OpenRecordset("yejicha", dbOpenDynaset)
 tb.MoveFirst
 tb.Edit
 tb.Fields("kucongshu") = Str(Val(tb.Fields("kucongshu")) - Val(Text2.Text))
 tb.Fields("kongcongjia") = Str(Val(tb.Fields("kongcongjia")) - (Val(Text2.Text) * Val(Text3.Text)))
 tb.Fields("chushoushu") = Str(Val(tb.Fields("chushoushu")) + Val(Text2.Text))
 tb.Fields("chushoujia") = Str(Val(tb.Fields("chushoujia")) + (Val(Text2.Text) * Val(Text3.Text)))
 tb.Update
 Set db = OpenDatabase(App.Path + "\shujuzunku.mdb", False, False, "")
Set tb = db.OpenRecordset("shujukbb", dbOpenDynaset)
   tb.MoveLast
   tb.MoveFirst
   For i = 0 To tb.RecordCount - 1
     If Text1.Text = tb.Fields("bianhao") Then
       tb.Edit
       tb.Fields("shuliang") = Str(Val(tb.Fields("shuliang")) - Val(Text2.Text))
       tb.Update
       Exit For
     End If
     tb.MoveNext
   Next i
tttt:
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Label11.Caption = ""
Text5.Text = ""
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Label9.Caption = yunhu
qq = Date
 If Mid$(qq, 3, 1) = "-" Then
 qq = "20" + qq
 End If
Label10.Caption = qq
chshouform.Left = 70
chshouform.Top = 1800
chshouform.Width = 11800
chshouform.Height = 5000
End Sub
Private Sub Text1_LostFocus()
Set db = OpenDatabase(App.Path + "\shujuzunku.mdb", False, False, "")
Set tb = db.OpenRecordset("shujukbb", dbOpenDynaset)
  If tb.RecordCount > 0 Then
    tb.MoveLast
    tb.MoveFirst
    For i = 0 To tb.RecordCount - 1
      If Text1.Text = tb.Fields("bianhao") Then
       Label11.Caption = tb.Fields("mingcheng")
       Text3.Text = tb.Fields("danjia")
       GoTo mmmm
      End If
      tb.MoveNext
    Next i
    If i = tb.RecordCount Then
    kai = MsgBox("此库中无此记录,请检查输入是否正确?", vbOKCancel + vbQuestion, "错误提示")
    If kai = 1 Then
    Text1.Text = ""
    Text1.SetFocus
    Else
    GoTo mmmm
    End If
    End If
  Else
  MsgBox ("你还没有做商品入库录入处理!")
  End If
mmmm:
End Sub
Private Sub Text2_LostFocus()
Set db = OpenDatabase(App.Path + "\shujuzunku.mdb", False, False, "")
   Set tb = db.OpenRecordset("shujukbb", dbOpenDynaset)
  If tb.RecordCount > 0 Then
    tb.MoveLast
    tb.MoveFirst
    For i = 0 To tb.RecordCount - 1
      If Text1.Text = tb.Fields("bianhao") Then
       If Val(Text2.Text) > Val(tb.Fields("shuliang")) Then
       MsgBox ("目前库只有:(" + Str(tb.Fields("shuliang")) + "),无法出售。请重新输入数量。")
       Text2.Text = ""
       Text2.SetFocus
       End If
      GoTo xxxx
      End If
      tb.MoveNext
    Next i
  End If
xxxx:
End Sub

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

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

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