protected override void OnPreRender(EventArgs e) { base.OnPreRender(e); this.InitializeControls(); PowerShellResults <JsonDictionary <object> > powerShellResults = (PowerShellResults <JsonDictionary <object> >) base["PreLoadResults"]; if (powerShellResults != null && powerShellResults.SucceededWithValue) { Dictionary <string, object> dictionary = powerShellResults.Value; bool includeArchive = false; if ((string)dictionary["Type"] == ElcFolderType.All.ToString() || (string)dictionary["Type"] == ElcFolderType.Personal.ToString()) { this.divType.Visible = false; includeArchive = true; } RetentionUtils.PopulateRetentionActions(this.rblRetentionAction, includeArchive); } }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); bool includeArchive = true; this.InitializeControls(); NameValueCollection queryString = this.Context.Request.QueryString; string text = queryString["typeGroup"]; if (!string.IsNullOrEmpty(text)) { this.divType.Visible = false; string text2; if (string.Compare(text, "SystemFolder", true) == 0) { text2 = Strings.NewRetentionTagForSystemFolder; this.tbxTypeHidden.Text = string.Empty; this.divType.Visible = true; this.tbxTypeHidden.Visible = false; RetentionUtils.PopulateRetentionTypes(this.ddlType); includeArchive = false; } else if (string.Compare(text, "All", true) == 0) { text2 = Strings.NewRetentionTagForAll; this.tbxTypeHidden.Text = "All"; } else { if (string.Compare(text, "Personal", true) != 0) { throw new BadQueryParameterException("typeGroup", new ArgumentException(string.Format("Retention tag type group [{0}] is not supported.", text))); } text2 = Strings.NewRetentionTagForPersonal; this.tbxTypeHidden.Text = "Personal"; } base.Title = text2; base.Caption = text2; RetentionUtils.PopulateRetentionActions(this.rblRetentionAction, includeArchive); return; } throw new BadQueryParameterException("typeGroup", new ArgumentException("Retention tag type group is required.")); }