Ejemplo n.º 1
0
 private void LogInButton_Click(object sender, EventArgs e)
 {
     if (PasswordBox.Text == adminPassword && LoginBox.Text == adminLogin)
     {
         Hide();
         AdminForm adminForm = new AdminForm();
         adminForm.ShowDialog();
         Close();
     }
     else if (PasswordBox.Text == registretorPassword && LoginBox.Text == registretorLogin)
     {
         Hide();
         RegistratorForm registratorForm = new RegistratorForm();
         registratorForm.ShowDialog();
         Close();
     }
     else if (PasswordBox.Text == doctorPassword && LoginBox.Text == doctorLogin)
     {
         Hide();
         DoctorForm doctorForm = new DoctorForm();
         doctorForm.ShowDialog();
         Close();
     }
     else
     {
         MessageBox.Show("Wrong login or password", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Error);
         LoginBox.Text    = string.Empty;
         PasswordBox.Text = string.Empty;
     }
 }
Ejemplo n.º 2
0
        private void Back_Click(object sender, EventArgs e)
        {
            Hide();
            AdminForm adminForm = new AdminForm();

            adminForm.ShowDialog();
        }