示例#1
0
 private void AddToShop_Form_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (lblRank.Text == "2")
     {
         this.Hide();
         Main_User_Files.Cushier_Form ch = new Main_User_Files.Cushier_Form();
         ch.ShowDialog();
     }
     else
     {
         this.Hide();
         Point_Of_Sale_Files.Selling_Form sf = new Point_Of_Sale_Files.Selling_Form();
         sf.ShowDialog();
     }
 }
        private void Selling_Form_FormClosing(object sender, FormClosingEventArgs e)
        {
            DialogResult dia = MessageBox.Show("Do You Really Wany To Log Out?", "Pharmacy System", MessageBoxButtons.YesNo);

            if (dia == DialogResult.Yes)
            {
                if (lblRank.Text == "1")
                {
                    this.Hide();
                    Main_User_Files.Admin_Form ad = new Main_User_Files.Admin_Form();
                    ad.ShowDialog();
                }
                else
                {
                    this.Hide();
                    Main_User_Files.Cushier_Form ad = new Main_User_Files.Cushier_Form();
                    ad.ShowDialog();
                }
            }
            else if (dia == DialogResult.No)
            {
                cboCategory.Focus();
            }
        }
示例#3
0
        private void closeFormToolStripMenuItem_Click(object sender, EventArgs e)
        {
            DialogResult dia = MessageBox.Show("Do You Really Wany To Log Out?", "Pharmacy System", MessageBoxButtons.YesNo);

            if (dia == DialogResult.Yes)
            {
                if (lblRank.Text == "1")
                {
                    this.Hide();
                    Main_User_Files.Admin_Form ad = new Main_User_Files.Admin_Form();
                    ad.ShowDialog();
                }
                else
                {
                    this.Hide();
                    Main_User_Files.Cushier_Form lf = new Main_User_Files.Cushier_Form();
                    lf.ShowDialog();
                }
            }
            else if (dia == DialogResult.No)
            {
                dpt.Focus();
            }
        }
示例#4
0
 private void ShopStore_Form_FormClosing(object sender, FormClosingEventArgs e)
 {
     this.Hide();
     Main_User_Files.Cushier_Form fg = new Main_User_Files.Cushier_Form();
     fg.ShowDialog();
 }