Пример #1
0
        public static CustomList <CmnDocListFormatDetail> GetAllCmnDocListFormatDetail()
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
            CustomList <CmnDocListFormatDetail> CmnDocListFormatDetailCollection = new CustomList <CmnDocListFormatDetail>();
            IDataReader  reader = null;
            const String sql    = "select *from CmnDocListFormatDetail";

            try
            {
                conManager.OpenDataReader(sql, out reader);
                while (reader.Read())
                {
                    CmnDocListFormatDetail newCmnDocListFormatDetail = new CmnDocListFormatDetail();
                    newCmnDocListFormatDetail.SetData(reader);
                    CmnDocListFormatDetailCollection.Add(newCmnDocListFormatDetail);
                }
                return(CmnDocListFormatDetailCollection);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                if (reader != null && !reader.IsClosed)
                {
                    reader.Close();
                }
            }
        }
Пример #2
0
 public static CustomList<CmnDocListFormatDetail> GetAllDocListFormat_Detail(Int32 docListFormatID)
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
     CustomList<CmnDocListFormatDetail> DocListFormat_DetailCollection = new CustomList<CmnDocListFormatDetail>();
     IDataReader reader = null;
     String sql = "Select * from CmnDocListFormatDetail";// where BankKey=" + bankKey;
     try
     {
         conManager.OpenDataReader(sql, out reader);
         while (reader.Read())
         {
             CmnDocListFormatDetail newCmnDocListFormat_Detail = new CmnDocListFormatDetail();
             newCmnDocListFormat_Detail.SetData(reader);
             DocListFormat_DetailCollection.Add(newCmnDocListFormat_Detail);
         }
         return DocListFormat_DetailCollection;
     }
     catch (Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
 }