private void ShowAddMethod() { _currentWindow.Hide(); new SaleAddWindow().ShowDialog(); sales = _saleServ.GetSales(); Load(); _currentWindow.ShowDialog(); }
public SaleDisplayViewModel() { _saleServ = new SaleServices(); _safeServ = new SafeServices(); _categoryServ = new CategoryServices(); _saleCategoryServ = new SaleCategoryServices(); _clientAccountServ = new ClientAccountServices(); _key = ""; _isFocused = true; _currentWindow = Application.Current.Windows.OfType <MetroWindow>().LastOrDefault(); sales = _saleServ.GetSales(); Load(); }
public IHttpActionResult GetSales() { var salesList = SaleServices.GetSales(); HttpContext.Current.Response.AppendHeader("API-Version", apiVersion); HttpContext.Current.Response.AppendHeader("Response-Type", "JSON"); HttpContext.Current.Response.AppendHeader("Response-Object-Length", salesList.Count.ToString() + " Items"); HttpContext.Current.Response.AppendHeader("List-URL", Request.RequestUri.AbsoluteUri); JsonSerializerSettings serializerSettings = new JsonSerializerSettings { Formatting = Formatting.Indented }; return(Json(salesList, serializerSettings)); }