public void UpdateValues(CommandTicket commandTicket) { InitialDate = commandTicket.InitialDate; FinishDate = commandTicket.FinishDate; Attempt = commandTicket.Attempt; Pdu = commandTicket.Pdu; Status = commandTicket.Status; StatusCommand = commandTicket.StatusCommand; Answer = commandTicket.Answer; CommunicationStatus = commandTicket.CommunicationStatus; Command = commandTicket.Command; }
public void UpdateValues(CommandTicket commandTicket) { Status = commandTicket.Status; StatusCommand = commandTicket.StatusCommand; FinishDate = commandTicket.FinishDate; if (CommandTickets.TrueForAll(command => command.Status == Status.Finished)) { TicketStatus = TicketStatus.Finished; } else if (CommandTickets.TrueForAll(command => command.Status == Status.Finished || command.Status == Status.Failed)) { TicketStatus = TicketStatus.PartiallyFinished; } else if (TicketStatus == TicketStatus.Waiting && commandTicket.Status == Status.Executing) { TicketStatus = TicketStatus.Executing; } }