public ActionResult CreateTicket(string email) { string agentid = User.Identity.Name; Ticketing ticket = Ticketing.Create(agentid, email); return(View(ticket.TicketObject)); }
public ActionResult CreateTicket(string name, string email, string phonenumber, string companyname, string pilihTiket, string TicketSubject, string description, string pilihPriority, string pilihEscalatedto) { var ticket = TicketNo.Create(User.Identity.Name, "TICKET"); Ticketing tick = Ticketing.Create(User.Identity.Name, phonenumber); Ticket objTicket = tick.TicketObject; Customer cust = tick.CustObject; cust.FirstName = name; cust.Email = email; cust.CompanyName = companyname; objTicket.Priority = pilihPriority; if (pilihEscalatedto == "-") { objTicket.Escalation = User.Identity.Name; } else { objTicket.Escalation = pilihEscalatedto; } objTicket.TicketDescription = description; objTicket.TicketSubject = TicketSubject; objTicket.TicketOwner = User.Identity.Name; objTicket.CreatedBy = User.Identity.Name; objTicket.CreatedDate = DateTime.Now; objTicket.UpdatedBy = User.Identity.Name; objTicket.UpdatedDate = DateTime.Now; tick.Update(); ViewBag.SuccessMsg = "Success"; return(View()); }
// GET: Ticketing public ActionResult Index(string email, string phoneNumber) { Ticketing ticket = Ticketing.Create(User.Identity.Name, email); ViewModel.Ticket m = new ViewModel.Ticket(ticket.TicketObject, ticket.CustObject); if (string.IsNullOrEmpty(m.Requester.Custno)) { m.Requester.Custno = phoneNumber; } return(View(m)); }