Пример #1
0
        private void BtnLogin(object sender, EventArgs e)
        {
            string id       = UsrIdTextBox.Text;
            string password = PaswrdTextBox.Text;

            Login l = lr.GetUser(id, password);

            if (l != null)
            {
                if (l.Role == 1)
                {
                    ManagerForm mn = new ManagerForm(l);
                    this.Visible = false;
                    mn.Visible   = true;
                }
                else
                {
                    EmployeeForm mf = new EmployeeForm(l);
                    this.Visible = false;
                    mf.Visible   = true;
                }
            }
            else
            {
                MessageBox.Show("Id or Password Invalid");
            }
        }
Пример #2
0
        private void CancelBtn_Click_Method(object sender, EventArgs e)
        {
            sr.cencelmethod();
            EmployeeForm ef = new EmployeeForm(this.l);

            this.Visible = false;
            ef.Visible   = true;
        }
Пример #3
0
        private void CrossBack_Method(object sender, EventArgs e)
        {
            sr.cencelmethod();
            EmployeeForm Efrm = new EmployeeForm(l);

            this.Visible = false;
            Efrm.Visible = true;
        }
Пример #4
0
        private void CnfrmForsale_Method(object sender, EventArgs e)
        {
            if (sr.confirmMethod())
            {
                MessageBox.Show("Confirmed");
                List <Medicine> listOfMdc = mr.GetAllMedicine();
                allMdcnGridView.DataSource = listOfMdc;
            }
            else
            {
                MessageBox.Show("Not Confirmed");
            }

            sr.cencelmethod();
            EmployeeForm emf = new EmployeeForm(this.l);

            this.Visible = false;
            emf.Visible  = true;
        }