Beispiel #1
0
 public ActionResult StockOutList(string dateFrom, string dateTo)
 {
     try
     {
         //ViewBag.Id = id;
         var identity = (LoginIdentity)Thread.CurrentPrincipal.Identity;
         var dataSet  = _rawSqlService.GetProductStockAll(identity.CompanyId, identity.BranchId, dateFrom, dateTo);
         return(View(dataSet));
     }
     catch (Exception ex)
     {
         return(JavaScript($"ShowResult('{ex.Message}','failure')"));
     }
     //try
     //{
     //    var identity = (LoginIdentity)Thread.CurrentPrincipal.Identity;
     //    var serializer = new JavaScriptSerializer() { MaxJsonLength = int.MaxValue };
     //    ViewBag.ItemWithCodeList = serializer.Serialize(_rawSqlService.GetProductStockAll(identity.CompanyId, identity.BranchId));
     //    ViewBag.ItemList = serializer.Serialize(_rawSqlService.GetBranchwiseProductStockAll(identity.CompanyId, identity.BranchId));
     //    var vm = new SuperShopStockOutViewModel
     //    {
     //        Id = _purchaseService.GenerateAutoId(identity.CompanyId, identity.BranchId, "Purchase"),
     //        StockOutDate = DateTime.Now,
     //        StockOutDetails = new List<SuperShopStockOutDetailViewModel>()
     //    };
     //    vm.StockOutDetails.Add(new SuperShopStockOutDetailViewModel());
     //    return View(vm);
     //}
     //catch (Exception ex)
     //{
     //    return JavaScript($"ShowResult('{ex.Message}','failure')");
     //}
 }