public DocumentJournalViewModel(DTO.DataModel pDataModel) { DataModel = pDataModel; DocResponseType = new ObservableCollection <RefDocMap.DocMap>(); DocTypes = RefDocType.GetInstance.refDocType; foreach (RefDocType.DocType docType in DocTypes) { docType.OnClickCommand = new DelegateCommand(CreateDoc); } FilterActionCommand = new DelegateCommand(FilterAction); FilterApplyCommand = new DelegateCommand(FilterApply); DeleteCommand = new DelegateCommand(DeleteOnClick, DeleteCommand_CanExecute); collectDocumentByFilter(); }
public DocumentViewModel(DTO.DataModel pDataModel) { DataModel = pDataModel; RefItems = new ObservableCollection <dll.utilites.OReferences.RefItem.Item>(dll.utilites.OReferences.RefItem.GetInstance.refItem); RefCurrency = new ObservableCollection <dll.utilites.OReferences.RefCurrency.CurrencyLite>(dll.utilites.OReferences.RefCurrency.GetInstance.CurrenciesLite); RefDimensions = new ObservableCollection <dll.utilites.OReferences.RefDimensions.Dimension>(dll.utilites.OReferences.RefDimensions.GetInstance.refDimension); ItemsView = new View.DocumentItemsView(); ItemsView.DataContext = this; counterpartyExternalView = new references.counterparty.View.CounterpartyExternalView(); unitExternalView = new references.orgmodel.View.UnitExternalView(); SetCountertypeOnClickCommand = new DelegateCommand(SetCountertypeOnClick); SetRecipientOnClickCommand = new DelegateCommand(SetRecipientOnClick); AddItemOnClickCommand = new DelegateCommand(AddItemOnClick); DeleteItemOnClickCommand = new DelegateCommand(DeleteItemOnClick); BackOnClickCommand = new DelegateCommand(BackOnClick); }