public void AddNewStock(CrystalH2OApp.DataLayer.Entities.Inventory inventory) { if (inventory != null) { if (string.IsNullOrEmpty(inventory.StockName) || inventory.StockName == null) throw new NullReferenceException("Provide stock name."); if (inventory.UnitPrice == 0) throw new ItemValueException("Unit Price must be greater than or equal to 1."); } _repo.AddStock(inventory); }
public ActionResult UpdateStock(CrystalH2OApp.DataLayer.Entities.Inventory inventory) { _inventory.UpdateStock(inventory); return RedirectToAction("Index", "Inventory"); }
public void UpdateStockDetail(CrystalH2OApp.DataLayer.Entities.Inventory inventory) { _repo.UpdateStockDetails(inventory); }
public void UpdateStock(CrystalH2OApp.DataLayer.Entities.Inventory inventory) { _inventoryLogic.UpdateStockDetail(inventory); }
public void AddNewStock(CrystalH2OApp.DataLayer.Entities.Inventory inventory) { _inventoryLogic.AddNewStock(inventory); }
public JsonResult AddNewCustomer(CrystalH2OApp.DataLayer.Entities.Customer customer) { _customer.AddNewCustomer(customer); return Json(new { status = 1, message = "New Customer added successfully!" }); }