示例#1
0
        public ActionResult PriceSetup(PriceSetupRequest request)
        {
            var inventory = _inventoryService.GetById(request.InventoryId);

            if (inventory != null)
            {
                PriceSetup price = new PriceSetup()
                {
                    InventoryId = inventory.Id, SalesPrice = request.SalesPrice, PurchasePrice = inventory.PurchasePrice, Active = true, CreatedDate = DateTime.Now, CreatedBy = CurrentSession.GetCurrentSession().UserName
                };
                db.SavePrice(price);
                inventory.SalesPrice = request.SalesPrice;
                _inventoryService.Update(inventory);
            }
            return(Json("Saved Sucess!!", JsonRequestBehavior.AllowGet));
        }
示例#2
0
 public PriceSetup SavePrice(PriceSetup cus)
 {
     return(_priceSetupService.Save(cus));
 }