public ResponseStatus DeleteActivity(HttpRequestBase req) { ResponseStatus resp = ResponseStatus.NONE; int id; bool isclose = false; activityDal = new ActivityDAL(); for (int i = 0; i < req.Form.Count; ++i) { id = Convert.ToInt32(req.Form.AllKeys[i]); if (i == req.Form.Count - 1) { isclose = true; } if (activityDal.Delete(id, isclose)) { resp = ResponseStatus.SUCCESS; } else { resp = ResponseStatus.FAILED; break; } } activityDal.ReturnUnitToPool(); return(resp); }
public virtual void Delete(int id) { ActivityDAL.Delete(id); }