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