public ActionResult AcknowlageTicket(string id) { HelpDeskLogic hdl = new HelpDeskLogic(); var ticket = hdl.GetTicket(int.Parse(id)); return(View(ticket)); }
public ActionResult Ticket(string id) { HelpDeskLogic hdl = new HelpDeskLogic(); AssetManagementLogic aml = new AssetManagementLogic(); var Ticket = hdl.GetTicket(int.Parse(id)); var duration = new TimeSpan(); if (Ticket.accomplishstatus == true) { duration = Ticket.datecompleted.Value.Subtract(Ticket.datecreated); } else { duration = DateTime.Now.Subtract(Ticket.datecreated); } ViewData["duration"] = duration; ViewData["Asset"] = aml.GetAsset(Ticket.assetid.ToString()); return(View(Ticket)); }