protected void rtbFormButtons_OnButtonClick(object sender, RadToolBarEventArgs e) { switch (e.Item.Value) { case "LeadForce": Response.Redirect(UrlsData.AP_SiteActivityRuleAdd((int)RuleType.Form)); break; case "Wizard": Response.Redirect(UrlsData.AP_FormWizard()); break; case "External": Response.Redirect(UrlsData.AP_SiteActivityRuleAdd((int)RuleType.ExternalForm)); break; case "Wufoo": if (!Page.ClientScript.IsStartupScriptRegistered("AddWufooForm")) { ScriptManager.RegisterStartupScript(Page, typeof(Page), "AddWufooForm", "AddWufooForm();", true); } break; case "LPgenerator": Response.Redirect(UrlsData.AP_SiteActivityRuleAdd((int)RuleType.LPgenerator)); break; } }
/// <summary> /// Handles the Load event of the Page control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> protected void Page_Load(object sender, EventArgs e) { gridLinks.AddNavigateUrl = UrlsData.AP_SiteActivityRuleAdd((int)RuleType.Link); gridLinks.SiteID = ((LeadForceBasePage)Page).SiteId; gridLinks.Where = new List <GridWhere>(); gridLinks.Where.Add(new GridWhere { Column = "RuleTypeID", Value = ((int)RuleType.Link).ToString() }); }
/// <summary> /// Handles the Load event of the Page control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> protected void Page_Load(object sender, EventArgs e) { siteID = ((LeadForceBasePage)Page).SiteId; string ruleTypeId = Page.RouteData.Values["ruletypeid"] as string; int.TryParse(ruleTypeId, out _ruleTypeId); gridSiteActivityRules.AddNavigateUrl = UrlsData.AP_SiteActivityRuleAdd(_ruleTypeId); gridSiteActivityRules.SiteID = siteID; gridSiteActivityRules.Where = new List <GridWhere>(); switch ((RuleType)_ruleTypeId) { case RuleType.Link: gridSiteActivityRules.Where.Add(new GridWhere { Column = "RuleTypeID", Value = ((int)RuleType.Link).ToString() }); break; case RuleType.Form: gridSiteActivityRules.Where.Add(new GridWhere { Column = "RuleTypeID", Value = ((int)RuleType.Form).ToString() }); break; case RuleType.File: gridSiteActivityRules.Where.Add(new GridWhere { Column = "RuleTypeID", Value = ((int)RuleType.File).ToString() }); break; case RuleType.ExternalForm: gridSiteActivityRules.Where.Add(new GridWhere { Column = "RuleTypeID", Value = ((int)RuleType.ExternalForm).ToString() }); break; } }