public static StateProvinceProtocol[] ConvertCollection(StateCollection states)
        {
            StateProvinceProtocol[] protoStates = new StateProvinceProtocol[states.Count];

            for(int i = 0; i < states.Count; i++ )
            {
                protoStates[i] = new StateProvinceProtocol( states[i] );
            }

            return protoStates;
        }
Esempio n. 2
0
        public static StateProvinceProtocol[] ConvertCollection(StateCollection states)
        {
            StateProvinceProtocol[] protoStates = new StateProvinceProtocol[states.Count];

            for (int i = 0; i < states.Count; i++)
            {
                protoStates[i] = new StateProvinceProtocol(states[i]);
            }


            return(protoStates);
        }
        public CountryProtocol(Country country)
        {
            if( country.DefaultState != null )
                this.DefaultState = new StateProvinceProtocol( country.DefaultState );

            this.Name = country.Name;

            if( country.DefaultTimeZone != null )
                this.DefaultTimeZone = new TimeZoneProtocol( country.DefaultTimeZone );

            this.Code = country.Code;
            this.IsDefault = country.IsDefault;
            this.ObjectID = country.ObjectID;

            this.States = StateProvinceProtocol.ConvertCollection( country.States );
            this.TimeZones = TimeZoneProtocol.ConvertCollection( country.TimeZones );
        }
Esempio n. 4
0
        public CountryProtocol(Country country)
        {
            if (country.DefaultState != null)
            {
                this.DefaultState = new StateProvinceProtocol(country.DefaultState);
            }

            this.Name = country.Name;

            if (country.DefaultTimeZone != null)
            {
                this.DefaultTimeZone = new TimeZoneProtocol(country.DefaultTimeZone);
            }

            this.Code      = country.Code;
            this.IsDefault = country.IsDefault;
            this.ObjectID  = country.ObjectID;

            this.States    = StateProvinceProtocol.ConvertCollection(country.States);
            this.TimeZones = TimeZoneProtocol.ConvertCollection(country.TimeZones);
        }