/// <summary> /// 获得数据列表 /// </summary> public List <MobileSoft.Model.Resources.Tb_Resources_ReleaseImages> DataTableToList(DataTable dt) { List <MobileSoft.Model.Resources.Tb_Resources_ReleaseImages> modelList = new List <MobileSoft.Model.Resources.Tb_Resources_ReleaseImages>(); int rowsCount = dt.Rows.Count; if (rowsCount > 0) { MobileSoft.Model.Resources.Tb_Resources_ReleaseImages model; for (int n = 0; n < rowsCount; n++) { model = new MobileSoft.Model.Resources.Tb_Resources_ReleaseImages(); //model.ReleaseImagesID=dt.Rows[n]["ReleaseImagesID"].ToString(); //model.ReleaseID=dt.Rows[n]["ReleaseID"].ToString(); model.ReleaseImagesUrl = dt.Rows[n]["ReleaseImagesUrl"].ToString(); model.ReleaseImagesData = dt.Rows[n]["ReleaseImagesData"].ToString(); if (dt.Rows[n]["ReleaseImagesUpdate"].ToString() != "") { model.ReleaseImagesUpdate = DateTime.Parse(dt.Rows[n]["ReleaseImagesUpdate"].ToString()); } if (dt.Rows[n]["ReleaseImagesIndex"].ToString() != "") { model.ReleaseImagesIndex = int.Parse(dt.Rows[n]["ReleaseImagesIndex"].ToString()); } if (dt.Rows[n]["IsDelete"].ToString() != "") { model.IsDelete = DateTime.Parse(dt.Rows[n]["IsDelete"].ToString()); } //model.BussId=dt.Rows[n]["BussId"].ToString(); modelList.Add(model); } } return(modelList); }
/// <summary> /// 更新一条数据 /// </summary> public void Update(MobileSoft.Model.Resources.Tb_Resources_ReleaseImages model) { dal.Update(model); }
/// <summary> /// 增加一条数据 /// </summary> public void Add(MobileSoft.Model.Resources.Tb_Resources_ReleaseImages model) { dal.Add(model); }