Ejemplo n.º 1
0
        public List <CustomerInfo> Customer_GetByAll()
        {
            List <DataAccess.CustomerInfo> list = new List <DataAccess.CustomerInfo>();

            DataAccess.CustomerInfo obj = new DataAccess.CustomerInfo();
            DbCommand cmd = db.GetStoredProcCommand("CustomerInfos_SelectAll");

            using (IDataReader dr = db.ExecuteReader(cmd))
            {
                while (dr.Read())
                {
                    list.Add(obj.CustomerIDataReader(dr));
                }
                dr.Close();
                dr.Dispose();
            }
            return(list);
        }
Ejemplo n.º 2
0
        public List <CustomerInfo> Customer_Paging(string CurentCustomerInfo, string CustomerInfoSize)
        {
            List <DataAccess.CustomerInfo> list = new List <DataAccess.CustomerInfo>();

            DataAccess.CustomerInfo obj = new DataAccess.CustomerInfo();
            DbCommand cmd = db.GetStoredProcCommand("CustomerInfos_SelectPage", CurentCustomerInfo, CustomerInfoSize);

            using (IDataReader dr = db.ExecuteReader(cmd))
            {
                while (dr.Read())
                {
                    list.Add(obj.CustomerIDataReader(dr));
                }
                dr.Close();
                dr.Dispose();
            }
            return(list);
        }
Ejemplo n.º 3
0
        public List <CustomerInfo> Customer_GetByLevel(string Level, int LevelLength)
        {
            List <DataAccess.CustomerInfo> list = new List <DataAccess.CustomerInfo>();

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

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