• No results found

PROJECT IMPLEMENTATION: Coding:

In document Software Engineering record (Page 36-51)

Form1:

Dim db As Database Dim rs As Recordset

Private Sub Command1_Click() Dim i Dim n n = rs.RecordCount rs.MoveFirst For i = 0 To n If rs.EOF Then

MsgBox ("no records found") GoTo a

End If

If (Text1.Text = rs("userid") And Text2.Text = rs("password")) Then Me.Hide Form2.Show Else rs.MoveNext End If a: Next End Sub

Private Sub Command3_Click() Me.Hide

Form3.Show End Sub

Private Sub Command4_Click() End

End Sub

Private Sub Command5_Click() Text1.Text = ""

Text2.Text = "" End Sub

Private Sub Form_Load()

Set db = OpenDatabase("D:\vbexp\EXP2\login2.mdb") Set rs = db.OpenRecordset("login2") End Sub Form2: Dim db As Database Dim rs As Recordset Private Sub CASH_Click()

MsgBox ("please handover your payment during door delivery") MsgBox ("Thanks for your visit to our enterprise please come again") End Sub

Private Sub Combo1_Change() If Combo1.Text = "TITAN" Then Label7.Caption = "599"

End If

If Combo1.Text = "SONATA" Then Label7.Caption = "999"

If Combo1.Text = "TITAN RAGA" Then Label7.Caption = "1243"

End If

If Combo1.Text = "QUARTZ" Then Label7.Caption = "1999"

End If

If Combo1.Text = "CASIO" Then Label7.Caption = "880"

End If End Sub

Private Sub Combo2_Change() If Combo2.Text = "HAMAM" Then Label12.Caption = "19"

End If

If Combo2.Caption = "LUX" Then Label12.Caption = "39"

End If

If Combo2.Caption = "MARGO" Then Label12.Caption = "24"

End If

If Combo2.Caption = "POWER" Then Label12.Caption = "22"

End If

If Combo2.Text = "J&J" Then Label12.Caption = "32" End If

If Combo2.Caption = "SKINCARE" Then Label12.Caption = "38"

If Combo2.Caption = "CINTOL" Then Label12.Caption = "25"

End If End Sub

Private Sub Combo3_Change() If Combo3.Text = "5-STAR" Then Label13.Caption = "5"

End If

If Combo3.Text = "DIARY MILK" Then Label13.Caption = "10"

End If

If Combo3.Text = "MUNCH" Then Label13.Caption = "10"

End If

If Combo3.Text = "BARONE" Then Label13.Caption = "5"

End If

If Combo3.Text = "FRUIT&NUT" Then Label13.Caption = "10"

End If End Sub

Private Sub Combo4_Change() If Combo4.Text = "TIGER" Then Label14.Caption = "6"

End If

If Combo4.Text = "MILKBIKES" Then Label14.Caption = "20"

If Combo4.Text = "VITA" Then Label14.Caption "19"

End If

If Combo4.Text = "BOURBON" Then Label14.Caption = "15"

End If End Sub

Private Sub Combo5_Change()

If Combo5.Text = "VVDGOLD" Then If Val(Text5.Text) = "1" Then Label15.Caption = "38" End If If Val(Text5.Text) = "1.5" Then Label15.Caption = "98" End If If Val(Text5.Text) = "2" Then Label15.Caption = "177" End If End If

If Combo5.Text = "PARACHUTE" Then If Val(Text5.Text) = "1" Then Label15.Caption = "80" End If If Val(Text5.Text) = "1.5" Then Label15.Caption = "198" End If If Val(Text5.Text) = "2" Then Label15.Caption = "277" End If

End If

If Combo5.Text = "MEERA" Then If Val(Text5.Text) = "1" Then Label15.Caption = "169" End If If Val(Text5.Text) = "1.5" Then Label15.Caption = "198" End If If Val(Text5.Text) = "2" Then Label15.Caption = "297" End If End If

If Combo5.Text = "VATIKA" Then If Val(Text5.Text) = "1" Then Label15.Caption = "79" End If If Val(Text5.Text) = "1.5" Then Label15.Caption = "169" End If If Val(Text5.Text) = "2" Then Label15.Caption = "227" End If End If End Sub

Private Sub Command1_Click()

Text11.Text = Val(Text6.Text) + Val(Text7.Text) + Val(Text8.Text) + Val(Text8.Text) + Val(Text9.Text) + Val(Text10.Text)

Private Sub Command2_Click() Me.Hide

Form1.Show End Sub

Private Sub Command3_Click() Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text5.Text = "" Text6.Text = "" Text7.Text = "" Text8.Text = "" Text9.Text = "" Text10.Text = "" Text11.Text = "" End Sub

Private Sub CREDITCARD_Click() Me.Hide

Form4.Show End Sub

Private Sub Form_Load() End Sub

Private Sub Label12_Click()

If Combo2.Text = "HAMAM" Then Label12.Caption = "19"

End If

If Combo2.Text = "LUX" Then Label12.Caption = "39"

End If

If Combo2.Text = "MARGO" Then Label12.Caption = "24"

End If

If Combo2.Text = "POWER" Then Label12.Caption = "22"

End If

If Combo2.Text = "J&J" Then Label12.Caption = "32" End If

If Combo2.Text = "SKIN CARE" Then Label12.Caption = "38"

End If

If Combo2.Text = "cintol" Then Label12.Caption = "25"

End If End Sub

