Пример #1
0
        private void DeleteSupplier(Model.Supplier.Supplier supplier)
        {
            if (supplier == null)
            {
                throw new ArgumentNullException("supplier", "Supplier");
            }

            _supplierDataAccess.DeleteSupplier(supplier);
        }
Пример #2
0
 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"));
 }