PROJECT - CODES Updated
PROJECT - CODES Updated
ACKNOWLEDGEMENTS
I want to first thank microsoft visual studio for providing an IDE.
Not forgetting myself Chiby Tinodaishe "@spectre"
The rest of the 2023 FCA Computer Science class up to and including GOD
My fellow FCA students ; Uncle Celtic , Uncle Drew, Quartz .....................
Hebrews 13 vs 8 "Jesus Christ is the same today , tomorrow and forever"
Not forgetting my prayerful teacher MRS A MARANGE
My distant Melinder Mukambachaza for pushing me to work.
1
'code to save a record
Iftxtaddress.Text = ""Then
MessageBox.Show("Enter your address") ElseIftxtamtpaid.Text
= ""Then
MessageBox.Show("enter amount paid")
ElseIftxtcostofone.Text = ""Then
MessageBox.Show("enter cost of one chicken")
ElseIftxtname.Text = ""Then
MessageBox.Show("enter customer name")
ElseIftxtnumberchic.Text = ""Then
MessageBox.Show("enter number of chickens bought") Else
MessageBox.Show("enter phone number") EndIf
MessageBox.Show("SORRY AN OCCURED WHILE SAVING YOUR RECORD PLEASE TRY AGAIN ", "ERROR", MessageBoxButtons.OK,
MessageBoxIcon.Error)
Try
Me.Validate()
Me.Customer_fileBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.ProjectDataSet)
MessageBox.Show("YOU HAVE SUCCESSFULLY SAVED A NEW RECORD", "SUCCESS", MessageBoxButtons.OK, MessageBoxIcon.Information) 'a
message to inform the user that he/she has successfull saved a record
Catch ex AsException'to catch an error if there is one it displays a message
MessageBox.Show("SORRY AN OCCURED WHILE SAVING YOUR RECORD PLEASE TRY AGAIN ", "ERROR", MessageBoxButtons.OK,
MessageBoxIcon.Error) 'a message to inform the user that the record that he/she added has not been saved
because an error occured
EndTry
EndSub
2
'code to move to the first record
Customer_fileBindingSource.MoveFirst()
EndSub
3
taSet.customer_file)
EndSub
4
End Sub
Private Sub CheckBox1_CheckedChanged(sender As Object, e As EventArgs) Handles
CheckBox1.CheckedChanged
' for the checkbox to hide or unhide password
If CheckBox1.CheckState = CheckState.Checked Then
txtpass.UseSystemPasswordChar = False
Else
txtpass.UseSystemPasswordChar = True
End If
End Sub
5
Chassis_numberTextBox.Focus() 'Returns cursor into the class text box
ElseIf (String.IsNullOrEmpty(Me.ModelTextBox.Text)) Then
MsgBox("Enter class", vbOKCancel, "Error")
ModelTextBox.Focus() 'Returns cursor into the model text box
ElseIf (String.IsNullOrEmpty(Me.Registration_numberTextBox.Text)) Then
MsgBox("Enter class", vbOKCancel, "Error")
Registration_numberTextBox.Focus() 'Returns cursor into the reg number text box
Else
InputDataOK = True 'Sets the InputdataOK to True. There are no errors
End If
End Sub
6
MsgBox("Your username is QUEST and your password is motors")
selection.Show()
Me.Hide()
Else
MessageBox.Show("This is an invalid email format")
End If
End Sub
7
===========S e i h k t c u s n las o 2023=========
------------------------------------------------------------------------------------------------------------------------------