public ActionResult Create() { tab_tickets R = new tab_tickets(); ViewBag.CmpList = db.tab_tickets.ToList(); return(View(R)); }
public ActionResult CreateR(tab_tickets R) { try { if (ModelState.IsValid) { db.tab_tickets.Add(R); } db.SaveChanges(); return(RedirectToAction("TicketsAdmin")); } catch (Exception) { return(View(R)); } }