Exemplo n.º 1
0
        private static void AddBlankRecord(CustomList <CompanyEntity> companyEntityCollection)
        {
            CompanyEntity newCompanyEntityCollection = new CompanyEntity();

            newCompanyEntityCollection._CompanyID = String.Empty;
            companyEntityCollection.Add(newCompanyEntityCollection);
        }
Exemplo n.º 2
0
        public static CustomList <CompanyEntity> GetAllCompanyEntityWithBlankRecode()
        {
            ConnectionManager          conManager = new ConnectionManager(ConnectionName.SysMan);
            CustomList <CompanyEntity> companyEntityCollection = new CustomList <CompanyEntity>();
            IDataReader  reader = null;
            const String sql    = "Select * From Company_Entity";

            AddBlankRecord(companyEntityCollection);
            try
            {
                conManager.OpenDataReader(sql, out reader);
                while (reader.Read())
                {
                    CompanyEntity newCompanyEntity = new CompanyEntity();
                    newCompanyEntity.SetData(reader);
                    companyEntityCollection.Add(newCompanyEntity);
                }
                reader.Close();
                return(companyEntityCollection);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                if (reader != null && !reader.IsClosed)
                {
                    reader.Close();
                }
            }
        }
Exemplo n.º 3
0
 private static void AddBlankRecord(CustomList<CompanyEntity> companyEntityCollection)
 {
     CompanyEntity newCompanyEntityCollection = new CompanyEntity();
     newCompanyEntityCollection._CompanyID = String.Empty;
     companyEntityCollection.Add(newCompanyEntityCollection);
 }
Exemplo n.º 4
0
 public static CustomList<CompanyEntity> GetAllCompanyEntityWithBlankRecode()
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.SysMan);
     CustomList<CompanyEntity> companyEntityCollection = new CustomList<CompanyEntity>();
     IDataReader reader = null;
     const String sql = "Select * From Company_Entity";
     AddBlankRecord(companyEntityCollection);
     try
     {
         conManager.OpenDataReader(sql, out reader);
         while (reader.Read())
         {
             CompanyEntity newCompanyEntity = new CompanyEntity();
             newCompanyEntity.SetData(reader);
             companyEntityCollection.Add(newCompanyEntity);
         }
         reader.Close();
         return companyEntityCollection;
     }
     catch (Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
 }