public OrderCardViewModel(IModel model, IEventAggregator eventAggregator, ClothDataGridViewModel clothGrid, Visibilities visibilities) : base( eventAggregator, Screens.OrderEditor, visibilities) { _model = model; this.ClothInstancesGrid = clothGrid; clothGrid.DisplaySelectionColumn = false; }
public OrderEditorViewModel(IEventAggregator aggregator, IModel model, ClothDataGridViewModel clothGrid, PaginatorViewModel paginator) : base(aggregator, model, model.Orders, "заказа") { aggregator.Subscribe(this); this.Entity.CreationDate = DateTime.Now; this.Entity.ExecutionDate = DateTime.Now.AddDays(1); this.ClothInstancesGrid = clothGrid; this.ClothInstancesGrid.Order = this.Entity; this.ClothInstancesGrid.StateChanged += () => NotifyOfPropertyChange(nameof(Price)); this.Paginator = paginator; this.Paginator.ElementsName = "Вещей"; this.Paginator.RegisterPaginable(this.ClothInstancesGrid); this.ClientCombo = new ClientSearchViewModel(model); this.ClientCombo.EntityChanged += OnEntityChanged; }