示例#1
0
        public SaleShowViewModel()
        {
            _saleServ          = new SaleServices();
            _categoryServ      = new CategoryServices();
            _saleRecallServ    = new SaleRecallServices();
            _saleCategoryServ  = new SaleCategoryServices();
            _clientAccountServ = new ClientAccountServices();
            _saleRecallDialog  = new SaleRecallDialog();

            _state          = "Normal";
            _isFocused      = true;
            _currentWindow  = Application.Current.Windows.OfType <MetroWindow>().LastOrDefault();
            _selectedSale   = _saleServ.GetSale(ID);
            _saleCategories = new ObservableCollection <SaleCategoryVM>(_saleCategoryServ.GetSaleCategoriesVM(ID));
            _categories     = new ObservableCollection <SaleRecallVM>(_saleRecallServ.GetSaleCategoriesVM(ID));
            RecallsQty      = _saleRecallServ.GetSaleRecallsSum(ID);
            Report          = "تقرير الفاتورة";
        }