public ActionResult AddCer(Car cha) { var AddCer = cha.Add(); if (AddCer) { return Content("添加成功"); } else { return Content("添加失败"); } }
public ActionResult EditChe(Car car) { var sun = car.Update(car.CarId, "CarId"); if (sun) { return Content("修改成功"); } else { return Content("修改失败"); } }
/// <summary> /// 删除车辆信息 /// </summary> /// <param name="id">车ID</param> /// <returns></returns> public ActionResult DelectChe(int id) { var delect = new Car { CarId = id }.Remove(); if (delect) { return Content("删除成功"); } else { return Content("删除失败"); } }