private void DeleteSupplier(Model.Supplier.Supplier supplier) { if (supplier == null) { throw new ArgumentNullException("supplier", "Supplier"); } _supplierDataAccess.DeleteSupplier(supplier); }
public ActionResult DeleteSupplier(int supplierID) { if ((string)Session["roleName"] == "admin") { // pass the id to the method then to the DAL _supplierDataAccess.DeleteSupplier(supplierID); } // return the view suppler page return(RedirectToAction("ViewSuppliers")); }