Пример #1
0
 static internal CountryGetFormatsCountryRow GetCountryFormatsCountryRow(CountryGetFormatsReply countryFormats, Guid countryID)
 {
     foreach (var row_loopVariable in countryFormats.Countries)
     {
         var row = row_loopVariable;
         if (row.ID == countryID)
         {
             return(row);
         }
     }
     return(null);
 }
Пример #2
0
        private void _countryid_ValueChanged(object sender, ValueChangedEventArgs e)
        {
            if (!_countryId.Model.RootUIModel().Loading)
            {
                _stateid.Value = Guid.Empty;
            }

            _stateid.ResetDataSource();

            CountryGetFormatsReply     _countryFormats = GetCountryFormats(_model.GetRequestContext());
            CountryGetFormatsFormatRow labelRow        = GetCountryFormatRow(_countryFormats, _countryId.Value);

            if (labelRow != null)
            {
                _city.Caption     = labelRow.City;
                _stateid.Caption  = labelRow.State;
                _postcode.Caption = labelRow.PostCode;
            }
        }
 internal static CountryGetFormatsCountryRow GetCountryFormatsCountryRow(CountryGetFormatsReply countryFormats, Guid countryID)
 {
     List <CountryGetFormatsCountryRow> .Enumerator enumerator;
     enumerator = countryFormats.Countries.GetEnumerator();
     try
     {
         while (enumerator.MoveNext())
         {
             CountryGetFormatsCountryRow current = enumerator.Current;
             if (current.ID == countryID)
             {
                 return(current);
             }
         }
     }
     finally
     {
         enumerator.Dispose();
     }
     return((CountryGetFormatsCountryRow)null);
 }
        private void UMHSPhoneFormUIModel_Loaded(object sender, Blackbaud.AppFx.UIModeling.Core.LoadedEventArgs e)
        {
            this._countryCodesDictionary = new Dictionary <Guid, string>();

            switch (this.Mode)
            {
            case Blackbaud.AppFx.UIModeling.Core.DataFormMode.Edit:
                this.FORMHEADER.Value = "Edit MIMED Phone";
                break;

            case Blackbaud.AppFx.UIModeling.Core.DataFormMode.Add:
                this.FORMHEADER.Value = "Add MIMED Phone";
                break;
            }
            _infosourcecodeid.ResetDataSource();
            this._countryFormats = GetCountryFormats(this.GetRequestContext());
            this.ReformatPhoneNumber();
            // this.GetCountryCodes();
            this.DONOTCALLREASONCODEID.Enabled = this.DONOTCALL.Value;
            if (this.ISPRIMARY.Value)
            {
                this.ISPRIMARY.Enabled = false;
            }
        }
Пример #5
0
        internal void Init()
        {
            List <string> keyNameCaptionTypes = new List <string>(3);

            if (_includeindividuals.Value)
            {
                _numConstituentTypesAllowed += 1;
            }
            if (_includeorganizations.Value)
            {
                _numConstituentTypesAllowed += 1;
            }
            if (_includegroups.Value)
            {
                _numConstituentTypesAllowed += 1;
            }

            if (!_includeorganizations.Enabled)
            {
                _includeOrgIsEnabled = false;
            }

            if (_includeindividuals.Value)
            {
                keyNameCaptionTypes.Add("Last");
            }

            if (_includeorganizations.Value)
            {
                if (_numConstituentTypesAllowed == 1)
                {
                    keyNameCaptionTypes.Add("Organization");
                }
                else
                {
                    keyNameCaptionTypes.Add("Org");
                }
            }

            if (_includegroups.Value)
            {
                if (_excludecustomgroups.Value)
                {
                    keyNameCaptionTypes.Add("Household");
                }
                else if (_numConstituentTypesAllowed == 1)
                {
                    keyNameCaptionTypes.Add("Group/Household");
                }
                else
                {
                    keyNameCaptionTypes.Add("Group");
                }
            }

            EnableConstituentTypeOptions();

            _keyname.Caption = string.Format("{0} name", Strings.Join(keyNameCaptionTypes.ToArray(), "/"));

            if (_excludecustomgroups.Value)
            {
                _includegroups.Caption = "Households";
            }
            else if (_excludehouseholds.Value)
            {
                _includegroups.Caption = "Groups";
            }

            DataFormLoadRequest req = new DataFormLoadRequest {
                FormID = new Guid("12c490b6-5f6b-4eab-85a7-3c38ee492b44")
            };
            dynamic reply = ServiceMethods.DataFormLoad(req, _model.GetRequestContext());


            //BVS-SOTEY commented out

            //bool AVAILABLEZIPSEARCH = false;
            //if (reply.DataFormItem.TryGetValue("AVAILABLEZIPSEARCH", AVAILABLEZIPSEARCH))
            //{
            //    //Searching Postcodes is enabled based on whether there are available Zip codes to search.
            //    //Otherwise, it is just a text box to enter.
            //    _postcode.SearchEnabled = AVAILABLEZIPSEARCH;
            //}

            if (_ssn.Visible)
            {
                if (!_model.GetRequestContext().UserIsGrantedPrivilege(new Guid("d908668e-210f-47a8-bd45-ef9517e4894f")))
                {
                    _ssn.Visible = false;
                }
            }

            //Setting Labels based on Default Country
            CountryGetFormatsReply     _countryFormats = GetCountryFormats(_model.GetRequestContext());
            CountryGetFormatsFormatRow labelRow        = GetCountryFormatRow(_countryFormats, GetDefaultCountryID());

            if (labelRow != null)
            {
                _city.Caption     = labelRow.City;
                _stateid.Caption  = labelRow.State;
                _postcode.Caption = labelRow.PostCode;

                //Updating Grid Columns Header
                foreach (SearchListOutputFieldType outputField in _outputDefinition.OutputFields)
                {
                    switch (outputField.FieldID)
                    {
                    case "City":
                        outputField.Caption = labelRow.City;
                        break;

                    case "State":
                        outputField.Caption = labelRow.State;
                        break;

                    case "Postcode":
                        outputField.Caption = labelRow.PostCode;
                        break;
                    }
                }
            }
        }