Ejemplo n.º 1
0
        private void LoginBtn_Click_1(object sender, EventArgs e)
        {
            IStaffRepository staffRepository = new StaffRepository();
            IAdminRepository adminRepository = new AdminRepository();
            Admin            admin           = adminRepository.Login(UserTxt.Text, PassTxt.Text);

            if (admin != null)
            {
                AdminPannel pannel = new AdminPannel(admin.ClinicId);
                pannel.Show();
                this.Hide();
            }
            else
            {
                Staff user = staffRepository.Login(UserTxt.Text, PassTxt.Text);
                if (user != null)
                {
                    ClerkPannel pannel = new ClerkPannel(user.ClinicId);
                    pannel.Hide();
                    this.Close();
                }

                else
                {
                    MessageBox.Show("چنین کاربری در سیستم وجود ندارد", "خطا", MessageBoxButtons.OK);
                }
            }
        }
Ejemplo n.º 2
0
        private void ManagePatients_Click(object sender, EventArgs e)
        {
            ClerkPannel pannel = new ClerkPannel(ClinicId);

            pannel.Show();
        }