public IHttpActionResult PostTicket(SupportTicketGridViewModel model) { var ticket = _supportTicketService.CreateTicket( model.Site.Id, model.TicketState.Id, model.Priority, model.Timestamp, model.Description); return(Ok(new { Data = model })); }
public ResultModel CreateTicket(CreateTicketData data) { var userId = ((RoPrincipal)User).UserId; var msg = new Message { AuthorId = userId, Text = data.Text, }; var ticket = new Ticket() { AuthorId = userId, Subject = data.Subject, TicketType = data.TicketType }; int id = _supportTicketService.CreateTicket(ticket, msg); return(new ResultModel(true, id)); }