public VMAddOrUpdateSkuEncode(SKUEncodeModel model) { _isAdd = false; _model = new SKUEncodeModel(model.Entity); this.CmdSave = new DelegateCommand(this.CmdSaveExecute); _bll = new BLLSKUEncodeManagement(); }
public VMSKUEncodeManagement() { _bll = new BLLSKUEncodeManagement(); _bllAtt = new BLLAttManagement(); this.ItemsSource = new ObservableCollection<SKUEncodeModel>(); this.ItemsSource.CollectionChanged += (s, e) => { (this.CmdDel as DelegateCommand).RaiseCanExecuteChanged(); (this.CmdAdd as DelegateCommand).RaiseCanExecuteChanged(); }; ApplicationContext.EventAggregator.GetEvent<OneChangedEvent>().Subscribe(OneChangedEventExecute, ThreadOption.UIThread); ApplicationContext.EventAggregator.GetEvent<TwoChangedEvent>().Subscribe(TwoChangedEventExecute, ThreadOption.UIThread); this.InitCommands(); this.InitData(); }
public VMAddOrUpdateSkuEncode(SKUEncodeDetail detail) { _isAdd = true; _model = new SKUEncodeModel() { Code = detail.Code, Name = detail.Name, Att3ID = detail.ATT3.ID, Att4ID = detail.ATT4.ID, Att5ID = detail.ATT5.ID, Att6ID = detail.ATT6.ID, Att7ID = detail.ATT7.ID, }; this.CmdSave = new DelegateCommand(this.CmdSaveExecute); _bll = new BLLSKUEncodeManagement(); }