Пример #1
0
        protected void GetCouponInfo()
        {
            CouponInfo cItem = CSFactory.GetCoupon(cId);

            txtDiscountTitle.Text = cItem.Title;
            txtPercentage.Text    = Math.Round(cItem.Discount, 2).ToString();
            txttotalAmount.Text   = Math.Round(cItem.TotalAmount, 2).ToString();
            ddlDiscountType.ClearSelection();
            ddlDiscountType.Items.FindByValue(((int)cItem.DiscountType).ToString()).Selected = true;
            cbIncludeShipping.Checked = cItem.IncludeShipping;
        }
        protected void GetCouponInfo()
        {
            CouponInfo cItem = CSFactory.GetCoupon(cId);

            txtDiscountTitle.Text = cItem.Title;
            txtPercentage.Text    = Math.Round(cItem.Discount, 2).ToString();
            txttotalAmount.Text   = Math.Round(cItem.TotalAmount, 2).ToString();
            txtMinAmount.Text     = Math.Round(cItem.MinAmount, 2).ToString();
            ddlDiscountType.ClearSelection();
            ddlDiscountType.Items.FindByValue(((int)cItem.DiscountType).ToString()).Selected = true;
            cbIncludeShipping.Checked = cItem.IncludeShipping;
            BindCouponFields();
            //if(cItem.)
            List <CouponItems> items = cItem.ItemsDiscount;

            foreach (CouponItems itemInfo in items)
            {
                ddlSkuList.SelectedValue = itemInfo.SkuId.ToString();
                txtItemDiscount.Text     = itemInfo.DiscountAmount.ToString("n2");
                ddlItemDiscountType.Items.FindByValue(((int)itemInfo.DiscountType).ToString()).Selected = true;
            }
        }