コード例 #1
0
    protected override void OnFormBound()
    {
        base.OnFormBound();
        IHistory history = (IHistory)BindingSource.Current;

        SetScheduledByLabel(history);
        cmdDelete.OnClientClick = FormHelper.GetConfirmDeleteScript();
        ClientBindingMgr.RegisterSaveButton(cmdOK);

        bool isEditAllowed = CurrentUserId == history.UserId || CurrentUserId == "ADMIN";

        cmdDelete.Visible = isEditAllowed;
        cmdOK.Visible     = isEditAllowed;

        ApplicationPage page = (ApplicationPage)Page;

        page.TitleBar.Image = ResolveUrl(GetTitleBarImage());


        var parms = AppContext["ActivityParameters"] as System.Collections.Generic.Dictionary <string, string>;

        if ((parms != null) && parms.ContainsKey("AllowEditHistory"))
        {
            //means we dropped an email - the delete button should dissappear and cancel should delete the record...
            cmdDelete.Visible = false;
        }
    }
コード例 #2
0
    protected override void OnFormBound()
    {
        base.OnFormBound();
        ClientBindingMgr.RegisterSaveButton(btnSave);
        btnDelete.OnClientClick = string.Format("return confirm('{0}');", Sage.Platform.WebPortal.PortalUtil.JavaScriptEncode(GetLocalResourceObject("btnDelete.ActionConfirmationMessage").ToString()));
        _pickListView           = (IPickListView)BindingSource.Current;
        var picklistId = Page.Session["picklistId"] as string;

        Page.Session.Add("picklistId", _pickListView.Id.ToString());
        if (picklistId == _pickListView.Id.ToString() && IsPostBack)
        {
            //there are instances where the test default item does not get updated
            AssignDefaultTestItem();
            return;
        }
        LoadView();
        if (RoleSecurityService != null && !RoleSecurityService.HasAccess("Administration/PickList/Add"))
        {
            btnNew.Visible = false;
        }
        if (RoleSecurityService != null && !RoleSecurityService.HasAccess("Administration/PickList/Delete"))
        {
            btnDelete.Visible = false;
        }
        if (RoleSecurityService != null && !RoleSecurityService.HasAccess("Administration/PickList/Edit"))
        {
            btnSave.Visible = false;
        }
    }
コード例 #3
0
    /// <summary>
    /// Called when [form bound].
    /// </summary>
    protected override void OnFormBound()
    {
        if (IsLead)
        {
            lueLead.Text = String.Empty;
            rdgTargetType.SelectedIndex = 1;
        }
        else
        {
            rdgTargetType.SelectedIndex = 0;
        }
        SetTargetTypeDisplay();
        LoadCampaignStages();
        ClientBindingMgr.RegisterDialogCancelButton(cmdCancel);
        ClientBindingMgr.RegisterSaveButton(cmdOK);

        if (dtsOpens.SourceObject == null)
        {
            dtsOpens.SourceObject = BindingSource.Current;
        }
        if (dtsClicks.SourceObject == null)
        {
            dtsClicks.SourceObject = BindingSource.Current;
        }
        if (dtsUndeliverables.SourceObject == null)
        {
            dtsUndeliverables.SourceObject = BindingSource.Current;
        }

        grdProducts.DataSource = dtsProducts2;
        grdProducts.DataBind();
        dtsOpens.Bind();
        dtsClicks.Bind();
        dtsUndeliverables.Bind();
    }
コード例 #4
0
    protected override void OnFormBound()
    {
        base.OnFormBound();

        SetTitleBar();
        ClientBindingMgr.RegisterDialogCancelButton(cmdCancel);
        ClientBindingMgr.RegisterSaveButton(cmdOK);
    }
    protected override void OnWireEventHandlers()
    {
        base.OnWireEventHandlers();

        ClientBindingMgr.RegisterSaveButton(btnOK);
        ClientBindingMgr.RegisterDialogCancelButton(btnClose);
        btnClose.Click += DialogService.CloseEventHappened;
        btnOK.Click    += UpdateDataEvent;
    }
コード例 #6
0
    protected override void OnFormBound()
    {
        base.OnFormBound();
        this._pickListView = (IPickListView)this.BindingSource.Current;
        ClientBindingMgr.RegisterSaveButton(btnSave);

        btnDelete.OnClientClick = string.Format("return confirm('{0}');", Sage.Platform.WebPortal.PortalUtil.JavaScriptEncode(GetLocalResourceObject("btnDelete.ActionConfirmationMessage").ToString()));


        LoadView();
    }
コード例 #7
0
    protected override void OnFormBound()
    {
        // TODO: Need to research and fix the cause of the double post back that attempts to fire a second
        // OnFormBound while the dialog is closing.  This null check should not be necessary.
        if (BindingSource.Current == null)
        {
            return;
        }

        base.OnFormBound();

        if (IsActivating && Form.IsInsert)
        {
            if (Activity.RecurrenceState != RecurrenceState.rstOccurrence)
            {
                Activity.Type = Params.Type;
            }
        }

        if (ClientBindingMgr != null)
        {
            ClientBindingMgr.RegisterSaveButton(OkButton);
            ClientBindingMgr.RegisterSaveButton(CompleteButton);
            ClientBindingMgr.RegisterSaveButton(DeleteButton);
        }

        if (!IsPostBack)
        {
            OkButton.Visible       = Form.IsSaveEnabled;
            CompleteButton.Visible = Form.IsCompleteEnabled && !Form.IsInsert;
            DeleteButton.Visible   = Form.IsDeleteEnabled;
            CreateUser.Text        = GetCreateUser();

            DeleteButton.OnClientClick = GetDeleteConfirm();
        }
        ApplicationPage page = (ApplicationPage)Page;

        page.TitleBar.Text  = GetTitleBarText();
        page.TitleBar.Image = ResolveUrl(GetTitleBarImage());
    }
    protected override void OnFormBound()
    {
        // TODO: Need to research and fix the cause of the double post back that attempts to fire a second
        // OnFormBound while the dialog is closing.  This null check should not be necessary.
        if (BindingSource.Current == null)
        {
            return;
        }

        base.OnFormBound();

        if (IsActivating && Form.IsInsert)
        {
            if (Activity.RecurrenceState != RecurrenceState.rstOccurrence)
            {
                Activity.Type = GetActivityType(GetParam("type"));
            }
        }

        DisableMembersAndResources();
        if (ClientBindingMgr != null)
        {
            ClientBindingMgr.RegisterSaveButton(CompleteNow);
            ClientBindingMgr.RegisterSaveButton(CompleteAsScheduled);
        }

        if (!IsPostBack)
        {
            CompleteAsScheduled.Visible = Form.IsCompleteEnabled;
            CompleteNow.Visible         = Form.IsCompleteEnabled;
            CreateUser.Text             = GetCreateUser();
        }
        ApplicationPage page = (ApplicationPage)Page;

        page.TitleBar.Text  = GetTitleBarText();
        page.TitleBar.Image = ResolveUrl(GetTitleBarImage());
    }