コード例 #1
0
        public ActionResult ProcessSale(string dDate)
        {
            DateTime ddDate = DateTime.Parse(dDate).Date;

            InventoryManger iManage = new InventoryManger();
            int             a       = iManage.CreateSaleEntry(ddDate);

            if (a > 0)
            {
                var dm = db.SaleInvoices.Include(c => c.PaymentDetail).Where(c => c.OnDate == ddDate);
                ViewBag.MessageHead = "No. Of Sale Invoice Created  and item processed are " + a;
                return(View(dm.ToList()));
            }
            else
            {
                ViewBag.MessageHead = "No Sale items added. Some error might has been occured. a=" + a;
                return(View(new SaleInvoice()));
            }
        }
コード例 #2
0
        public IActionResult ProcessSale(string dDate)
        {
            DateTime ddDate = DateTime.Parse(dDate).Date;
            //Store Based Addition
            int             StoreId = HelperUtil.GetStoreID(HttpContext);
            InventoryManger iManage = new InventoryManger(StoreId);

            int a = iManage.CreateSaleEntry(db, ddDate, aprajitaContext);

            if (a > 0)
            {
                return(RedirectToAction("ProcessedSale", new { id = a, onDate = ddDate }));

                //var dm = db.SaleInvoices.Include (c => c.PaymentDetail).Where (c => c.OnDate == ddDate);
                //ViewBag.MessageHead = "No. Of Sale Invoice Created  and item processed are " + a;
                //return View (dm.ToList ());
            }
            else
            {
                ViewBag.MessageHead = "No Sale items added. Some error might has been occurred. a=" + a;
                return(View(new SaleInvoice()));
            }
        }