// Need to 1. Remove resolution, 2. Remove assignments, 3. Remove Ticket
        public ActionResult DeleteTicket(int id, string userId)
        {
            string result = _ticketAdapter.DeleteTicket(id, userId);

            if (result == "ok")
            {
                TimeLineHelper.TicketOperations(User.Identity.Name, TimeLineHelper.Operations.Delete, id);
            }
            else
            {
                TimeLineHelper.ErrorOperations(User.Identity.Name, TimeLineHelper.Operations.Delete, result, id);
            }
            // Came from ticket list return
            if (userId == "none")
            {
                return(RedirectToAction("Tickets"));
            }
            else // came from userpage return there
            {
                return(RedirectToAction("Technician", new { userId = userId }));
            }
        }
 public IHttpActionResult Post(int id)
 {
     _adapter.DeleteTicket(id);
     return(Ok());
 }