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