Esempio n. 1
0
        public ActionResult Create()
        {
            tab_tickets R = new tab_tickets();

            ViewBag.CmpList = db.tab_tickets.ToList();
            return(View(R));
        }
Esempio n. 2
0
        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));
            }
        }