Beispiel #1
0
 private void btnLogin_Click(object sender, EventArgs e)
 {
     if ((txtUname.Text == "cab") && (txtPword.Text == "123"))
     {
         MessageBox.Show("Welcome " + txtUname.Text, "Login successful", MessageBoxButtons.OK);
         formAdmin next = new formAdmin(txtUname.Text);
         txtUname.Text = "";
         txtPword.Text = "";
         this.Visible  = false;
         next.ShowDialog();
         this.Visible = true;
     }
     else
     {
         MessageBox.Show("The username or password you entered is incorrect\nPlease try again", "Login unsuccessful", MessageBoxButtons.OK);
     }
 }
Beispiel #2
0
 public Repairs(formAdmin Admin)
 {
     InitializeComponent();
     _formAdmin = Admin;
 }