public CommonCashTransferDocumentViewModel( IEntityUoWBuilder entityUoWBuilder, IUnitOfWorkFactory factory, ICategoryRepository categoryRepository, IEmployeeRepository employeeRepository, ISubdivisionRepository subdivisionRepository) : base(entityUoWBuilder, factory) { _categoryRepository = categoryRepository ?? throw new ArgumentNullException(nameof(categoryRepository)); _employeeRepository = employeeRepository ?? throw new ArgumentNullException(nameof(employeeRepository)); _subdivisionRepository = subdivisionRepository ?? throw new ArgumentNullException(nameof(subdivisionRepository)); if (entityUoWBuilder.IsNewEntity) { Entity.CreationDate = DateTime.Now; Entity.Author = Cashier; } CreateCommands(); UpdateCashSubdivisions(); UpdateIncomeCategories(); UpdateExpenseCategories(); View = new CommonCashTransferDlg(this); Entity.PropertyChanged += Entity_PropertyChanged; ConfigureEntityChangingRelations(); ConfigEntityUpdateSubscribes(); }
public CommonCashTransferDocumentViewModel(IEntityUoWBuilder entityUoWBuilder, IUnitOfWorkFactory factory) : base(entityUoWBuilder, factory) { if (entityUoWBuilder.IsNewEntity) { Entity.CreationDate = DateTime.Now; Entity.Author = Cashier; } CreateCommands(); UpdateCashSubdivisions(); UpdateIncomeCategories(); UpdateExpenseCategories(); View = new CommonCashTransferDlg(this); Entity.PropertyChanged += Entity_PropertyChanged; ConfigureEntityChangingRelations(); ConfigEntityUpdateSubscribes(); }