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