protected void Page_Load(object sender, System.EventArgs e) { if (!string.IsNullOrEmpty(base.Request.QueryString["isCallback"]) && base.Request.QueryString["isCallback"] == "true") { this.DoCallback(); return; } if (!int.TryParse(this.Page.Request.QueryString["activityId"], out this.activityId)) { base.GotoResourceNotFound(); return; } this.btnFinesh.Click += new System.EventHandler(this.btnFinesh_Click); this.hdactivy.Value = this.activityId.ToString(); this.btnDeleteAll.Click += new System.EventHandler(this.btnDeleteAll_Click); this.grdPromotionProducts.RowDeleting += new System.Web.UI.WebControls.GridViewDeleteEventHandler(this.grdPromotionProducts_RowDeleting); if (!this.Page.IsPostBack) { PromotionInfo promotion = SubsitePromoteHelper.GetPromotion(this.activityId); if (promotion == null) { base.GotoResourceNotFound(); return; } this.litPromotionName.Text = promotion.Name; this.BindPromotionProducts(); } }
protected void Page_Load(object sender, EventArgs e) { if (!int.TryParse(this.Page.Request.QueryString["activityId"], out this.activityId)) { base.GotoResourceNotFound(); } else { this.btnNext.Click += new EventHandler(this.btnNext_Click); if (!this.Page.IsPostBack) { PromotionInfo promotion = SubsitePromoteHelper.GetPromotion(this.activityId); this.promotionView.Promotion = promotion; this.txtPromoteType.Text = ((int)promotion.PromoteType).ToString(); if (promotion.Condition != 0M) { this.txtCondition.Text = promotion.Condition.ToString("F0"); } if (promotion.DiscountValue != 0M) { if (promotion.PromoteType == PromoteType.SentProduct) { this.txtDiscountValue.Text = promotion.DiscountValue.ToString("F0"); } else { this.txtDiscountValue.Text = promotion.DiscountValue.ToString("F2"); } } } } }
protected void Page_Load(object sender, System.EventArgs e) { if (!int.TryParse(this.Page.Request.QueryString["activityId"], out this.activityId)) { base.GotoResourceNotFound(); return; } this.btnSave.Click += new System.EventHandler(this.btnSave_Click); if (!this.Page.IsPostBack) { PromotionInfo promotion = SubsitePromoteHelper.GetPromotion(this.activityId); this.promotionView.Promotion = promotion; this.txtPromoteType.Text = ((int)promotion.PromoteType).ToString(); if (promotion.PromoteType != PromoteType.FullQuantityDiscount) { if (promotion.PromoteType != PromoteType.FullQuantityReduced) { this.txtCondition.Text = promotion.Condition.ToString("F2"); goto IL_DB; } } this.txtCondition.Text = promotion.Condition.ToString("F0"); IL_DB: this.txtDiscountValue.Text = promotion.DiscountValue.ToString("F2"); } }