Exemplo n.º 1
0
        public List <Company> Company_Paging(string CurentCompany, string CompanySize)
        {
            List <DataAccess.Company> list = new List <DataAccess.Company>();

            DataAccess.Company obj = new DataAccess.Company();
            DbCommand          cmd = db.GetStoredProcCommand("Companys_SelectPage", CurentCompany, CompanySize);

            using (IDataReader dr = db.ExecuteReader(cmd))
            {
                while (dr.Read())
                {
                    list.Add(obj.CompanyIDataReader(dr));
                }
                dr.Close();
                dr.Dispose();
            }
            return(list);
        }
Exemplo n.º 2
0
        public List <Company> Company_GetByLevel(string Level, int LevelLength)
        {
            List <DataAccess.Company> list = new List <DataAccess.Company>();

            DataAccess.Company obj = new DataAccess.Company();
            DbCommand          cmd = db.GetStoredProcCommand("sp_Company_GetByLevel", Level, LevelLength);

            using (IDataReader dr = db.ExecuteReader(cmd))
            {
                while (dr.Read())
                {
                    list.Add(obj.CompanyIDataReader(dr));
                }
                dr.Close();
                dr.Dispose();
            }
            return(list);
        }
Exemplo n.º 3
0
        public List <Company> Company_GetByAll()
        {
            List <DataAccess.Company> list = new List <DataAccess.Company>();

            DataAccess.Company obj = new DataAccess.Company();
            DbCommand          cmd = db.GetStoredProcCommand("Companys_SelectAll");

            using (IDataReader dr = db.ExecuteReader(cmd))
            {
                while (dr.Read())
                {
                    list.Add(obj.CompanyIDataReader(dr));
                }
                dr.Close();
                dr.Dispose();
            }
            return(list);
        }