/// <summary>
 /// Add an event to the multi-level event.  If an event if currently selected in
 /// the hierachy, then the new event will be added a child to the selected event.
 /// </summary>
 /// <param name="eventName">The name of the event to add.</param>
 public static void AddExistingEvent(string eventName)
 {
     WaitClick(getXButton(GetDialogId(DialogIds), "Add existing"));
     SetTextField(getXInput("EventSearch", "NAME"), eventName);
     WaitClick(SearchDialog.getXSearchButton);
     SearchDialog.SelectFirstResult();
 }
 /// <summary>
 /// Search for a constituent and navigate to the first returned result.  An Exception is thrown if
 /// no results are found.
 /// </summary>
 /// <param name="fieldValue">The desired value of the search criteria field.</param>
 /// <param name="groupCaption">The group header caption of the task.  Defaults to "Constituents".</param>
 /// <param name="taskCaption">The link caption of the task.  Defaults to "Constituent search".</param>
 /// <param name="dialogId">The unique id of the search dialog.  i.e. 'UniversityofOxfordConstituentSearch'
 /// Defaults to "ConstituentSearchbyNameorLookupID".</param>
 /// <param name="fieldId">The unique id of the search dialog field.  i.e. 'LOOKUPID'  Defaults to "KEYNAME".</param>
 public static void ConstituentSearch(string fieldValue, string groupCaption = "Constituents", string taskCaption = "Constituent search",
                                      string dialogId = "ConstituentSearchbyNameorLookupID", string fieldId       = "KEYNAME")
 {
     OpenLink(groupCaption, taskCaption);
     SetTextField(Dialog.getXInput(dialogId, fieldId), fieldValue);
     SearchDialog.Search();
     SearchDialog.SelectFirstResult();
 }
 /// <summary>
 /// Search for an event and select the first matching record.
 /// </summary>
 /// <param name="fieldValue">The desired value of the search criteria field.</param>
 /// <param name="groupCaption">The group header caption of the task.  Defaults to "Fundraising events".</param>
 /// <param name="taskCaption">The link caption of the task.  Defaults to "Event search".</param>
 /// <param name="dialogId">The unique id of the search dialog.  i.e. 'UniversityofOxfordConstituentSearch'
 /// Defaults to "EventSearch".</param>
 /// <param name="fieldId">The unique id of the search dialog field.  i.e. 'LOOKUPID'  Defaults to "NAME".</param>
 public static void EventSearch(string fieldValue, string groupCaption = "Fundraising events", string taskCaption = "Event search",
                                string dialogId = "EventSearch", string fieldId = "NAME")
 {
     CollapseCalendar();
     OpenLink(groupCaption, taskCaption);
     SetTextField(Dialog.getXInput(dialogId, fieldId), fieldValue);
     SearchDialog.Search();
     SearchDialog.SelectFirstResult();
 }
Beispiel #4
0
 /// <summary>
 /// Search for a revenue record by all records associated with a constituent
 /// and select the first returned result.
 /// </summary>
 /// <param name="constituent">The last name of the constituent.</param>
 /// <param name="groupCaption">The group header caption of the task.  Defaults to "Transactions".</param>
 /// <param name="taskCaption">The link caption of the task.  Defaults to "Transaction search".</param>
 public static void TransactionSearchByConstituent(string constituent, string groupCaption = "Transactions",
                                                   string taskCaption = "Transaction search")
 {
     OpenLink(groupCaption, taskCaption);
     SetTextField(Dialog.getXInput("TransactionSearch", "KEYNAME"), constituent);
     SearchDialog.Search();
     SearchDialog.SelectFirstResult();
     GetDisplayedElement(Panel.getXPanelHeader("fa_revenue"));
 }
Beispiel #5
0
        /// <summary>
        /// Add a marketing selection to the segment.
        /// </summary>
        /// <param name="selection">The selection to add.</param>
        public static void AddSelection(string selection)
        {
            var dialogId = GetDialogId(DialogIds);

            OpenTab("Details", dialogId);
            WaitClick(getXDialogButton("Add", dialogId));
            SetTextField(getXInput("MarketingSelectionSearch", "_NAME_value"), selection);
            SearchDialog.Search();
            SearchDialog.SelectFirstResult();
        }
 /// <summary>
 /// Determine if at least a single matching constituent can be found based on the provided
 /// search field value and select it.  Selects the first returned result, or cancels the search
 /// dialog if no results are found.
 /// </summary>
 /// <param name="fieldValue">The desired value of the search criteria field.</param>
 /// <param name="groupCaption">The group header caption of the task.  Defaults to "Constituents".</param>
 /// <param name="taskCaption">The link caption of the task.  Defaults to "Constituent search".</param>
 /// <param name="dialogId">The unique id of the search dialog.  i.e. 'UniversityofOxfordConstituentSearch'
 /// Defaults to "ConstituentSearchbyNameorLookupID".</param>
 /// <param name="fieldId">The unique id of the search dialog field.  i.e. 'LOOKUPID'  Defaults to "KEYNAME".</param>
 /// <returns>True if at least one matching element is found, false otherwise.</returns>
 public static bool ConstituentExists(string fieldValue, string groupCaption = "Constituents", string taskCaption = "Constituent search",
                                      string dialogId = "ConstituentSearchbyNameorLookupID", string fieldId       = "KEYNAME")
 {
     OpenLink(groupCaption, taskCaption);
     SetTextField(Dialog.getXInput(dialogId, fieldId), fieldValue);
     SearchDialog.Search();
     try
     {
         SearchDialog.SelectFirstResult();
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
Beispiel #7
0
 /// <summary>
 /// Check if a designation exists and navigate to it if so.
 /// </summary>
 /// <param name="designation">The name of the designation.</param>
 /// <param name="groupCaption">The group header caption of the task.  Defaults to "Fundraising".</param>
 /// <param name="taskCaption">The link caption of the task.  Defaults to "Designation search"</param>
 /// <param name="dialogId">The unique id of the search dialog.  i.e. 'UniversityofOxfordConstituentSearch'
 /// Defaults to "DesignationSearch".</param>
 /// <param name="fieldId">The unique id of the search dialog field.  i.e. 'LOOKUPID'  Defaults to "COMBINEDSEARCH".</param>
 /// <returns>True if the designation exists, false otherwise.</returns>
 public static bool DesignationExists(string designation, string groupCaption = "Fundraising",
                                      string taskCaption = "Designation search", string dialogId = "DesignationSearch", string fieldId = "COMBINEDSEARCH")
 {
     OpenLink(groupCaption, taskCaption);
     SetTextField(Dialog.getXInput(dialogId, fieldId), designation);
     try
     {
         SearchDialog.Search();
         SearchDialog.SelectFirstResult();
         GetDisplayedElement(Panel.getXPanelHeader("fa_fundraisinginitiatives"));
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }