Exemplo n.º 1
0
 public virtual ActionResult Delete(TicketViewModel model)
 {
     _ticketHandler.Delete(model.Id);
     _ticketHandler.Commit();
     return RedirectToAction("Index");
 }
Exemplo n.º 2
0
 public virtual ActionResult Edit(TicketViewModel model)
 {
     if (ModelState.IsValid)
     {
         _ticketHandler.Update(model.CreateTicketDomain());
         _ticketHandler.Commit();
         return RedirectToAction("Index");
     }
     return View(model);
 }
Exemplo n.º 3
0
 // GET: Ticket/Create
 public virtual ActionResult Create()
 {
     TicketViewModel model = new TicketViewModel();
     model.AllProducts = _productHandler.GetAll().Select(ProductViewModelFactory.Create);
     return View(model);
 }