Exemplo n.º 1
0
 public void showKitchenForm()
 {
    disposeForms();
    kitchenForm = new KitchenForm();
    kitchenForm.Show();
    kitchenForm.addController(this);
 }
Exemplo n.º 2
0
        private void button2_Click(object sender, EventArgs e)
        {
            int id = int.Parse(staffIdTxt.Text);

            var search = (from x in db.Staff
                          where x.StaffId == id &&
                          x.StaffPassword.Equals(passTxt.Text)
                          select x.StaffPosition).FirstOrDefault();

            if (search != null)
            {
                if (search.Equals("Receptionist"))
                {
                    rForm = new ReceptionistForm();
                    rForm.Show();
                }
                else if (search.Equals("HouseKeeping"))
                {
                    hkForm = new HouseKeepingForm();
                    hkForm.Show();
                }
                else if (search.Equals("DiningRoom"))
                {
                    drForm = new DiningRoomForm();
                    drForm.Show();
                }
                else if (search.Equals("RoomService"))
                {
                    rsForm = new RoomServiceForm();
                    rsForm.Show();
                }
                else if (search.Equals("Kitchen"))
                {
                    kForm = new KitchenForm();
                    kForm.Show();
                }
                else if (search.Equals("Purchasing"))
                {
                    pForm = new PurchasingForm();
                    pForm.Show();
                }
                else if (search.Equals("AccountingAndFinance"))
                {
                    aafForm = new AccountingAndFinanceForm();
                    aafForm.Show();
                }
                else if (search.Equals("SalesAndMarketing"))
                {
                    samForm = new SalesAndMarketingForm();
                    samForm.Show();
                }
                else if (search.Equals("HumanCapital"))
                {
                    hcForm = new HumanCapitalForm();
                    hcForm.Show();
                }
                else if (search.Equals("HotelManager"))
                {
                    hmForm = new HotelManagerForm();
                    hmForm.Show();
                }
            }
            else
            {
                MessageBox.Show("Invalid Id or Password");
            }
        }