コード例 #1
0
        public List <MotelTypeInfo> MotelTypeInfo_GetByLevel(string Level, int LevelLength)
        {
            List <DataAccess.MotelTypeInfo> list = new List <DataAccess.MotelTypeInfo>();

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

            using (IDataReader dr = db.ExecuteReader(cmd))
            {
                while (dr.Read())
                {
                    list.Add(obj.MotelTypeInfoIDataReader(dr));
                }
                dr.Close();
                dr.Dispose();
            }
            return(list);
        }
コード例 #2
0
        public List <MotelTypeInfo> MotelTypeInfo_GetByAll()
        {
            List <DataAccess.MotelTypeInfo> list = new List <DataAccess.MotelTypeInfo>();

            DataAccess.MotelTypeInfo obj = new DataAccess.MotelTypeInfo();
            DbCommand cmd = db.GetStoredProcCommand("Group_SelectAll");

            using (IDataReader dr = db.ExecuteReader(cmd))
            {
                while (dr.Read())
                {
                    list.Add(obj.MotelTypeInfoIDataReader(dr));
                }
                dr.Close();
                dr.Dispose();
            }
            return(list);
        }
コード例 #3
0
        public List <MotelTypeInfo> MotelTypeInfo_Paging(string CurentMotelTypeInfo, string MotelTypeInfoSize)
        {
            List <DataAccess.MotelTypeInfo> list = new List <DataAccess.MotelTypeInfo>();

            DataAccess.MotelTypeInfo obj = new DataAccess.MotelTypeInfo();
            DbCommand cmd = db.GetStoredProcCommand("Group_SelectPage", CurentMotelTypeInfo, MotelTypeInfoSize);

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