private void button1_Click(object sender, EventArgs e)
        {
            int             id              = Convert.ToInt32(userNameBox.Text);
            string          password        = passwordBox.Text;
            EmployeeService employeeService = new EmployeeService();

            if (employeeService.CheckLogin(id, password) == "Admin")
            {
                AdminPanel ap = new AdminPanel();
                this.Hide();
                ap.ShowDialog();
                this.Close();
            }
            else if (employeeService.CheckLogin(id, password) == "Pathologist")
            {
                PathologistPanel pp = new PathologistPanel();
                this.Hide();
                pp.ShowDialog();
                this.Close();
            }
            else if (employeeService.CheckLogin(id, password) == "Nurse")
            {
                NursePanel np = new NursePanel();
                this.Hide();
                np.ShowDialog();
                this.Close();
            }
            else
            {
                MessageBox.Show("Invalid User id or Password!!");
            }
        }
Esempio n. 2
0
        private void BackButton_Click(object sender, EventArgs e)
        {
            NursePanel ns = new NursePanel();

            this.Hide();
            ns.ShowDialog();
            this.Close();
        }