Exemplo n.º 1
0
        public void AddServiceOrder(Guid serviceOrderId, Person personOrdering, Person serviceman)
        {
            var serviceOrders = ServiceOrders.SingleOrDefault(x => x.Id == serviceOrderId);

            if (serviceOrders != null)
            {
                throw new Exception($"ServiceOrder with name: '{serviceOrderId}' already exists for device: {SerialNumber}.");
            }
            _serviceOrders.Add(new ServiceOrder(serviceOrderId, personOrdering, serviceman));
            Updated = DateTime.UtcNow;
        }
Exemplo n.º 2
0
 public OrdersController()
 {
     serviceOrders = new ServiceOrders();
 }
Exemplo n.º 3
0
 public OrdersController(IConfiguration configuration)
 {
     _configuration = configuration;
     _serviceOrders = new ServiceOrders(_configuration);
 }