public RealEstateTypeInfo RealEstateTypeInfoIDataReader(IDataReader dr)
        {
            DataAccess.RealEstateTypeInfo obj = new DataAccess.RealEstateTypeInfo();
            obj.RealEstateTypeID   = (dr["RealEstateTypeID"] is DBNull) ? string.Empty : dr["RealEstateTypeID"].ToString();
            obj.NameRealEstateType = (dr["NameRealEstateType"] is DBNull) ? string.Empty : dr["NameRealEstateType"].ToString();
            obj.Description        = (dr["Description"] is DBNull) ? string.Empty : dr["Description"].ToString();


            return(obj);
        }
        public List <RealEstateTypeInfo> RealEstateTypeInfo_GetByLevel(string Level, int LevelLength)
        {
            List <DataAccess.RealEstateTypeInfo> list = new List <DataAccess.RealEstateTypeInfo>();

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

            using (IDataReader dr = db.ExecuteReader(cmd))
            {
                while (dr.Read())
                {
                    list.Add(obj.RealEstateTypeInfoIDataReader(dr));
                }
                dr.Close();
                dr.Dispose();
            }
            return(list);
        }
        public List <RealEstateTypeInfo> RealEstateTypeInfo_GetByAll()
        {
            List <DataAccess.RealEstateTypeInfo> list = new List <DataAccess.RealEstateTypeInfo>();

            DataAccess.RealEstateTypeInfo obj = new DataAccess.RealEstateTypeInfo();
            DbCommand cmd = db.GetStoredProcCommand("RealEstateType_SelectAll");

            using (IDataReader dr = db.ExecuteReader(cmd))
            {
                while (dr.Read())
                {
                    list.Add(obj.RealEstateTypeInfoIDataReader(dr));
                }
                dr.Close();
                dr.Dispose();
            }
            return(list);
        }
        public List <RealEstateTypeInfo> RealEstateTypeInfo_Paging(string CurentRealEstateTypeInfo, string RealEstateTypeInfoSize)
        {
            List <DataAccess.RealEstateTypeInfo> list = new List <DataAccess.RealEstateTypeInfo>();

            DataAccess.RealEstateTypeInfo obj = new DataAccess.RealEstateTypeInfo();
            DbCommand cmd = db.GetStoredProcCommand("RealEstateType_SelectPage", CurentRealEstateTypeInfo, RealEstateTypeInfoSize);

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