Private Sub Label13_Click() If Combo3.Text = "5-STAR" Then Label13.Caption = "5"

End If

If Combo3.Text = "DIARY MILK" Then Label13.Caption = "10"

End If

If Combo3.Text = "MUNCH" Then Label13.Caption = "10"

End If

If Combo3.Text = "BARONE" Then Label13.Caption = "5"

End If

If Combo3.Text = "FRUIT&NUT" Then Label13.Caption = "10"

End If End Sub

Private Sub Label14_Click() If Combo4.Text = "TIGER" Then Label14.Caption = "6"

End If

If Combo4.Text = "MILK BIKIES" Then Label14.Caption = "20"

End If

If Combo4.Text = "VITA" Then Label14.Caption = "19"

End If

If Combo4.Text = "BOURBON" Then Label14.Caption = "15"

End If End Sub

Private Sub Label15_Click()

If Combo5.Text = "VVD GOLD" Then If Val(Text5.Text) = "1" Then

Label15.Caption = "38" End If

Label15.Caption = "98" End If If Val(Text5.Text) = "2" Then Label15.Caption = "177" End If End If

If Combo5.Text = "PARACHUTE" Then If Val(Text5.Text) = "1" Then Label15.Caption = "80" End If If Val(Text5.Text) = "1.5" Then Label15.Caption = "198" End If If Val(Text5.Text) = "2" Then Label15.Caption = "277" End If End If

If Combo5.Text = "MEERA" Then If Val(Text5.Text) = "1" Then Label15.Caption = "169" End If If Val(Text5.Text) = "2" Then Label15.Caption = "198" End If If Val(Text5.Text) = "2" Then Label15.Caption = "297" End If End If

If Combo5.Text = "VATIKA" Then If Val(Text5.Text) = "1" Then

Label15.Caption = "79" End If If Val(Text5.Text) = "1.5" Then Label15.Caption = "169" End If If Val(Text5.Text) = "2" Then Label15.Caption = "227" End If End If End Sub

Private Sub Label7_Click() If Combo1.Text = "TITAN" Then Label7.Caption = "599"

End If

If Combo1.Text = "SONATA" Then Label7.Caption = "999"

End If

If Combo1.Text = "TITAN RAGA" Then Label7.Caption = "1243"

End If

If Combo1.Text = "QUARTZ" Then Label7.Caption = "1999"

End If

If Combo1.Text = "CASIO" Then Label7.Caption = "880"

End If

Private Sub Text10_Click()

Text10.Text = Val(Text5.Text) * Val(Label15.Caption) If Text5.Text = "" And Combo5.Text = "" Then

Text10.Text = 0 End If

End Sub

Private Sub Text6_Click()

Text6.Text = Val(Text1.Text) * Val(Label7.Caption) If Text1.Text = "" And Combo1.Text = "" Then Text6.Text = 0

End If End Sub

Private Sub Text7_Click()

Text7.Text = Val(Text2.Text) * Val(Label12.Caption) If Text2.Text = "" And Combo2.Text = "" Then Text7.Text = 0

End If End Sub

Private Sub Text8_Click()

Text8.Text = Val(Text3.Text) * Val(Label13.Caption) If Text3.Text = "" And Combo3.Text = "" Then Text8.Text = 0

End If End Sub

Private Sub Text9_Click()

Text9.Text = Val(Text4.Text) * Val(Label14.Caption) If Text4.Text = "" And Combo4.Text = "" Then Text9.Text = 0 End If End Sub Form3: Dim db As Database Dim rs As Recordset

Private Sub Command1_Click() Dim i Dim n Dim f As Integer n = rs.RecordCount rs.MoveFirst For i = 0 To n If rs.EOF Then rs.AddNew rs("name") = Text1.Text rs("userid") = Text2.Text rs("password") = Text3.Text rs("address") = Text4.Text rs("contact") = Text5.Text rs.Update f = 1 Me.Hide Form2.Show

GoTo a End If

If Text1.Text = rs("name") Or Text2.Text = rs("userid") Or Text3.Text = rs("password") Or Text4.Text = rs("address") Or Text5.Text = rs("contact") Then

MsgBox ("your details already updated") Else rs.MoveNext End If a: Next If f = 1 Then

MsgBox ("successfully registered") MsgBox ("ready to shop")

End If End Sub

Private Sub Command2_Click() Me.Hide

Form1.Show End Sub

Private Sub Form_Load()

Set db = OpenDatabase("D:\vbexp\EXP2\login2.mdb") Set rs = db.OpenRecordset("login2") End Sub Form4: Dim db As Database Dim rs As Recordset

Private Sub Command1_Click() Dim i

n = rs.RecordCount rs.MoveFirst For i = 0 To n If rs.EOF Then

MsgBox ("No such records found") GoTo a

End If

If (Val(Text1.Text) = rs("creditcardno") And Val(Text2.Text) = rs("pinno")) Then MsgBox ("transaction completed successfully")

MsgBox ("THANKS FOR YOUR VISIT TO OUR ENTERPRISE PLEASE COME AGAIN") Else rs.MoveNext End If a: Next End Sub

Private Sub Command2_Click() End

End Sub

Private Sub Command3_Click() Text1.Text = ""

Text2.Text = "" End Sub

Private Sub Form_Load()

Set db = OpenDatabase("D:\vbexp\EXP2\credit.mdb") Set rs = db.OpenRecordset("credit")

In document Software Engineering record (Page 36-51)

Related documents