Пример #1
0
        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();
        }
Пример #2
0
        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);
        }