public ActionResult EditDishStatus(int DishId, int DishStatus)
        {
            var Facade = new Facade();
            var dish = new Dish();
            dish = Facade.GetDishGateway().Get(DishId);
            dish.Status = DishStatus;

            Facade.GetDishGateway().Update(dish.Id, dish);
            return RedirectToAction("Parties");
        }
        public ActionResult DeleteMenuFromParty(int MenuId, int PartyId)
        {
            var Facade = new Facade();
            var Party = new Party();
            Party = Facade.GetPartyGateway().Get(PartyId);

            foreach (var item in Party.Menus.ToList())
            {
                if(item.Id == MenuId)
                {
                    Party.Menus.Remove(item);
                    break;
                }
            }

            Facade.GetPartyGateway().Update(Party.Id, Party);

            return RedirectToAction("EditParty", new { PartyId = PartyId });
        }
        public ActionResult EditParty(int PartyId)
        {
            var Facade = new Facade();
            EditPartyModel PartyModel;

            var Party = new Party();
            Party = Facade.GetPartyGateway().Get(PartyId);

            List<Menu> menuList = new List<Menu>();
            menuList = Facade.GetMenuGateway().GetAll().ToList();

            foreach (var item in menuList.ToList())
            {
                if (Party.Menus.Contains(item))
                {
                    menuList.Remove(item);
                }
            }

            PartyModel = new EditPartyModel { MenuList = menuList, Party = Party };
            return View(PartyModel);
        }
 public ActionResult EditParty2(Party Party)
 {
     var Facade = new Facade();
     var PartyNew = new Party();
     PartyNew = Facade.GetPartyGateway().Get(Party.Id);
     //PartyNew.Menus = Party.Menus;
     PartyNew.FestNummer = Party.FestNummer;
     PartyNew.UseDate = Party.UseDate;
     PartyNew.Description = Party.Description;
     Facade.GetPartyGateway().Update(PartyNew.Id, PartyNew);
     return RedirectToAction("EditParty", new { PartyId = Party.Id });
 }
 public ActionResult Parties()
 {
     var Facade = new Facade();
     var Parties = new List<Party>();
     Parties = Facade.GetPartyGateway().GetAll().Where(x => x.UseDate.Day == DateTime.Now.Day).ToList();
     return View(Parties);
 }
        public ActionResult FindPartyResult(DateTime FromDate, DateTime ToDate, string Bestillingsnavn)
        {
            var Facade = new Facade();
            var Parties = new List<Party>();

            Parties = Facade.GetPartyGateway().GetAll().Where(x => x.UseDate > FromDate && x.UseDate < ToDate && x.Customer.FirstName.Contains(Bestillingsnavn)).ToList();

            return View(Parties);
        }