Ejemplo n.º 1
0
 private void ShowAddMethod()
 {
     _currentWindow.Hide();
     new SaleAddWindow().ShowDialog();
     sales = _saleServ.GetSales();
     Load();
     _currentWindow.ShowDialog();
 }
Ejemplo n.º 2
0
        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();
        }
Ejemplo n.º 3
0
        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));
        }