コード例 #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        parseParameters();

        _userId = (Guid)Membership.GetUser().ProviderUserKey;
        _db     = Global.GetDbConnection();

        //Load the report
        _report = _db.ORManager.Get <CustomReport>(_customReportId);

        //Set the URL for the preview link
        initPreviewLink();

        lstReportParts.SelectedIndexChanged += lstReportParts_SelectedIndexChanged;
        ddlReportType.SelectedIndexChanged  += ddlReportType_SelectedIndexChanged;

        cmdAdd.Click    += cmdAdd_Click;
        cmdDelete.Click += cmdDelete_Click;
        cmdSave.Click   += cmdSave_Click;

        //Verify that the report belongs to this user
        if (_report.UserId != _userId)
        {
            throw new ApplicationException("Report does not belong to the logged in user - Security violation");
        }

        if (!Page.IsPostBack)
        {
            populateReportPartList();

            //Confirm deletes
            JavaScriptBlock.ConfirmClick(cmdDelete, "Are you sure you want to delete the selected report part from this report?");
        }
    }
コード例 #2
0
    private void initDeleteConfirm()
    {
        string msg;

        msg =
            "Are you sure you want to PERMANENTLY delete this category and all associated events? If any event subscriptions are using this category, they will be reassigned to the default category";

        JavaScriptBlock.ConfirmClick(cmdDelete, msg);
    }
コード例 #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            initUserInformation();
            populateTimeZoneList();

            JavaScriptBlock.ConfirmClick(CancelAccount,
                                         @"If you cancel your account, you will no longer be able to log in to our system and all of the data gathered for your account will be deleted.\nAre you sure you want to cancel your account? (OK = Yes, Cancel = No)");
        }

        cmdUpdateTimezone.Click += cmdUpdateTimezone_Click;
    }
コード例 #4
0
ファイル: Default.aspx.cs プロジェクト: anthrax3/ranktrend
    protected void Page_Load(object sender, EventArgs e)
    {
        _userId = (Guid)Membership.GetUser().ProviderUserKey;
        _db     = Global.GetDbConnection();

        lstSites.SelectedIndexChanged += lstSites_SelectedIndexChanged;
        cmdAdd.Click    += cmdAdd_Click;
        cmdDelete.Click += cmdDelete_Click;
        cmdSave.Click   += cmdSave_Click;

        if (!Page.IsPostBack)
        {
            populateSiteList();
            displaySite(getSelectedSite());

            //Confirm the delete click
            JavaScriptBlock.ConfirmClick(cmdDelete, "Are you sure you want to delete this site and all data associated with it?");
        }
    }
コード例 #5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        _userId = (Guid)Membership.GetUser().ProviderUserKey;
        getDbConnection();

        cmdLoad.Click   += cmdLoad_Click;
        cmdDelete.Click += cmdDelete_Click;

        if (!Page.IsPostBack)
        {
            PopulateReportList();

            //Confirm the delete click
            JavaScriptBlock.ConfirmClick(cmdDelete,
                                         "Are you sure you want to delete this saved report? It will also be removed from any custom reports that it belongs to.");

            //Enable double-click loading
            lstReports.Attributes["ondblclick"] = Page.ClientScript.GetPostBackClientHyperlink(this, "lstReports_doubleClick");

            //Load the default settings
            raiseSettingsLoaded();
        }
    }
コード例 #6
0
 private void initJavascript()
 {
     JavaScriptBlock.ConfirmClick(Save,
                                  "Performing this action will effectively cause all users to be reset on their acceptance of this legal notice.\\nAre you sure you want to perform this action?");
 }