Exemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            tstTicketStatu tstTicketStatu = db.tstTicketStatus.Find(id);

            db.tstTicketStatus.Remove(tstTicketStatu);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "ID,Name,Description")] tstTicketStatu tstTicketStatu)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tstTicketStatu).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(tstTicketStatu));
 }
Exemplo n.º 3
0
        public ActionResult Create([Bind(Include = "ID,Name,Description")] tstTicketStatu tstTicketStatu)
        {
            if (ModelState.IsValid)
            {
                db.tstTicketStatus.Add(tstTicketStatu);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(tstTicketStatu));
        }
Exemplo n.º 4
0
        // GET: tstTicketStatus/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            tstTicketStatu tstTicketStatu = db.tstTicketStatus.Find(id);

            if (tstTicketStatu == null)
            {
                return(HttpNotFound());
            }
            return(View(tstTicketStatu));
        }