Exemplo n.º 1
0
        public static async Task ChangeTicketStatus(WorkerAppDbContext dbContext, int ticketId, TicketStatus ticketStatus)
        {
            dbContext.DetachAllEntities();
            var ticket = await dbContext.TaskTickets.FirstOrDefaultAsync(f => f.TaskTicketId == ticketId);

            ticket.TicketStatus    = ticketStatus;
            ticket.StatusChangedAt = DateTime.Now;
            dbContext.Update(ticket);
            await dbContext.SaveChangesAsync();
        }
Exemplo n.º 2
0
 public SystemDataService(ILogger logger, WorkerAppDbContext dbContext)
 {
     _apiService = new ApiService();
     _logger     = logger;
     _dbContext  = dbContext;
 }
Exemplo n.º 3
0
 public TargetDataService(ILogger logger, WorkerAppDbContext dbContext, List <string> procOutput)
 {
     _logger     = logger;
     _dbContext  = dbContext;
     _procOutput = procOutput;
 }
Exemplo n.º 4
0
 public ContractorService(WorkerAppDbContext dbContex)
 {
     _dbContex   = dbContex;
     contractors = _dbContex.Contractors.ToList();
 }