/// <summary> /// 获得数据列表 /// </summary> public List <Dianda.Model.USER_EducationLevel_Base> DataTableToList(DataTable dt) { List <Dianda.Model.USER_EducationLevel_Base> modelList = new List <Dianda.Model.USER_EducationLevel_Base>(); int rowsCount = dt.Rows.Count; if (rowsCount > 0) { Dianda.Model.USER_EducationLevel_Base model; for (int n = 0; n < rowsCount; n++) { model = new Dianda.Model.USER_EducationLevel_Base(); if (dt.Rows[n]["ID"].ToString() != "") { model.ID = int.Parse(dt.Rows[n]["ID"].ToString()); } model.EducationLevel = dt.Rows[n]["EducationLevel"].ToString(); if (dt.Rows[n]["DELFLAG"].ToString() != "") { model.DELFLAG = int.Parse(dt.Rows[n]["DELFLAG"].ToString()); } modelList.Add(model); } } return(modelList); }
/// <summary> /// 更新一条数据 /// </summary> public void Update(Dianda.Model.USER_EducationLevel_Base model) { dal.Update(model); }
/// <summary> /// 增加一条数据 /// </summary> public int Add(Dianda.Model.USER_EducationLevel_Base model) { return(dal.Add(model)); }