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