public SaleShowViewModel() { _currentWindow = Application.Current.Windows.OfType <MetroWindow>().LastOrDefault(); _categoryDialog = new SaleCategoryInfromationDialog(); _saleRecallDialog = new SaleRecallDialog(); _selectedSale = _saleServ.GetSale(ID); _saleCategories = new ObservableCollection <SaleCategoryVM>(_saleCategoryServ.GetSaleCategoriesVM(ID)); _categories = new ObservableCollection <SaleRecallVM>(_saleRecallServ.GetSaleCategoriesVM(ID)); RecallsQty = _saleRecallServ.GetSaleRecallsSum(ID); Report = "تقرير الفاتورة"; currencies.Add(new CurrencyInfo(CurrencyInfo.Currencies.Egypt)); }
private async void ExecuteCloseDialogAsync(string parameter) { switch (parameter) { case "Recall": await _currentWindow.HideMetroDialogAsync(_saleRecallDialog); State = "Normal"; RecallsQty = _saleRecallServ.GetSaleRecallsSum(ID); break; default: break; } }
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 = "تقرير الفاتورة"; }