Exemple #1
0
        public MaterialsViewModel()
            : base(NumberOfRowsInMaterialsGrid)
        {
            _contoData       = new ContoData();
            Measures         = new List <Measures>(_contoData.MeasuresGet());
            ExistingMeasures = new List <Measures>(_contoData.MeasuresGet());

            Initialize(OnPropertyChanged, _contoData.MaterialsGet);

            UpdatePanelVisibility = Visibility.Collapsed;
        }
Exemple #2
0
        public InvoiceViewModel()
            : base(NumberOfRowsInInvoicesGrid)
        {
            _contoData = new ContoData();

            Clients     = new List <Client>(_contoData.ClientsGet());
            InvoiceDate = DateTime.Today;
            Measures    = new List <Measures>(_contoData.MeasuresGet());

            var invoiceRowId = Guid.NewGuid();

            InvoiceRows = new List <NewInvoiceContent> {
                new NewInvoiceContent(invoiceRowId)
                {
                    Rows = new List <NewInvoiceMaterialRow> {
                        new NewInvoiceMaterialRow {
                            MasterId = invoiceRowId
                        }
                    }
                }
            };

            Initialize(OnPropertyChanged, _contoData.InvoicesMasterGet);

            AppProperties.FormHaveModifications = false;
        }
        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;
        }