Exemplo n.º 1
0
        private DBMeasureDimension GetMeasureDimensionFromReader(IDataReader dataReader)
        {
            var item = new DBMeasureDimension();

            item.MeasureDimensionId = NopSqlDataHelper.GetInt(dataReader, "MeasureDimensionID");
            item.Name          = NopSqlDataHelper.GetString(dataReader, "Name");
            item.SystemKeyword = NopSqlDataHelper.GetString(dataReader, "SystemKeyword");
            item.Ratio         = NopSqlDataHelper.GetDecimal(dataReader, "Ratio");
            item.DisplayOrder  = NopSqlDataHelper.GetInt(dataReader, "DisplayOrder");
            return(item);
        }
Exemplo n.º 2
0
        private DBTaxRate GetTaxRateFromReader(IDataReader dataReader)
        {
            var item = new DBTaxRate();

            item.TaxRateId       = NopSqlDataHelper.GetInt(dataReader, "TaxRateID");
            item.TaxCategoryId   = NopSqlDataHelper.GetInt(dataReader, "TaxCategoryID");
            item.CountryId       = NopSqlDataHelper.GetInt(dataReader, "CountryID");
            item.StateProvinceId = NopSqlDataHelper.GetInt(dataReader, "StateProvinceID");
            item.Zip             = NopSqlDataHelper.GetString(dataReader, "Zip");
            item.Percentage      = NopSqlDataHelper.GetDecimal(dataReader, "Percentage");
            return(item);
        }
Exemplo n.º 3
0
        private DBTaxRate GetTaxRateFromReader(IDataReader dataReader)
        {
            DBTaxRate taxRate = new DBTaxRate();

            taxRate.TaxRateID       = NopSqlDataHelper.GetInt(dataReader, "TaxRateID");
            taxRate.TaxCategoryID   = NopSqlDataHelper.GetInt(dataReader, "TaxCategoryID");
            taxRate.CountryID       = NopSqlDataHelper.GetInt(dataReader, "CountryID");
            taxRate.StateProvinceID = NopSqlDataHelper.GetInt(dataReader, "StateProvinceID");
            taxRate.Zip             = NopSqlDataHelper.GetString(dataReader, "Zip");
            taxRate.Percentage      = NopSqlDataHelper.GetDecimal(dataReader, "Percentage");
            return(taxRate);
        }
        private DBShippingByWeight GetShippingByWeightFromReader(IDataReader dataReader)
        {
            DBShippingByWeight shippingByWeight = new DBShippingByWeight();

            shippingByWeight.ShippingByWeightID = NopSqlDataHelper.GetInt(dataReader, "ShippingByWeightID");
            shippingByWeight.ShippingMethodID   = NopSqlDataHelper.GetInt(dataReader, "ShippingMethodID");
            shippingByWeight.From                     = NopSqlDataHelper.GetDecimal(dataReader, "From");
            shippingByWeight.To                       = NopSqlDataHelper.GetDecimal(dataReader, "To");
            shippingByWeight.UsePercentage            = NopSqlDataHelper.GetBoolean(dataReader, "UsePercentage");
            shippingByWeight.ShippingChargePercentage = NopSqlDataHelper.GetDecimal(dataReader, "ShippingChargePercentage");
            shippingByWeight.ShippingChargeAmount     = NopSqlDataHelper.GetDecimal(dataReader, "ShippingChargeAmount");
            return(shippingByWeight);
        }
