private Guid findConstituent()
        {
            SearchListLoadRequest request = ConstituentSearch.CreateRequest(this.API.AppFxWebServiceProvider);

            request.SearchListID = new Guid("23c5c603-d7d8-4106-aecc-65392b563887");

            ConstituentSearchFilterData data = new ConstituentSearchFilterData();

            data.CONSTITUENTTYPE = 1;
            data.EXACTMATCHONLY  = true;

            // CSM - Modified to only use the lookup id if it is non-blank
            //if ((this.radIsSponsor.SelectedValue == "Yes") && (this.txtSponsorId.Text.Trim() != ""))
            //{
            //    data.LOOKUPID = this.txtSponsorId.Text;
            //    data.KEYNAME = this.txtLastName.Text;
            //    data.CITY = this.txtCity.Text;
            //    data.POSTCODE = this.txtZip.Text;
            //}
            //else
            //{
            data.FIRSTNAME    = this.txtFirstName.Text;
            data.KEYNAME      = this.txtLastName.Text;
            data.CITY         = this.txtCity.Text;
            data.POSTCODE     = this.txtZip.Text;
            data.ADDRESSBLOCK = this.txtAddress.Text;
            //}


            string[] ids = ConstituentSearch.GetIDs(this.API.AppFxWebServiceProvider, data);
            if (ids.Length > 0)
            {
                if (ids.Length > 1)
                {
                    return(new Guid(ids[0]));
                }
                else
                {
                    return(new Guid(ids[0]));
                }
            }

            return(Guid.Empty);
        }
Ejemplo n.º 2
0
        private Guid findConstituent()
        {
            SearchListLoadRequest request = ConstituentSearch.CreateRequest(this.API.AppFxWebServiceProvider);

            request.SearchListID = new Guid("23c5c603-d7d8-4106-aecc-65392b563887");

            ConstituentSearchFilterData data = new ConstituentSearchFilterData();

            data.CONSTITUENTTYPE = 1;

            if (this.radIsSponsor.SelectedValue == "")
            {
                data.LOOKUPID = this.txtSponsorId.Text;
            }
            else
            {
                data.FIRSTNAME    = this.txtFirstName.Text;
                data.KEYNAME      = this.txtLastName.Text;
                data.CITY         = this.txtCity.Text;
                data.POSTCODE     = this.txtZip.Text;
                data.ADDRESSBLOCK = this.txtAddress.Text;
            }


            string[] ids = ConstituentSearch.GetIDs(this.API.AppFxWebServiceProvider, data);
            if (ids.Length > 0)
            {
                if (ids.Length > 1)
                {
                    return(new Guid(ids[0]));
                }
                else
                {
                    return(new Guid(ids[0]));
                }
            }

            return(Guid.Empty);
        }
        /// <summary>
        /// Find the Constituent ID for the lookup id entered in txtSponsorId
        /// The Last Name entered in txtReversalResponseLastName must also match
        /// </summary>
        /// <returns>ConstituentID</returns>
        private Guid findConstituent()
        {
            SearchListLoadRequest request = ConstituentSearch.CreateRequest(this.API.AppFxWebServiceProvider);

            request.SearchListID = new Guid("23c5c603-d7d8-4106-aecc-65392b563887");

            ConstituentSearchFilterData data = new ConstituentSearchFilterData();

            data.CONSTITUENTTYPE = 1;
            data.EXACTMATCHONLY  = true;

            data.LOOKUPID = this.txtSponsorId.Text.Trim();
            data.KEYNAME  = this.txtReversalResponseLastName.Text.Trim();

            string[] ids = ConstituentSearch.GetIDs(this.API.AppFxWebServiceProvider, data);
            if (ids.Length > 0)
            {
                return(new Guid(ids[0]));
            }

            return(Guid.Empty);
        }