Esempio n. 1
0
        public async Task <IActionResult> Create(int guestReservationId)
        {
            ViewData["ItemOfProducts"] = await _repository.GetItemOfProducts();

            ViewBag.guestReservationId = guestReservationId;
            var JobNotablesNormal = await _repository.GetJobNotablesNormal(guestReservationId);

            var JobNotablesNotNormal = await _repository.GetJobNotablesNotNormal(guestReservationId);

            ViewBag.notableNormal    = JobNotablesNormal.Count();
            ViewBag.notableNotNormal = JobNotablesNotNormal.Count();
            var giftsall = await _repository.GetGiftsByGuestReservationId(guestReservationId);

            if (giftsall.Count() > 0)
            {
                return(View(giftsall.OrderBy(f => f.ItemOfProductId).ToList()));
            }
            return(View());
        }
Esempio n. 2
0
 public async Task <IActionResult> Items()
 {
     return(View(await _repository.GetItemOfProducts()));
 }
Esempio n. 3
0
 public async Task <IActionResult> Create()
 {
     ViewData["ItemOfProductId"] = new SelectList(await _repository.GetItemOfProducts(), "Id", "Name");
     return(View());
 }