예제 #1
0
        private void btnLogin_Click_1(object sender, EventArgs e)
        {
            this.Hide();
            PosSystem system = new PosSystem();

            system.Show();
        }
예제 #2
0
 public void btnLogin_Click_1(object sender, EventArgs e)
 {
     _log.Id       = tbUserID.Text;
     _log.Password = tbPassword.Text;
     if (tbUserID.Text != "" && tbPassword.Text != "")
     {
         if (posBusiness.CheckLogin(_log))
         {
             if (posBusiness.GetTitle(_log) == "PosEmployee")
             {
                 this.Hide();
                 PosSystem _pos = new PosSystem();
                 _pos.Show();
             }
             else if (posBusiness.GetTitle(_log) == "Manager")
             {
                 this.Hide();
                 ManagerForm _manager = new ManagerForm();
                 _manager.Show();
             }
             else if (posBusiness.GetTitle(_log) == "InventoryEmployee")
             {
                 this.Hide();
                 ViewInventory _inventory = new ViewInventory();
                 _inventory.Show();
             }
         }
         else
         {
             MessageBox.Show("Login Failed!", "Warning", MessageBoxButtons.RetryCancel, MessageBoxIcon.Warning);
         }
     }
     else
     {
         MessageBox.Show("Login Failed!", "Warning", MessageBoxButtons.RetryCancel, MessageBoxIcon.Warning);
     }
 }