public SaleUpdateViewModel() { _currentWindow = Application.Current.Windows.OfType <MetroWindow>().LastOrDefault(); _categoriesDialog = new CategoriesShowDialog(); _categoryDialog = new SaleCategoryInfromationDialog(); Salespersons = new ObservableCollection <Salesperson>(_salespersonServ.GetSalespersons()); _selectedSale = _saleServ.GetSale(ID); _saleCategories = new ObservableCollection <SaleCategoryVM>(_saleCategoryServ.GetSaleCategoriesVM(ID)); Report = "تقرير الفاتورة"; currencies.Add(new CurrencyInfo(CurrencyInfo.Currencies.Egypt)); }
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 = "تقرير الفاتورة"; }
public SaleUpdateViewModel() { _safeServ = new SafeServices(); _saleServ = new SaleServices(); _clientServ = new ClientServices(); _categoryServ = new CategoryServices(); _salespersonServ = new SalespersonServices(); _saleCategoryServ = new SaleCategoryServices(); _clientAccountServ = new ClientAccountServices(); _categoriesDialog = new CategoriesShowDialog(); _currentWindow = Application.Current.Windows.OfType <MetroWindow>().LastOrDefault(); _key = ""; _isFocused = true; _selectedSale = _saleServ.GetSale(ID); Salespersons = new ObservableCollection <Salesperson>(_salespersonServ.GetSalespersons()); _saleCategories = new ObservableCollection <SaleCategoryVM>(_saleCategoryServ.GetSaleCategoriesVM(ID)); Report = "تقرير الفاتورة"; }
public IHttpActionResult GetSale(int id) { Sale sale = SaleServices.GetSale(id); HttpContext.Current.Response.AppendHeader("API-Version", apiVersion); if (sale == null) { HttpContext.Current.Response.AppendHeader("ERROR", "(404) Resource Not Found"); return(NotFound()); } else { HttpContext.Current.Response.AppendHeader("Response-Type", "JSON"); HttpContext.Current.Response.AppendHeader("Object-URL", Request.RequestUri.AbsoluteUri); JsonSerializerSettings serializerSettings = new JsonSerializerSettings { Formatting = Formatting.Indented }; return(Json(sale, serializerSettings)); } }