Exemple #1
0
        public PriceType GetPriceType(int PriceTypeID)
        {
            var result = new PriceType();

            var response = GetContext().PriceTypes
                           .Where(c => c.PriceTypeID == PriceTypeID)
                           .FirstOrDefault();

            if (response == null)
            {
                return(null);
            }

            result.PriceTypeID          = response.PriceTypeID;
            result.PriceTypeDescription = response.PriceTypeDescription;

            return(result);
        }
Exemple #2
0
        public PriceType GetPriceType(int PriceTypeID)
        {
            var result = new PriceType();

            using (var reader = GetContext().GetReader(@"
                    SELECT
                        *
                    FROM PriceTypes
                    WHERE PriceTypeID = {0}
                ", PriceTypeID))
            {
                if (!reader.Read())
                {
                    return(null);
                }

                result.PriceTypeID          = reader.GetInt32("PriceTypeID");
                result.PriceTypeDescription = reader.GetString("PriceTypeDescription");
            }

            return(result);
        }
Exemple #3
0
        public PriceType GetPriceType(int PriceTypeID)
        {
            var result = new PriceType();

            using (var reader = GetContext().GetReader(@"
                    SELECT
                        *
                    FROM PriceTypes
                    WHERE PriceTypeID = {0}
                ", PriceTypeID))
            {
                if(!reader.Read()) return null;

                result.PriceTypeID = reader.GetInt32("PriceTypeID");
                result.PriceTypeDescription = reader.GetString("PriceTypeDescription");
            }

            return result;
        }
Exemple #4
0
        public PriceType GetPriceType(int PriceTypeID)
        {
            var result = new PriceType();

            var response = GetContext().PriceTypes
                .Where(c => c.PriceTypeID == PriceTypeID)
                .FirstOrDefault();
            if(response == null) return null;

            result.PriceTypeID = response.PriceTypeID;
            result.PriceTypeDescription = response.PriceTypeDescription;

            return result;
        }