Exemplo n.º 5
0
        private DBShippingByTotal GetShippingByTotalFromReader(IDataReader dataReader)
        {
            var item = new DBShippingByTotal();

            item.ShippingByTotalId = NopSqlDataHelper.GetInt(dataReader, "ShippingByTotalID");
            item.ShippingMethodId  = NopSqlDataHelper.GetInt(dataReader, "ShippingMethodID");
            item.From                     = NopSqlDataHelper.GetDecimal(dataReader, "From");
            item.To                       = NopSqlDataHelper.GetDecimal(dataReader, "To");
            item.UsePercentage            = NopSqlDataHelper.GetBoolean(dataReader, "UsePercentage");
            item.ShippingChargePercentage = NopSqlDataHelper.GetDecimal(dataReader, "ShippingChargePercentage");
            item.ShippingChargeAmount     = NopSqlDataHelper.GetDecimal(dataReader, "ShippingChargeAmount");
            return(item);
        }
        private DBShippingByTotal GetShippingByTotalFromReader(IDataReader dataReader)
        {
            DBShippingByTotal shippingByTotal = new DBShippingByTotal();

            shippingByTotal.ShippingByTotalID = NopSqlDataHelper.GetInt(dataReader, "ShippingByTotalID");
            shippingByTotal.ShippingMethodID  = NopSqlDataHelper.GetInt(dataReader, "ShippingMethodID");
            shippingByTotal.From                     = NopSqlDataHelper.GetDecimal(dataReader, "From");
            shippingByTotal.To                       = NopSqlDataHelper.GetDecimal(dataReader, "To");
            shippingByTotal.UsePercentage            = NopSqlDataHelper.GetBoolean(dataReader, "UsePercentage");
            shippingByTotal.ShippingChargePercentage = NopSqlDataHelper.GetDecimal(dataReader, "ShippingChargePercentage");
            shippingByTotal.ShippingChargeAmount     = NopSqlDataHelper.GetDecimal(dataReader, "ShippingChargeAmount");
            return(shippingByTotal);
        }
Exemplo n.º 7
0
        private DBProductVariantAttributeValue GetProductVariantAttributeValueFromReader(IDataReader dataReader)
        {
            DBProductVariantAttributeValue productVariantAttributeValue = new DBProductVariantAttributeValue();

            productVariantAttributeValue.ProductVariantAttributeValueID = NopSqlDataHelper.GetInt(dataReader, "ProductVariantAttributeValueID");
            productVariantAttributeValue.ProductVariantAttributeID      = NopSqlDataHelper.GetInt(dataReader, "ProductVariantAttributeID");
            productVariantAttributeValue.Name             = NopSqlDataHelper.GetString(dataReader, "Name");
            productVariantAttributeValue.PriceAdjustment  = NopSqlDataHelper.GetDecimal(dataReader, "PriceAdjustment");
            productVariantAttributeValue.WeightAdjustment = NopSqlDataHelper.GetDecimal(dataReader, "WeightAdjustment");
            productVariantAttributeValue.IsPreSelected    = NopSqlDataHelper.GetBoolean(dataReader, "IsPreSelected");
            productVariantAttributeValue.DisplayOrder     = NopSqlDataHelper.GetInt(dataReader, "DisplayOrder");
            return(productVariantAttributeValue);
        }
        private DBCheckoutAttributeValue GetCheckoutAttributeValueFromReader(IDataReader dataReader)
        {
            var item = new DBCheckoutAttributeValue();

            item.CheckoutAttributeValueId = NopSqlDataHelper.GetInt(dataReader, "CheckoutAttributeValueID");
            item.CheckoutAttributeId      = NopSqlDataHelper.GetInt(dataReader, "CheckoutAttributeID");
            item.Name             = NopSqlDataHelper.GetString(dataReader, "Name");
            item.PriceAdjustment  = NopSqlDataHelper.GetDecimal(dataReader, "PriceAdjustment");
            item.WeightAdjustment = NopSqlDataHelper.GetDecimal(dataReader, "WeightAdjustment");
            item.IsPreSelected    = NopSqlDataHelper.GetBoolean(dataReader, "IsPreSelected");
            item.DisplayOrder     = NopSqlDataHelper.GetInt(dataReader, "DisplayOrder");
            return(item);
        }
        private DBShippingByWeightAndCountry GetShippingByWeightAndCountryFromReader(IDataReader dataReader)
        {
            DBShippingByWeightAndCountry shippingByWeightAndCountry = new DBShippingByWeightAndCountry();

            shippingByWeightAndCountry.ShippingByWeightAndCountryID = NopSqlDataHelper.GetInt(dataReader, "ShippingByWeightAndCountryID");
            shippingByWeightAndCountry.ShippingMethodID             = NopSqlDataHelper.GetInt(dataReader, "ShippingMethodID");
            shippingByWeightAndCountry.CountryID                = NopSqlDataHelper.GetInt(dataReader, "CountryID");
            shippingByWeightAndCountry.From                     = NopSqlDataHelper.GetDecimal(dataReader, "From");
            shippingByWeightAndCountry.To                       = NopSqlDataHelper.GetDecimal(dataReader, "To");
            shippingByWeightAndCountry.UsePercentage            = NopSqlDataHelper.GetBoolean(dataReader, "UsePercentage");
            shippingByWeightAndCountry.ShippingChargePercentage = NopSqlDataHelper.GetDecimal(dataReader, "ShippingChargePercentage");
            shippingByWeightAndCountry.ShippingChargeAmount     = NopSqlDataHelper.GetDecimal(dataReader, "ShippingChargeAmount");
            return(shippingByWeightAndCountry);
        }
