/// <summary> /// 功能描述 : 获得[tblEQISE_Item]表的所有记录 /// 创建者 : Auto Generator /// 创建日期 : 2010-01-15 /// 修改者 : /// 修改日期 : /// 修改原因 : /// </summary> /// <returns>DataTable</returns> public DataTable GetAllData() { try { DataTable tblData = new DataTable(); usp_tblEQISE_Item_ByAll uspByAll = new usp_tblEQISE_Item_ByAll(); tblData = uspByAll.ExecDataTable(); if (tblData != null) { tblData.TableName = "tblEQISE_Item"; return(tblData); } else { throw new Exception("取得记录失败,未找到对应的记录"); } } catch (DBOpenException e) { throw new GetAllException("打开数据库连接失败", "RuletblEQISE_Item", "GetAllData", ""); } catch (DBQueryException e) { throw new GetAllException("执行Sql语句失败", "RuletblEQISE_Item", "GetAllData", ""); } catch (Exception e) { throw new GetAllException(e.Message, "RuletblEQISE_Item", "GetAllData", ""); } }
/// <summary> /// 功能描述 : 获得[tblEQISE_Item]表的所有记录 /// 创建者 : Auto Generator /// 创建日期 : 2010-01-15 /// 修改者 : /// 修改日期 : /// 修改原因 : /// </summary> /// <returns>IList<tblEQISE_Item></returns> public IList <tblEQISE_Item> GetAllList() { try { DataTable tblData = new DataTable(); usp_tblEQISE_Item_ByAll uspByAll = new usp_tblEQISE_Item_ByAll(); tblData = uspByAll.ExecDataTable(); if (tblData != null) { IList <tblEQISE_Item> listAll = new List <tblEQISE_Item>(); for (int i = 0; i < tblData.Rows.Count; i++) { DataTable tblTmp = tblData.Clone(); tblTmp.Rows.Add(tblData.Rows[i].ItemArray); tblEQISE_Item objData = new tblEQISE_Item(); objData.MetaDataTable = tblTmp; listAll.Add(objData); } return(listAll); } else { throw new Exception("取得记录失败,未找到对应的记录"); } } catch (DBOpenException e) { throw new GetListException("打开数据库连接失败", "RuletblEQISE_Item", "GetAllList", ""); } catch (DBQueryException e) { throw new GetListException("执行Sql语句失败", "RuletblEQISE_Item", "GetAllList", ""); } catch (Exception e) { throw new GetListException(e.Message, "RuletblEQISE_Item", "GetAllList", ""); } }