/// <summary> /// The UpdateBtn_Click event handler on this Page is used to either /// create or update an event. It uses the Rainbow.EventsDB() /// data component to encapsulate all data functionality. /// </summary> /// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param> protected override void OnUpdate(EventArgs e) { base.OnUpdate(e); // Only Update if the Entered Data is Valid if (Page.IsValid == true) { // Create an instance of the Event DB component ComponentModuleDB comp = new ComponentModuleDB(); comp.UpdateComponentModule(ModuleID, PortalSettings.CurrentUser.Identity.Email, TitleField.Text, ComponentField.Text); // Redirect back to the portal home page RedirectBackToReferringPage(); } }
/// <summary> /// The UpdateBtn_Click event handler on this Page is used to either /// create or update an event. It uses the Appleseed.EventsDB() /// data component to encapsulate all data functionality. /// </summary> /// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param> protected override void OnUpdate(EventArgs e) { base.OnUpdate(e); // Only Update if the Entered Data is Valid if (Page.IsValid) { // Create an instance of the Event DB component var comp = new ComponentModuleDB(); comp.UpdateComponentModule(ModuleID, PortalSettings.CurrentUser.Identity.UserName, TitleField.Text, DesktopText.Text); if (Request.QueryString.GetValues("ModalChangeMaster") != null) { Response.Write("<script type=\"text/javascript\">window.parent.location = window.parent.location.href;</script>"); } else { RedirectBackToReferringPage(); } } }