Exemplo n.º 10
0
 private DBCurrency GetCurrencyFromReader(IDataReader dataReader)
 {
     DBCurrency currency = new DBCurrency();
     currency.CurrencyID = NopSqlDataHelper.GetInt(dataReader, "CurrencyID");
     currency.Name = NopSqlDataHelper.GetString(dataReader, "Name");
     currency.CurrencyCode = NopSqlDataHelper.GetString(dataReader, "CurrencyCode");
     currency.Rate = NopSqlDataHelper.GetDecimal(dataReader, "Rate");
     currency.DisplayLocale = NopSqlDataHelper.GetString(dataReader, "DisplayLocale");
     currency.CustomFormatting = NopSqlDataHelper.GetString(dataReader, "CustomFormatting");
     currency.Published = NopSqlDataHelper.GetBoolean(dataReader, "Published");
     currency.DisplayOrder = NopSqlDataHelper.GetInt(dataReader, "DisplayOrder");
     currency.CreatedOn = NopSqlDataHelper.GetUtcDateTime(dataReader, "CreatedOn");
     currency.UpdatedOn = NopSqlDataHelper.GetUtcDateTime(dataReader, "UpdatedOn");
     return currency;
 }
Exemplo n.º 11
0
        private DBShoppingCartItem GetShoppingCartItemFromReader(IDataReader dataReader)
        {
            var item = new DBShoppingCartItem();

            item.ShoppingCartItemId   = NopSqlDataHelper.GetInt(dataReader, "ShoppingCartItemID");
            item.ShoppingCartTypeId   = NopSqlDataHelper.GetInt(dataReader, "ShoppingCartTypeID");
            item.CustomerSessionGuid  = NopSqlDataHelper.GetGuid(dataReader, "CustomerSessionGUID");
            item.ProductVariantId     = NopSqlDataHelper.GetInt(dataReader, "ProductVariantID");
            item.AttributesXml        = NopSqlDataHelper.GetString(dataReader, "AttributesXML");
            item.CustomerEnteredPrice = NopSqlDataHelper.GetDecimal(dataReader, "CustomerEnteredPrice");
            item.Quantity             = NopSqlDataHelper.GetInt(dataReader, "Quantity");
            item.CreatedOn            = NopSqlDataHelper.GetUtcDateTime(dataReader, "CreatedOn");
            item.UpdatedOn            = NopSqlDataHelper.GetUtcDateTime(dataReader, "UpdatedOn");
            return(item);
        }
