public ActionResult RemoveShipper(Administrators admin) { Shipper shipper = null; using (MySqlConnection conn = DBUtils.GetConnection()) { ShipperRepository repo = new ShipperRepository(conn); shipper = repo.GetById(admin.ShipperID.ToString()); if (shipper != null) { repo.Delete(shipper.ShipperID.ToString()); } } return(View("Administrator")); }
public ActionResult DeleteShipper(int id) { sRep.Delete(sRep.Find(id)); return(RedirectToAction("ShipperList")); }
public IHttpActionResult Delete(int id) { shipperRepository.Delete(id); return(StatusCode(HttpStatusCode.NoContent)); }
public void DeleteSelectedShipper(Shipper item) { shipperRepository.Delete(item); }