
-------------------------------------------------------------
Form4 (for Delete button Control Code)
-------------------------------------------------------------
If txtsearchEmpIdno.Text = "" And txtsearchFirstName.Text = "" and txtsearchlastName.Text = "" Then
MsgBox("Choose specific data to delete")
Else
Dim deleteYesNo = MsgBox("This record will be deleted. Are you sure?", MsgBoxStyle.YesNo, "Delete")
If deleteYesNo = MsgBoxResult.Yes Then
Form2.deletedata()
MsgBox("Record deleted successfully", , "Message")
Form2.txtempidno.Text = ""
Form2.txtfirstname.Text = ""
Form2.txtmiddlename.Text = ""
Form2.txtlastname.Text = ""
Form2.DateTimePicker1.Text = ""
Form2.txtage.Text = ""
Form2.cmbgender.Text = ""
Form2.txtstreetbaranggay.Text = ""
Form2.txtcity.Text = ""
Form2.txtprovince.Text = ""
Form2.txtpostalcode.Text = ""
Form2.txtjobposition.Text = ""
Form2.txtsalary.Text = ""
Form2.txtdeductions.Text = ""
Form2.txtbonus.Text = ""
Form2.txtgrosssalary.Text = ""
Form2.txtnetpay.Text = ""
Me.Close()
End If
End If
Walang komento:
Mag-post ng isang Komento