コード例 #1
0
ファイル: BankAccountType.cs プロジェクト: samnuriu13/APIXERP
 public static CustomList<CmnBankAccountType> GetAllCmnBankAccountType()
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
     CustomList<CmnBankAccountType> CmnBankAccountTypeCollection = new CustomList<CmnBankAccountType>();
     IDataReader reader = null;
     const String sql = "select * from CmnBankAccountType";
     try
     {
         conManager.OpenDataReader(sql, out reader);
         while (reader.Read())
         {
             CmnBankAccountType newCmnBankAccountType = new CmnBankAccountType();
             newCmnBankAccountType.SetData(reader);
             CmnBankAccountTypeCollection.Add(newCmnBankAccountType);
         }
         return CmnBankAccountTypeCollection;
     }
     catch(Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
 }
コード例 #2
0
ファイル: BankAccountType.cs プロジェクト: samnuriu13/APIXERP
        public static CustomList <CmnBankAccountType> GetAllCmnBankAccountType()
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
            CustomList <CmnBankAccountType> CmnBankAccountTypeCollection = new CustomList <CmnBankAccountType>();
            IDataReader  reader = null;
            const String sql    = "select * from CmnBankAccountType";

            try
            {
                conManager.OpenDataReader(sql, out reader);
                while (reader.Read())
                {
                    CmnBankAccountType newCmnBankAccountType = new CmnBankAccountType();
                    newCmnBankAccountType.SetData(reader);
                    CmnBankAccountTypeCollection.Add(newCmnBankAccountType);
                }
                return(CmnBankAccountTypeCollection);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                if (reader != null && !reader.IsClosed)
                {
                    reader.Close();
                }
            }
        }