예제 #1
0
        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"));
        }
예제 #2
0
 public ActionResult DeleteShipper(int id)
 {
     sRep.Delete(sRep.Find(id));
     return(RedirectToAction("ShipperList"));
 }
예제 #3
0
 public IHttpActionResult Delete(int id)
 {
     shipperRepository.Delete(id);
     return(StatusCode(HttpStatusCode.NoContent));
 }
 public void DeleteSelectedShipper(Shipper item)
 {
     shipperRepository.Delete(item);
 }