コード例 #1
0
 public ActionResult Edit([Bind(Include = "Id,Name")] TicketPriority ticketPriority)
 {
     if (ModelState.IsValid)
     {
         TicketPriorityHelper.Edit(ticketPriority.Id, ticketPriority.Name);
         return(RedirectToAction("Index"));
     }
     return(View(ticketPriority));
 }
コード例 #2
0
        // GET: TicketPriorities/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            TicketPriority ticketPriority = TicketPriorityHelper.GetTicketPriority(id);

            if (ticketPriority == null)
            {
                return(HttpNotFound());
            }
            return(View(ticketPriority));
        }
コード例 #3
0
 // GET: TicketPriorities
 public ActionResult Index()
 {
     return(View(TicketPriorityHelper.GetTicketPrioritys()));
 }
コード例 #4
0
 public ActionResult DeleteConfirmed(int id)
 {
     TicketPriorityHelper.Delete(id);
     return(RedirectToAction("Index"));
 }