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