Ejemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            //back home
            this.Hide();
            Admin_Home adminHome = new Admin_Home();

            adminHome.ShowDialog();
            this.Close();
        }
        private void btnBack_Click(object sender, EventArgs e)
        {
            //go back to admin home
            this.Hide();
            Admin_Home admHome = new Admin_Home();

            admHome.ShowDialog();
            this.Close();
        }
        private void btnBack_Click(object sender, EventArgs e)
        {
            //go back to admin home
            this.Hide();
            //creating a new instance of the admin home form
            Admin_Home admHome = new Admin_Home();

            //loading that form
            admHome.ShowDialog();
            //closing this form
            this.Close();
        }
Ejemplo n.º 4
0
 private void button1_Click(object sender, EventArgs e)
 {
     //if username and password are correct
     if (txtbxUsername.Text.ToLower() == "admin" && txtbxPassword.Text.ToLower() == "admin")
     {
         //go to admin home
         this.Hide();
         Admin_Home aHome = new Admin_Home();
         aHome.ShowDialog();
         this.Close();
     }
     else if (txtbxUsername.Text == "" || txtbxPassword.Text == "")
     {
         //alert user
         MessageBox.Show("Please ensure both username and password contains data", "Error");
     }
     else
     {
         //alert user
         MessageBox.Show("Incorrect admin login", "Error");
     }
 }