Exemplo n.º 1
0
 public ApiResponse AddJournal(Guid ticketId, TicketJournal ticketJournal)
 {
     ticketJournal.Id       = Guid.NewGuid();
     ticketJournal.TicketId = ticketId;
     _faciTechDbContext.TicketJournal.Add(ticketJournal);
     _faciTechDbContext.SaveChanges();
     return(new ApiResponse(new { Id = ticketJournal.Id }));
 }
Exemplo n.º 2
0
 public ActionResult Post(Guid ticketId, [FromBody] TicketJournalApiModel ticketJournalApiModel)
 {
     try
     {
         TicketJournal ticketJournal   = _mapper.Map <TicketJournal>(ticketJournalApiModel);
         ApiResponse   serviceResponse = this._ticketService.AddJournal(ticketId, ticketJournal);
         if (serviceResponse.IsSuccess())
         {
             return(new ObjectCreatedResult("TicketJournals", serviceResponse.Id.Value));
         }
         else
         {
             return(new ValidationErrorResult(serviceResponse));
         }
     }
     catch (Exception ex)
     {
         return(new UnknownErrorResult(ex, base._errorEnabled));
     }
 }
Exemplo n.º 3
0
 public ApiResponse DeleteJournal(Guid commentId, TicketJournal ticketJournal)
 {
     _faciTechDbContext.Remove(ticketJournal);
     _faciTechDbContext.SaveChanges();
     return(new ApiResponse(new { Id = ticketJournal.Id }));
 }
Exemplo n.º 4
0
 public int CreateTicketJournal(TicketJournal ticketJournalDetails)
 {
     return(_ticketJournalRepository.Post(ticketJournalDetails));
 }
Exemplo n.º 5
0
 public int Post(TicketJournal Ticket)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 6
0
 public int Post(TicketJournal ticketJournal)
 {
     return(_dbContext.Post <TicketJournal, int>(ticketJournal));
 }