Example #1
0
    /// <summary>
    /// Loads the view with the defaulted data.
    /// </summary>
    protected void LoadView()
    {
        ImportManager importManager = GetImportManager();

        if (importManager != null)
        {
            if (importManager.SourceFileName != null)
            {
                txtImportFile.Value = importManager.SourceFileName;
            }
            chkAddToGroup.Checked = importManager.Options.AddToGroup;
            if (chkAddToGroup.Checked)
            {
                groupOptions.Style.Add("display", String.Empty);
            }
            SetDefaultTargetProperties(importManager);
            LoadAddHocGroups();
            Page.Session["importManager"] = importManager;
        }
        IsImportPathValid();
        var value = BusinessRuleHelper.GetPickListValueByCode("Lead Source Status", "A");

        if (!String.IsNullOrEmpty(value))
        {
            var leadSourcePreFilter = new LookupPreFilter {
                PropertyName = "Status", OperatorCode = "=", FilterValue = value, PropertyType = "System.String"
            };
            lueLeadSource.LookupPreFilters.Add(leadSourcePreFilter);
        }
    }
Example #2
0
    /// <summary>
    /// Loads the view.
    /// </summary>
    private void LoadView()
    {
        var value = BusinessRuleHelper.GetPickListValueByCode("Lead Source Status", "A");

        if (!String.IsNullOrEmpty(value))
        {
            var leadSourcePreFilter = new LookupPreFilter {
                PropertyName = "Status", OperatorCode = "=", FilterValue = value, PropertyType = "System.String"
            };
            luLeadSource.LookupPreFilters.Add(leadSourcePreFilter);
        }
        //New Stage
        if (_stage.Id == null)
        {
            _stage.Campaign     = (ICampaign)_parentEntity;
            _stage.Status       = GetLocalResourceObject("Status_Open").ToString();
            _stage.CampaignCode = _stage.Campaign.CampaignCode;
            _stage.StartDate    = DateTime.UtcNow;
        }
        else //Existing Stage
        {
            if (_mode == "Complete")//Complete the stage.
            {
                _stage.EndDate = DateTime.UtcNow;
                _stage.Status  = GetLocalResourceObject("Status_Completed").ToString();
            }
        }
        grdTasks.DataSource = _stage.CampaignTasks;
        grdTasks.DataBind();
        LoadBudget(_stage);
    }
Example #3
0
    /// <summary>
    /// Handles the Load event of the Page control.
    /// </summary>
    /// <param name="sender">The source of the event.</param>
    /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
    protected void Page_Load(object sender, EventArgs e)
    {
        var value = BusinessRuleHelper.GetPickListValueByCode("Lead Source Status", "A");

        if (!String.IsNullOrEmpty(value))
        {
            var leadSourcePreFilter = new LookupPreFilter {
                PropertyName = "Status", OperatorCode = "=", FilterValue = value, PropertyType = "System.String"
            };
            lueResponseLeadSource.LookupPreFilters.Add(leadSourcePreFilter);
        }
    }
    protected override void OnFormBound()
    {
        base.OnFormBound();

        foreach (IUser selUser in _selUsers)
        {
            LookupPreFilter pf = new LookupPreFilter();
            pf.PropertyName = "Id";
            pf.OperatorCode = "!=";
            pf.FilterValue = string.Format("'{0}'", selUser.Id.ToString());
            copyProfileParameter.UserLookupControl.LookupPreFilters.Add(pf);
        }

        ClientBindingMgr.RegisterDialogCancelButton(btnCancel);
        RegisterValidationScript();
    }
Example #5
0
    protected override void OnFormBound()
    {
        base.OnFormBound();

        foreach (IUser selUser in _selUsers)
        {
            LookupPreFilter pf = new LookupPreFilter();
            pf.PropertyName = "Id";
            pf.OperatorCode = "!=";
            pf.FilterValue  = string.Format("'{0}'", selUser.Id.ToString());
            copyProfileParameter.UserLookupControl.LookupPreFilters.Add(pf);
        }

        ClientBindingMgr.RegisterDialogCancelButton(btnCancel);
        RegisterValidationScript();
    }
    /// <summary>
    /// Called when [activating].
    /// </summary>
    protected override void OnActivating()
    {
        lblHowMany.Text = String.Empty;
        FilterOptions options = new FilterOptions();

        SetFilterControls(options);
        AddDistinctGroupItemsToList(lbxContactGroups, "Contact");
        AddDistinctGroupItemsToList(lbxLeadGroups, "Lead");
        var value = BusinessRuleHelper.GetPickListValueByCode("Lead Source Status", "A");

        if (!String.IsNullOrEmpty(value))
        {
            var leadSourcePreFilter = new LookupPreFilter {
                PropertyName = "Status", OperatorCode = "=", FilterValue = value, PropertyType = "System.String"
            };
            lueLeadSource.LookupPreFilters.Add(leadSourcePreFilter);
        }
    }
 /// <summary>
 /// Handles the Init event of the Page control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
 protected void Page_Init(object sender, EventArgs e)
 {
     if (Visible)
     {
         if (BindingSource.Current == null)
         {
             BindingSource.OnCurrentEntitySet += BindingSource_Set;
         }
         else
         {
             BindingSource_Set(sender, e);
         }
         var value = BusinessRuleHelper.GetPickListValueByCode("Lead Source Status", "A");
         if (!String.IsNullOrEmpty(value))
         {
             var leadSourcePreFilter = new LookupPreFilter {
                 PropertyName = "Status", OperatorCode = "=", FilterValue = value, PropertyType = "System.String"
             };
             lueTargetLeadSource.LookupPreFilters.Add(leadSourcePreFilter);
         }
     }
 }
Example #8
0
    protected override void OnFormBound()
    {
        if ((Contact != null) & !IsClosing)
        {
            IContact contact = DialogService.DialogParameters["SourceContact"] as IContact;

            lueSourceContact.LookupResultValue = contact;
            txtSourceAccount.Text = contact.AccountName;

            var targetAcctFilter = new LookupPreFilter();
            targetAcctFilter.LookupEntityName = "Sage.Entity.Interfaces.IAccount";
            targetAcctFilter.PropertyName     = "Id";
            targetAcctFilter.OperatorCode     = "!=";
            targetAcctFilter.FilterValue      = Contact.Account.Id.ToString();
            targetAcctFilter.PropertyType     = "System.String";
            lueTargetAccount.LookupPreFilters.Add(targetAcctFilter);

            // set focus on target account lookup
            lueTargetAccount.Focus();
        }
        base.OnFormBound();
    }
    protected override void OnFormBound()
    {
        if ((Contact != null) & !IsClosing)
        {
            IContact contact = DialogService.DialogParameters["SourceContact"] as IContact;

            lueSourceContact.LookupResultValue = contact;
            txtSourceAccount.Text = contact.AccountName;

            var targetAcctFilter = new LookupPreFilter();
            targetAcctFilter.LookupEntityName = "Sage.Entity.Interfaces.IAccount";
            targetAcctFilter.PropertyName = "Id";
            targetAcctFilter.OperatorCode = "!=";
            targetAcctFilter.FilterValue = Contact.Account.Id.ToString();
            targetAcctFilter.PropertyType = "System.String";
            lueTargetAccount.LookupPreFilters.Add(targetAcctFilter);

            // set focus on target account lookup
            lueTargetAccount.Focus();
        }
        base.OnFormBound();
    }