Esempio n. 1
0
        public SelfInvoiceViewModel()
            : base(NumberOfRowsInSelfInvoicesGrid)
        {
            _contoData = new ContoData();

            ModifySelfInvoiceCommand      = new RelayCommand(ModifySelfInvoiceCommand_Executed);
            UpdateSelfInvoiceCloseCommand = new RelayCommand(UpdateSelfInvoiceCommandClose_Executed);
            UpdateSelfInvoiceCommand      = new RelayCommand(UpdateSelfInvoiceCommand_Executed);
            RemoveSelfInvoiceCommand      = new RelayCommand(RemoveSelfInvoiceCommand_Executed);

            InvoiceDate       = DateTime.Now;
            InvoiceYear       = DateTime.Now.Year;
            VatExempt         = true;
            Materials         = new List <Material>(_contoData.MaterialsGet());
            ExistingMaterials = new List <Material>(Materials);
            Measures          = new List <Measures>(_contoData.MeasuresGet());
            ExistingMeasures  = new List <Measures>(_contoData.MeasuresGet());

            Initialize(OnPropertyChanged, _contoData.SelfInvoicesMasterGet);

            UpdatePanelVisibility = Visibility.Collapsed;
        }