Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        public ActionResult UpdateStock(CrystalH2OApp.DataLayer.Entities.Inventory inventory)
        {
            _inventory.UpdateStock(inventory);

            return RedirectToAction("Index", "Inventory");
        }
Ejemplo n.º 3
0
 public void UpdateStockDetail(CrystalH2OApp.DataLayer.Entities.Inventory inventory)
 {
     _repo.UpdateStockDetails(inventory);
 }
Ejemplo n.º 4
0
 public void UpdateStock(CrystalH2OApp.DataLayer.Entities.Inventory inventory)
 {
     _inventoryLogic.UpdateStockDetail(inventory);
 }
Ejemplo n.º 5
0
 public void AddNewStock(CrystalH2OApp.DataLayer.Entities.Inventory inventory)
 {
     _inventoryLogic.AddNewStock(inventory);
 }
Ejemplo n.º 6
0
        public JsonResult AddNewCustomer(CrystalH2OApp.DataLayer.Entities.Customer customer)
        {
            _customer.AddNewCustomer(customer);

            return Json(new { status = 1, message = "New Customer added successfully!" });
        }