Пример #1
0
        private void button3_Click(object sender, EventArgs e)
        {
            Selling selling = new Selling();

            selling.Show();
            this.Hide();
        }
Пример #2
0
 private void LoginBtn_Click(object sender, EventArgs e)
 {
     if (UsernameTb.Text == "" || PasswordTb.Text == "")
     {
         MessageBox.Show("Enter a Username and password");
     }
     else
     {
         if (RoleComboBox.SelectedIndex > -1)
         {
             if (RoleComboBox.SelectedItem.ToString() == "ADMIN")
             {
                 if (UsernameTb.Text == "Admin" && PasswordTb.Text == "Admin")
                 {
                     ProductForm productForm = new ProductForm();
                     productForm.Show();
                     this.Hide();
                 }
                 else
                 {
                     MessageBox.Show("Inccorect Admin Passoword");
                 }
             }
             else if (RoleComboBox.SelectedItem.ToString() == "SELLER")
             {
                 if (UsernameTb.Text == "Seller" && PasswordTb.Text == "Seller")
                 {
                     Selling sellingForm = new Selling();
                     sellingForm.Show();
                     this.Hide();
                 }
             }
         }
         else
         {
             MessageBox.Show("Select A Role");
         }
     }
 }