/// <summary> /// 获得数据列表 /// </summary> public List <tdps.Model.DLNSRXX> DataTableToList(DataTable dt) { List <tdps.Model.DLNSRXX> modelList = new List <tdps.Model.DLNSRXX>(); int rowsCount = dt.Rows.Count; if (rowsCount > 0) { tdps.Model.DLNSRXX model; for (int n = 0; n < rowsCount; n++) { model = new tdps.Model.DLNSRXX(); if (dt.Rows[n]["DLZH"].ToString() != "") { model.DLZH = dt.Rows[n]["DLZH"].ToString(); } model.NSRSBH = dt.Rows[n]["NSRSBH"].ToString(); NSRXX nsrxx = new NSRXX(); nsrxx.NSRMC = dt.Rows[n]["NSRMC"].ToString(); model.NSRXX = nsrxx; modelList.Add(model); } } return(modelList); }
/// <summary> /// 更新一条数据 /// </summary> public void Update(tdps.Model.DLNSRXX model, object trans) { dal.Update(model, trans); }
/// <summary> /// 更新一条数据 /// </summary> public void Update(tdps.Model.DLNSRXX model) { dal.Update(model); }
/// <summary> /// 增加一条数据 /// </summary> public void Add(tdps.Model.DLNSRXX model, object trans) { dal.Add(model, trans); }
/// <summary> /// 增加一条数据 /// </summary> public void Add(tdps.Model.DLNSRXX model) { dal.Add(model); }