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));
        }
示例#3
0
 public ActionResult DeleteConfirmed(int id)
 {
     _store.DeleteSupplier(id);
     return(RedirectToAction("Index"));
 }