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