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