public CarEventViewModel( IEntityUoWBuilder uowBuilder, IUnitOfWorkFactory unitOfWorkFactory, ICommonServices commonServices, ICarJournalFactory carJournalFactory, ICarEventTypeJournalFactory carEventTypeJournalFactory, IEmployeeService employeeService, IEmployeeJournalFactory employeeJournalFactory) : base(uowBuilder, unitOfWorkFactory, commonServices) { if (employeeService == null) { throw new ArgumentNullException(nameof(employeeService)); } CarSelectorFactory = carJournalFactory.CreateCarAutocompleteSelectorFactory(); CarEventTypeSelectorFactory = carEventTypeJournalFactory.CreateCarEventTypeAutocompleteSelectorFactory(); EmployeeSelectorFactory = (employeeJournalFactory ?? throw new ArgumentNullException(nameof(employeeJournalFactory))) .CreateWorkingDriverEmployeeAutocompleteSelectorFactory(); TabName = "Событие ТС"; if (Entity.Id == 0) { Entity.Author = employeeService.GetEmployeeForUser(UoW, UserService.CurrentUserId); Entity.CreateDate = DateTime.Now; } }
public CarEventFilterViewModel(ICarJournalFactory carJournalFactory, ICarEventTypeJournalFactory carEventTypeJournalFactory) { CarSelectorFactory = carJournalFactory.CreateCarAutocompleteSelectorFactory(); CarEventTypeSelectorFactory = carEventTypeJournalFactory.CreateCarEventTypeAutocompleteSelectorFactory(); }