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