コード例 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            TSTTicketPriority tSTTicketPriority = db.TSTTicketPriorities.Find(id);

            db.TSTTicketPriorities.Remove(tSTTicketPriority);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #2
0
 public ActionResult Edit([Bind(Include = "ID,Name,Description")] TSTTicketPriority tSTTicketPriority)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tSTTicketPriority).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(tSTTicketPriority));
 }
コード例 #3
0
        public ActionResult Create([Bind(Include = "ID,Name,Description")] TSTTicketPriority tSTTicketPriority)
        {
            if (ModelState.IsValid)
            {
                db.TSTTicketPriorities.Add(tSTTicketPriority);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(tSTTicketPriority));
        }
コード例 #4
0
        // GET: TSTTicketPriorities/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            TSTTicketPriority tSTTicketPriority = db.TSTTicketPriorities.Find(id);

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