HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/RMourik/bassol.nl/CMS/CMSModules/Reporting/LiveDialogs/EditSubscription.aspx.cs
using System;

using CMS.Helpers;
using CMS.Base;
using CMS.UIControls;

public partial class CMSModules_Reporting_LiveDialogs_EditSubscription : CMSLiveModalPage
{
    #region "Variables"

    bool liveEdit = false;

    #endregion


    #region "Methods"

    protected void Page_Load(object sender, EventArgs e)
    {
        if (liveEdit)
        {
            PageTitle.TitleText = GetString("reportsubscription.edit");
        }

        btnOk.Text = GetString("general.ok");
        btnCancel.Text = GetString("general.close");
    }


    protected override void CreateChildControls()
    {
        String mode = QueryHelper.GetString("mode", String.Empty);
        liveEdit = (mode.ToLowerCSafe() == "liveedit");
        subEdit.SimpleMode = !liveEdit;

        base.CreateChildControls();
    }


    protected void btnOK_Click(object sender, EventArgs ea)
    {
        if (subEdit.Save())
        {
            String alert = liveEdit ? String.Empty : "wopener.window.alert(" + ScriptHelper.GetLocalizedString("reportsubscription.subscribed") + ")";
            ScriptHelper.RegisterStartupScript(Page, typeof(String), "CloseScript", ScriptHelper.GetScript("CloseDialog();" + alert));
        }
    }

    #endregion
}