public static void AddNewOrder(int worker, int car, int client, int rt, string dp, DateTime od) { var newOrder = new AddOrderDto() { DeliveryPlace = dp, RentalTime = rt, OrderDate = od, }; DocumentService.AddOrder(car, worker, client, newOrder); LoadDataToWorkerListView(DocumentService.GetAllOrders()); }
public OrderManager(ListView lvOrder) { isEditWorker = false; LvOrder = lvOrder; var provider = new Dependencies().Load(); DocumentService = provider.GetService <IDocumentService>(); ClientService = provider.GetService <IClientService>(); WorkerService = provider.GetService <IWorkerService>(); CarService = provider.GetService <ICarService>(); LoadWorkerListProperty(); var date = new DateTime(2020, 11, 11); DocumentService.AddOrder(1, 4, 4, new AddOrderDto() { DeliveryPlace = "test2", OrderDate = date, RentalTime = 15 }); LoadDataToWorkerListView(DocumentService.GetAllOrders()); }