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