public BILET UpdateTicket(BILET t) { db.Entry(t).State = EntityState.Modified; return(t); }
public void DeleteTicket(int id) { BILET t = db.BILET.Find(id); db.BILET.Remove(t); }
public BILET AddTicket(BILET t) { db.BILET.Add(t); return(t); }
public BILET UpdateTicket(BILET t) { db.Entry(t).State = EntityState.Modified; return t; }
public BILET AddTicket(BILET t) { db.BILET.Add(t); return t; }
public ActionResult EditTicket(BILET model) { if (ModelState.IsValid) { repository.UpdateTicket(model); repository.Save(); return RedirectToAction("Tickets"); } else { return View(model); } }
public ActionResult CreateTicket(BILET t) { if (ModelState.IsValid) { repository.AddTicket(t); repository.Save(); return RedirectToAction("Tickets"); } else { return View(t); } }