/// <summary> /// 获得数据列表 /// </summary> public List <DigiPower.Onlinecol.Standard.Model.T_FileList_CellRpt_MDL> DataTableToList(DataTable dt) { List <DigiPower.Onlinecol.Standard.Model.T_FileList_CellRpt_MDL> modelList = new List <DigiPower.Onlinecol.Standard.Model.T_FileList_CellRpt_MDL>(); int rowsCount = dt.Rows.Count; if (rowsCount > 0) { DigiPower.Onlinecol.Standard.Model.T_FileList_CellRpt_MDL model; for (int n = 0; n < rowsCount; n++) { model = new DigiPower.Onlinecol.Standard.Model.T_FileList_CellRpt_MDL(); if (dt.Rows[n]["FileList_CellRptID"].ToString() != "") { model.FileList_CellRptID = int.Parse(dt.Rows[n]["FileList_CellRptID"].ToString()); } if (dt.Rows[n]["FileListID"].ToString() != "") { model.FileListID = int.Parse(dt.Rows[n]["FileListID"].ToString()); } if (dt.Rows[n]["recID"].ToString() != "") { model.recID = int.Parse(dt.Rows[n]["recID"].ToString()); } model.Title = dt.Rows[n]["Title"].ToString(); model.CellFilePath = dt.Rows[n]["CellFilePath"].ToString(); if (dt.Rows[n]["OrderIndex"].ToString() != "") { model.OrderIndex = int.Parse(dt.Rows[n]["OrderIndex"].ToString()); } modelList.Add(model); } } return(modelList); }
/// <summary> /// 更新一条数据 /// </summary> public void Update(DigiPower.Onlinecol.Standard.Model.T_FileList_CellRpt_MDL model) { dal.Update(model); }
/// <summary> /// 增加一条数据 /// </summary> public int Add(DigiPower.Onlinecol.Standard.Model.T_FileList_CellRpt_MDL model) { return(dal.Add(model)); }