public bool Delete(ApiSupplier apiSupplier) { ISupplierManager SupplierManager = UnityResolver.Resolve <ISupplierManager>(); Supplier supplier = new Supplier { ID = apiSupplier.ID, name = apiSupplier.name, address = apiSupplier.address, company = apiSupplier.company, telephone = apiSupplier.telephone, CustomerID = apiSupplier.CustomerID }; return(SupplierManager.DeleteSupplier(supplier)); }
public bool Delete(ApiSupplier apiSupplier) { // string id = User.Identity.Name; ISupplierManager SupplierManager = UnityResolver.Resolve <ISupplierManager>(); Supplier supplier = new Supplier { ID = apiSupplier.ID, name = apiSupplier.name, address = apiSupplier.address, company = apiSupplier.company, telephone = apiSupplier.telephone, CustomerID = Helper.getCustID() }; return(SupplierManager.DeleteSupplier(supplier)); }
public ActionResult DeleteConfirmed(int id) { _store.DeleteSupplier(id); return(RedirectToAction("Index")); }