/// <summary> /// 获得数据列表 /// </summary> public List <MobileSoft.Model.Information.Tb_Information_WebEditor> DataTableToList(DataTable dt) { List <MobileSoft.Model.Information.Tb_Information_WebEditor> modelList = new List <MobileSoft.Model.Information.Tb_Information_WebEditor>(); int rowsCount = dt.Rows.Count; if (rowsCount > 0) { MobileSoft.Model.Information.Tb_Information_WebEditor model; for (int n = 0; n < rowsCount; n++) { model = new MobileSoft.Model.Information.Tb_Information_WebEditor(); //model.ID=dt.Rows[n]["ID"].ToString(); //model.BussId=dt.Rows[n]["BussId"].ToString(); model.WebContent = dt.Rows[n]["WebContent"].ToString(); model.Image1 = dt.Rows[n]["Image1"].ToString(); model.Image2 = dt.Rows[n]["Image2"].ToString(); model.Image3 = dt.Rows[n]["Image3"].ToString(); modelList.Add(model); } } return(modelList); }
/// <summary> /// 更新一条数据 /// </summary> public void Update(MobileSoft.Model.Information.Tb_Information_WebEditor model) { dal.Update(model); }
/// <summary> /// 增加一条数据 /// </summary> public long Add(MobileSoft.Model.Information.Tb_Information_WebEditor model) { return(dal.Add(model)); }