Esempio n. 1
0
 public ActionResult Create(OrderViewModel model)
 {
     model.HomeProcessing = DateTime.Now;
     if (ModelState.IsValid)
     {
         this.orderAppService.Add(model);
         return RedirectToAction("Index", new { id = model.TableServiceId });
     }
     return View(model);
 }
Esempio n. 2
0
        public ActionResult Create(Guid TableServiceId)
        {
            TempData[TableServiceID] = TableServiceId;
            var model = new OrderViewModel();
            model.TableService = this.tableServiceAppService.GetById(TableServiceId);
            model.TableServiceId = model.TableService.Id;

            ViewBag.DishId = new SelectList(this.dishAppService.GetAll(), "Id", "Name");
            ViewBag.OptionId = new SelectList(this.optionAppService.GetAll(), "Id", "Description");

            return View(model);
        }