Exemplo n.º 12
0
        private void BindData()
        {
            //pending
            decimal os_pendingTotalSum = decimal.Zero;
            int     os_pendingCount    = 0;

            using (IDataReader orders_os_pending = OrderManager.GetOrderReport(OrderStatusEnum.Pending, null, null))
            {
                while (orders_os_pending.Read())
                {
                    os_pendingTotalSum = NopSqlDataHelper.GetDecimal(orders_os_pending, "Total");
                    os_pendingCount    = NopSqlDataHelper.GetInt(orders_os_pending, "Count");
                }
                lblTotalIncomplete.Text      = os_pendingCount.ToString();
                lblTotalIncompleteValue.Text = PriceHelper.FormatPrice(os_pendingTotalSum, true, false);
            }

            //not paid
            decimal ps_pendingTotalSum = decimal.Zero;
            int     ps_pendingCount    = 0;

            using (IDataReader orders_ps_pending = OrderManager.GetOrderReport(null, PaymentStatusEnum.Pending, null))
            {
                while (orders_ps_pending.Read())
                {
                    ps_pendingTotalSum = NopSqlDataHelper.GetDecimal(orders_ps_pending, "Total");
                    ps_pendingCount    = NopSqlDataHelper.GetInt(orders_ps_pending, "Count");
                }
                lblTotalUnpaid.Text      = ps_pendingCount.ToString();
                lblTotalUnpaidValue.Text = PriceHelper.FormatPrice(ps_pendingTotalSum, true, false);
            }

            //not shipped
            decimal ss_pendingTotalSum = decimal.Zero;
            int     ss_pendingCount    = 0;

            using (IDataReader orders_ss_pending = OrderManager.GetOrderReport(null, null, ShippingStatusEnum.NotYetShipped))
            {
                while (orders_ss_pending.Read())
                {
                    ss_pendingTotalSum = NopSqlDataHelper.GetDecimal(orders_ss_pending, "Total");
                    ss_pendingCount    = NopSqlDataHelper.GetInt(orders_ss_pending, "Count");
                }
                lblTotalUnshipped.Text      = ss_pendingCount.ToString();
                lblTotalUnshippedValue.Text = PriceHelper.FormatPrice(ss_pendingTotalSum, true, false);
            }
        }
Exemplo n.º 13
0
        private DBDiscount GetDiscountFromReader(IDataReader dataReader)
        {
            DBDiscount discount = new DBDiscount();

            discount.DiscountID            = NopSqlDataHelper.GetInt(dataReader, "DiscountID");
            discount.DiscountTypeID        = NopSqlDataHelper.GetInt(dataReader, "DiscountTypeID");
            discount.DiscountRequirementID = NopSqlDataHelper.GetInt(dataReader, "DiscountRequirementID");
            discount.Name               = NopSqlDataHelper.GetString(dataReader, "Name");
            discount.UsePercentage      = NopSqlDataHelper.GetBoolean(dataReader, "UsePercentage");
            discount.DiscountPercentage = NopSqlDataHelper.GetDecimal(dataReader, "DiscountPercentage");
            discount.DiscountAmount     = NopSqlDataHelper.GetDecimal(dataReader, "DiscountAmount");
            discount.StartDate          = NopSqlDataHelper.GetUtcDateTime(dataReader, "StartDate");
            discount.EndDate            = NopSqlDataHelper.GetUtcDateTime(dataReader, "EndDate");
            discount.RequiresCouponCode = NopSqlDataHelper.GetBoolean(dataReader, "RequiresCouponCode");
            discount.CouponCode         = NopSqlDataHelper.GetString(dataReader, "CouponCode");
            discount.Deleted            = NopSqlDataHelper.GetBoolean(dataReader, "Deleted");
            return(discount);
        }
Exemplo n.º 14
0
        private DBDiscount GetDiscountFromReader(IDataReader dataReader)
        {
            var item = new DBDiscount();

            item.DiscountId            = NopSqlDataHelper.GetInt(dataReader, "DiscountID");
            item.DiscountTypeId        = NopSqlDataHelper.GetInt(dataReader, "DiscountTypeID");
            item.DiscountLimitationId  = NopSqlDataHelper.GetInt(dataReader, "DiscountLimitationID");
            item.DiscountRequirementId = NopSqlDataHelper.GetInt(dataReader, "DiscountRequirementID");
            item.Name               = NopSqlDataHelper.GetString(dataReader, "Name");
            item.UsePercentage      = NopSqlDataHelper.GetBoolean(dataReader, "UsePercentage");
            item.DiscountPercentage = NopSqlDataHelper.GetDecimal(dataReader, "DiscountPercentage");
            item.DiscountAmount     = NopSqlDataHelper.GetDecimal(dataReader, "DiscountAmount");
            item.StartDate          = NopSqlDataHelper.GetUtcDateTime(dataReader, "StartDate");
            item.EndDate            = NopSqlDataHelper.GetUtcDateTime(dataReader, "EndDate");
            item.RequiresCouponCode = NopSqlDataHelper.GetBoolean(dataReader, "RequiresCouponCode");
            item.CouponCode         = NopSqlDataHelper.GetString(dataReader, "CouponCode");
            item.Deleted            = NopSqlDataHelper.GetBoolean(dataReader, "Deleted");
            return(item);
        }