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