Пример #1
0
        public async Task <ItemsResult> GetMoreItems(SearchIndexType indexType, int itemPage)
        {
            var filename = string.Format("{0}_{1}.xml", indexType, itemPage);
            var response = await _serializer.ReadFile(CountryType.ToString(), filename);

            var result = LoadedResultType.Cached;

            if (response == null)
            {
                result   = LoadedResultType.Downloaded;
                response = await _service.ItemSearchAsync(CountryType, indexType, itemPage);

                if (string.IsNullOrEmpty(response))
                {
                    result = LoadedResultType.Failed;
                    return(new ItemsResult {
                        Result = result
                    });
                }
                _serializer.WriteFile(CountryType.ToString(), filename, response);
            }
            return(new ItemsResult
            {
                Items = _parser.Parse(response).Where(x => !x.Attributes.IsAdultProduct),
                Result = result,
            });
        }
Пример #2
0
        public SupplierPartyType getSupplierPartyType()
        {
            PartyType HPT = new PartyType();

            NameType1 HNT1 = new NameType1();

            HNT1.Value = $"<![CDATA[{MS.Emp.RazonSocial}]]>";

            PartyNameType HPNT = new PartyNameType();

            PartyNameType[] MPNT = { HPNT };
            MPNT[0].Name = HNT1;

            IDType      HIT = new IDType();
            AddressType HAT = new AddressType();

            AddressType[] MAT = { HAT };
            HIT.Value = MS.Emp.Ubigeo;

            StreetNameType HSNT = new StreetNameType();

            HSNT.Value = MS.Emp.DomicilioFiscal;

            CountryType            HCT  = new CountryType();
            IdentificationCodeType HICT = new IdentificationCodeType();

            HICT.listID            = "PE";
            HCT.IdentificationCode = HICT;
            PartyLegalEntityType HPLET = new PartyLegalEntityType();

            PartyLegalEntityType[] MPLET = { HPLET };
            RegistrationNameType   HRNT  = new RegistrationNameType();

            HRNT.Value = $"<![CDATA[{MS.Emp.RazonSocial}]]>";

            MPLET[0].RegistrationName = HRNT;
            HAT.ID         = HIT;
            HAT.StreetName = HSNT;

            HAT.Country          = HCT;
            HPT.PartyLegalEntity = MPLET;

            AdditionalAccountIDType HAAIT = new AdditionalAccountIDType();

            AdditionalAccountIDType[] MAAIT = { HAAIT };

            MAAIT[0].Value = "6";

            CustomerAssignedAccountIDType CAAIDT = new CustomerAssignedAccountIDType();

            CAAIDT.Value = MS.Emp.Ruc;

            SupplierPartyType HSPT = new SupplierPartyType();

            HSPT.Party = HPT;
            HSPT.AdditionalAccountID       = MAAIT;
            HSPT.CustomerAssignedAccountID = CAAIDT;

            return(HSPT);
        }
Пример #3
0
        public Country(CountryType type)
        {
            switch (type)
            {
                case CountryType.US:
                    this.Code = "US";
                    this.Name = "United States";
                    break;

                case CountryType.CA:
                    this.Code = "CA";
                    this.Name = "Canada";
                    break;

                case CountryType.AU:
                    this.Code = "AU";
                    this.Name = "Australia";
                    break;

                case CountryType.GB:
                    this.Code = "BG";
                    this.Name = "Great Britain";
                    break;
            }
        }
Пример #4
0
        public static string ToBrowseNode(this SearchIndexType indexType, CountryType countryType)
        {
            switch (countryType)
            {
            case CountryType.Japan:
                return(ToBrowseNodeJapan(indexType));

            case CountryType.US:
                return(ToBrowseNodeUS(indexType));

            case CountryType.UK:
                return(ToBrowseNodeUK(indexType));

            case CountryType.France:
                return(ToBrowseNodeFrance(indexType));

            case CountryType.Germany:
                return(ToBrowseNodeGermany(indexType));

            case CountryType.Canada:
                return(ToBrowseNodeCanada(indexType));

            default:
                return(null);
            }
        }
 public QuotationType()
 {
     this.quotationLineField                        = new ObservableCollection <QuotationLineType>();
     this.quotedMonetaryTotalField                  = new MonetaryTotalType();
     this.taxTotalField                             = new ObservableCollection <TaxTotalType>();
     this.destinationCountryField                   = new CountryType();
     this.allowanceChargeField                      = new ObservableCollection <AllowanceChargeType>();
     this.transactionConditionsField                = new TransactionConditionsType();
     this.paymentMeansField                         = new PaymentMeansType();
     this.deliveryTermsField                        = new DeliveryTermsType();
     this.deliveryField                             = new ObservableCollection <DeliveryType>();
     this.originatorCustomerPartyField              = new CustomerPartyType();
     this.buyerCustomerPartyField                   = new CustomerPartyType();
     this.sellerSupplierPartyField                  = new SupplierPartyType();
     this.signatureField                            = new ObservableCollection <SignatureType>();
     this.contractField                             = new ObservableCollection <ContractType>();
     this.additionalDocumentReferenceField          = new ObservableCollection <DocumentReferenceType>();
     this.requestForQuotationDocumentReferenceField = new DocumentReferenceType();
     this.validityPeriodField                       = new PeriodType();
     this.lineCountNumericField                     = new LineCountNumericType();
     this.pricingCurrencyCodeField                  = new PricingCurrencyCodeType();
     this.noteField               = new ObservableCollection <NoteType>();
     this.issueTimeField          = new IssueTimeType();
     this.issueDateField          = new IssueDateType();
     this.uUIDField               = new UUIDType();
     this.copyIndicatorField      = new CopyIndicatorType();
     this.idField                 = new IDType();
     this.profileExecutionIDField = new ProfileExecutionIDType();
     this.profileIDField          = new ProfileIDType();
     this.customizationIDField    = new CustomizationIDType();
     this.uBLVersionIDField       = new UBLVersionIDType();
     this.uBLExtensionsField      = new ObservableCollection <UBLExtensionType>();
 }
 public RequestForQuotationType()
 {
     this.requestForQuotationLineField = new ObservableCollection <RequestForQuotationLineType>();
     this.contractField                    = new ObservableCollection <ContractType>();
     this.destinationCountryField          = new CountryType();
     this.deliveryTermsField               = new ObservableCollection <DeliveryTermsType>();
     this.deliveryField                    = new ObservableCollection <DeliveryType>();
     this.buyerCustomerPartyField          = new CustomerPartyType();
     this.sellerSupplierPartyField         = new SupplierPartyType();
     this.originatorCustomerPartyField     = new CustomerPartyType();
     this.signatureField                   = new ObservableCollection <SignatureType>();
     this.additionalDocumentReferenceField = new ObservableCollection <DocumentReferenceType>();
     this.catalogueDocumentReferenceField  = new DocumentReferenceType();
     this.requestedValidityPeriodField     = new PeriodType();
     this.lineCountNumericField            = new LineCountNumericType();
     this.pricingCurrencyCodeField         = new PricingCurrencyCodeType();
     this.noteField = new ObservableCollection <NoteType>();
     this.submissionDueDateField = new SubmissionDueDateType();
     this.issueTimeField         = new IssueTimeType();
     this.issueDateField         = new IssueDateType();
     this.uUIDField               = new UUIDType();
     this.copyIndicatorField      = new CopyIndicatorType();
     this.idField                 = new IDType();
     this.profileExecutionIDField = new ProfileExecutionIDType();
     this.profileIDField          = new ProfileIDType();
     this.customizationIDField    = new CustomizationIDType();
     this.uBLVersionIDField       = new UBLVersionIDType();
     this.uBLExtensionsField      = new ObservableCollection <UBLExtensionType>();
 }
        public JsonResult GetUnCountryByAreaCode(string sort, string order, int id, string s)
        {
            string orderby = " order by Id desc ";

            if (!string.IsNullOrEmpty(sort) && !string.IsNullOrEmpty(order))
            {
                orderby = "order by " + sort + " " + order;
            }
            IList <object[]> list = NSession.CreateSQLQuery("select Id,CCountry,ECountry,CountryCode,(select AreaName from LogisticsArea where ID=(select top 1 AreaCode from LogisticsAreaCountry la where c.Id= la.CountryCode and la.AreaCode in (select ID from LogisticsArea where LId =(select LId from LogisticsArea where LogisticsArea.Id=:cid)))) as AreaNane from Country c where c.Id not in (select CountryCode from LogisticsAreaCountry where AreaCode=:cid ) and (CCountry like'%" + s + "%' or ECountry like '%" + s + "%')" + orderby)
                                    .SetInt32("cid", id)
                                    .List <object[]>();
            List <CountryType> l = new List <CountryType>();

            foreach (object[] foo in list)
            {
                CountryType c = new CountryType();
                c.Id          = Utilities.ToInt(foo[0]);
                c.CCountry    = foo[1].ToStr();
                c.ECountry    = foo[2].ToStr();
                c.CountryCode = foo[3].ToStr();
                c.AreaName    = foo[4].ToStr();
                l.Add(c);
            }

            return(Json(new { total = l.Count, rows = l }));
        }
Пример #8
0
    private void Update()
    {
        float co2 = GetCO2();

        // Set CountryType depending on smog level
        if (co2 > 500f)
        {
            _countryType = CountryType.DIRTY;
        }
        else
        {
            _countryType = CountryType.CLEAN;
        }

        // Set material color depending on CO2 conc
        SetMaterialColor(GetSmogColorByConcentration());

        // Warning if the country is close to converting from Dirty to Clean
        if (co2 < _co2PreviousFrame && _countryType == CountryType.DIRTY && co2 > 500f && co2 < 550f)
        {
            // Set the material color in a blinking pattern
            if (Time.time % 0.25f < 0.125f)
            {
                SetMaterialColor(Color.red);
            }
        }

        // Make sure number of particles is always positive
        if (co2 < 0)
        {
            NumParticles = 0;
        }

        _co2PreviousFrame = co2;
    }
Пример #9
0
 public LeaderBoardDealsClientRequestMessage(
     CountryType countryId,
     CountryType userCountryId,
     long fromPosition,
     long toPosition,
     long nearTradersCountryCount,
     long nearTradersCount,
     long topCountryCount,
     long topCount,
     long topType)
 {
     Message = new RequestBody <LeaderBoardDealsClientModel>
     {
         RequestBodyType = RequestMessageBodyType.RequestLeaderboardDealsClient,
         Body            = new LeaderBoardDealsClientModel
         {
             CountryId               = countryId,
             UserCountryId           = userCountryId,
             FromPosition            = fromPosition,
             ToPosition              = toPosition,
             NearTradersCountryCount = nearTradersCountryCount,
             NearTradersCount        = nearTradersCount,
             TopCountryCount         = topCountryCount,
             TopCount = topCount,
             TopType  = topType
         }
     };
 }
Пример #10
0
 internal CountryGroup(CountryType countryType)
 {
     CountryType = countryType;
     NomarlGroup = new CountryLvGroup();
     //NomarlGroup.Country = this;
     AdvancedGroup = new CountryLvGroup();
     //AdvancedGroup.Country = this;
 }
Пример #11
0
 public AmazonDataService(CountryType countryType, IAmazonProxyService service, IParser parser, ISettingStore settingStore, ISerializer serializer)
 {
     _service      = service;
     CountryType   = countryType;
     _parser       = parser;
     _settingStore = settingStore;
     _serializer   = serializer;
 }
Пример #12
0
 internal CountryGroup(CountryType countryType)
 {
     CountryType = countryType;
     NomarlGroup = new CountryLvGroup();
     //NomarlGroup.Country = this;
     AdvancedGroup = new CountryLvGroup();
     //AdvancedGroup.Country = this;
 }
Пример #13
0
        public ICountry CreateCountry(GameObject countryContainer, string name, CountryType countryType, Color color)
        {
            var country = countryContainer.GetComponent <Country>();

            country.Name        = name;
            country.CountryType = countryType;
            country.Color       = color;
            return(country);
        }
Пример #14
0
        /// <inheritdoc/>
        // TODO: Implement notice timer with time interval
        public void SendFactionNotice(string message, CountryType faction, short timeInterval = 0)
        {
            var factionPlayers = _gameWorld.Players.Values.Where(p => p.CountryProvider.Country == faction);

            foreach (var player in factionPlayers)
            {
                SendNoticeToPlayer(player, PacketType.NOTICE_FACTION, message);
            }
        }
Пример #15
0
 private bool CheckPlot(PlotInfo plotInfo)
 {
     if (plotInfo.CityID == 3 || plotInfo.CityID == 4)
     {
         CountryType countryType = plotInfo.CityID == 3 ? CountryType.M : CountryType.H;
         return(ContextUser.CountryID == countryType);
     }
     return(true);
 }
Пример #16
0
 /// <summary>
 /// 分为1:先功团,2:护卫队两个阵营
 /// </summary>
 /// <returns></returns>
 public static bool TryGroup(CountryType groupType, out CountryGroup group)
 {
     group = null;
     if (_countryGroupDict != null && _countryGroupDict.ContainsKey(groupType))
     {
         group = _countryGroupDict[groupType];
         return(true);
     }
     return(false);
 }
        private async Task Reload(CountryType countryType)
        {
            SettingService.CountryType = countryType;
            await SettingService.RefleshAvailableTypes();

            await SettingService.RestoreIndexTypeSettingFromFileOrFull();

            IndexTypeSettings.Clear();
            SettingService.IndexTypeSettings.ForEach(x => IndexTypeSettings.Add(x));
        }
Пример #18
0
 public static Country Create(CountryType countryType)
 {
     var metadata = countryType.Metadata();
     return new Country
     {
         CountryType = countryType,
         Funding = GameState.Current.Random.Next(metadata.MinStartingFunding, metadata.MaxStartingFunding) * 1000,
         Satisfaction = CountrySatisfaction.Average
     };
 }
 internal RuntimeCountryInfo(CountryInfo country)
 {
     _currentData        = country ?? throw new ArgumentNullException(nameof(country));
     _runtimeData        = null;
     _continent          = country.Continent;
     _countryType        = country.CountryType;
     _cep1CrCode         = country.Cep1CrCode;
     _countryCodeString  = string.Empty;
     _countryEnumString  = string.Empty;
     _getRegionEnumValue = country.GetRegionEnumValue;
 }
Пример #20
0
 public static Country GetCountryByEnum(CountryType i)
 {
     foreach (var country in countries)
     {
         if (country.CountryType == i)
         {
             return(country);
         }
     }
     return(null);
 }
Пример #21
0
        public async Task <bool> CheckAccessAsync(int schoolId, CountryType countryType, int[] grades)
        {
            var schoolSetting = await _schoolSettingRepo.GetBySchoolIdAsync(schoolId);

            var isTranscriptsSetupComplete = schoolSetting == null ? false : true;

            return(isTranscriptsSetupComplete &&
                   schoolSetting.IsTranscriptEnabled &&
                   _countriesWithAccessToTranscripts.Contains(countryType) &&
                   grades.Any(g => _gradesWithAccessToTranscripts.Contains(g)));
        }
Пример #22
0
        public IEnumerable <SearchIndexType> AvailableTypes(CountryType countryType)
        {
            var results = new List <SearchIndexType>();

            foreach (SearchIndexType e in Enum.GetValues(typeof(SearchIndexType)))
            {
                if (e.ToBrowseNode(countryType) != null)
                {
                    results.Add(e);
                }
            }
            return(results);
        }
Пример #23
0
        /// <summary>
        /// 根据Id获取
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        public CountryType GetById(int Id)
        {
            CountryType obj = NSession.Get <CountryType>(Id);

            if (obj == null)
            {
                throw new Exception("返回实体为空");
            }
            else
            {
                return(obj);
            }
        }
Пример #24
0
        /// <summary>
        /// Gets player near point.
        /// </summary>
        /// <param name="x">x coordinate</param>
        /// <param name="z">z coordinate</param>
        /// <param name="range">minimum range to target, if set to 0 is not calculated</param>
        /// <param name="country">light, dark or both</param>
        /// <param name="includeDead">include dead players or not</param>
        /// <param name="includeNeighborCells">include players from neighbor cells, usually true</param>
        public IEnumerable <Character> GetPlayers(float x, float z, byte range, CountryType country = CountryType.None, bool includeDead = false, bool includeNeighborCells = true)
        {
            var myPlayers = Players.Values.Where(
                p => (includeDead || !p.HealthManager.IsDead) &&                         // filter by death
                (p.CountryProvider.Country == country || country == CountryType.None) && // filter by fraction
                (range == 0 || MathExtensions.Distance(x, p.PosX, z, p.PosZ) <= range)); // filter by range

            if (includeNeighborCells)
            {
                return(myPlayers.Concat(NeighborCells.Select(index => Map.Cells[index]).SelectMany(cell => cell.GetPlayers(x, z, range, country, includeDead, false))).Distinct());
            }
            return(myPlayers);
        }
Пример #25
0
        public static ReceiverNativeAddressType createReceiverNativeAddressType()
        {
            ReceiverNativeAddressType address = new ReceiverNativeAddressType();
            CountryType origin = new CountryType();

            address.streetName    = RECEIVER_LOCAL_STREET;
            address.streetNumber  = RECEIVER_LOCAL_STREETNR;
            address.city          = RECEIVER_LOCAL_CITY;
            address.zip           = RECEIVER_LOCAL_ZIP;
            origin.countryISOCode = RECEIVER_LOCAL_COUNTRY_CODE;
            address.Origin        = origin;
            return(address);
        }
Пример #26
0
        public LegalEntityType SetCountryCode(CountryType countryCode)
        {
            if (this.Item is AddressType)
            {
                ((AddressType)this.Item).CountryCode = countryCode;
            }
            else
            {
                ((OverseasAddressType)this.Item).CountryCode = countryCode;
            }

            return(this);
        }
Пример #27
0
        /// <summary>
        /// Sets an individual party country code
        /// </summary>
        /// <param name="party">The business party</param>
        /// <param name="address">The country code</param>
        /// <returns></returns>
        public IndividualType SetCountryCode(CountryType countryCode)
        {
            if (this.Item is AddressType)
            {
                ((AddressType)this.Item).CountryCode = countryCode;
            }
            else
            {
                ((OverseasAddressType)this.Item).CountryCode = countryCode;
            }

            return(this);
        }
Пример #28
0
        public AdministrativeCentreType SetCountryCode(CountryType countryCode)
        {
            if (this.Item is AddressType)
            {
                ((AddressType)this.Item).CountryCode = countryCode;
            }
            else
            {
                ((OverseasAddressType)this.Item).CountryCode = countryCode;
            }

            return(this);
        }
Пример #29
0
 public OrderType()
 {
     this.orderLineField = new ObservableCollection <OrderLineType>();
     this.anticipatedMonetaryTotalField = new MonetaryTotalType();
     this.taxTotalField                     = new ObservableCollection <TaxTotalType>();
     this.destinationCountryField           = new CountryType();
     this.paymentExchangeRateField          = new ExchangeRateType();
     this.pricingExchangeRateField          = new ExchangeRateType();
     this.taxExchangeRateField              = new ExchangeRateType();
     this.allowanceChargeField              = new ObservableCollection <AllowanceChargeType>();
     this.transactionConditionsField        = new TransactionConditionsType();
     this.paymentTermsField                 = new ObservableCollection <PaymentTermsType>();
     this.paymentMeansField                 = new ObservableCollection <PaymentMeansType>();
     this.deliveryTermsField                = new ObservableCollection <DeliveryTermsType>();
     this.deliveryField                     = new ObservableCollection <DeliveryType>();
     this.accountingCustomerPartyField      = new CustomerPartyType();
     this.freightForwarderPartyField        = new PartyType();
     this.originatorCustomerPartyField      = new CustomerPartyType();
     this.sellerSupplierPartyField          = new SupplierPartyType();
     this.buyerCustomerPartyField           = new CustomerPartyType();
     this.signatureField                    = new ObservableCollection <SignatureType>();
     this.projectReferenceField             = new ObservableCollection <ProjectReferenceType>();
     this.contractField                     = new ObservableCollection <ContractType>();
     this.additionalDocumentReferenceField  = new ObservableCollection <DocumentReferenceType>();
     this.catalogueReferenceField           = new CatalogueReferenceType();
     this.originatorDocumentReferenceField  = new DocumentReferenceType();
     this.orderDocumentReferenceField       = new ObservableCollection <DocumentReferenceType>();
     this.quotationDocumentReferenceField   = new DocumentReferenceType();
     this.validityPeriodField               = new ObservableCollection <PeriodType>();
     this.lineCountNumericField             = new LineCountNumericType();
     this.accountingCostField               = new AccountingCostType();
     this.accountingCostCodeField           = new AccountingCostCodeType();
     this.customerReferenceField            = new CustomerReferenceType();
     this.taxCurrencyCodeField              = new TaxCurrencyCodeType();
     this.pricingCurrencyCodeField          = new PricingCurrencyCodeType();
     this.documentCurrencyCodeField         = new DocumentCurrencyCodeType();
     this.requestedInvoiceCurrencyCodeField = new RequestedInvoiceCurrencyCodeType();
     this.noteField               = new ObservableCollection <NoteType>();
     this.orderTypeCodeField      = new OrderTypeCodeType();
     this.issueTimeField          = new IssueTimeType();
     this.issueDateField          = new IssueDateType();
     this.uUIDField               = new UUIDType();
     this.copyIndicatorField      = new CopyIndicatorType();
     this.salesOrderIDField       = new SalesOrderIDType();
     this.idField                 = new IDType();
     this.profileExecutionIDField = new ProfileExecutionIDType();
     this.profileIDField          = new ProfileIDType();
     this.customizationIDField    = new CustomizationIDType();
     this.uBLVersionIDField       = new UBLVersionIDType();
     this.uBLExtensionsField      = new ObservableCollection <UBLExtensionType>();
 }
 internal RuntimeCountryInfo(
     Continent continent, CountryType countryType, long cep1CrCode,
     string countryCodeString, string countryEnumString,
     Dictionary <string, string> runtimeData)
 {
     _currentData        = null;
     _runtimeData        = runtimeData ?? throw new ArgumentNullException(nameof(runtimeData));
     _continent          = continent;
     _countryType        = countryType;
     _cep1CrCode         = cep1CrCode;
     _countryCodeString  = countryCodeString;
     _countryEnumString  = countryEnumString;
     _getRegionEnumValue = _ => RegionEnumValue.Unknown;
 }
Пример #31
0
 public JsonResult DeleteConfirmed(int id)
 {
     try
     {
         CountryType obj = GetById(id);
         NSession.Delete(obj);
         NSession.Flush();
     }
     catch (Exception ee)
     {
         return(Json(new { IsSuccess = false, ErrorMsg = "出错了" }));
     }
     return(Json(new { IsSuccess = true }));
 }
Пример #32
0
        private static CountryType GetCountry(SRC.CountryType countryType)
        {
            if (countryType == null)
            {
                return(null);
            }
            CountryType cty = new CountryType(CountryCodeType.AT);

            if (countryType.Text != null)
            {
                cty.CountryCode = countryType.CountryCode.ToString();
                cty.Value       = CountryCodes.GetFromCode(cty.CountryCode.ToString()).Country;
            }
            return(cty);
        }
Пример #33
0
        public static NativeAddressType createShipperNativeAddressType()
        {
            NativeAddressType address = new NativeAddressType();

            address.streetName   = SHIPPER_STREET;
            address.streetNumber = SHIPPER_STREETNR;
            address.city         = SHIPPER_CITY;
            address.zip          = SHIPPER_ZIP;
            CountryType origin = new CountryType();

            origin.countryISOCode = SHIPPER_COUNTRY_CODE;
            address.Origin        = origin;


            return(address);
        }
Пример #34
0
 protected override object this[string index]
 {
     get
     {
         #region
         switch (index)
         {
             case "CityID": return CityID;
             case "CityType": return CityType;
             case "CityName": return CityName;
             case "PreCityID": return PreCityID;
             case "PointX": return PointX;
             case "PointY": return PointY;
             case "GoPointY1": return GoPointY1;
             case "GoPointY2": return GoPointY2;
             case "MinLv": return MinLv;
             case "MaxLv": return MaxLv;
             case "HeadID": return HeadID;
             case "BgScence": return BgScence;
             case "FgScence": return FgScence;
             case "CityShowFilter": return CityShowFilter;
             case "CountryID": return CountryID;
             case "Version": return Version;
             default: throw new ArgumentException(string.Format("CityInfo index[{0}] isn't exist.", index));
         }
         #endregion
     }
     set
     {
         #region
         switch (index)
         {
             case "CityID":
                 _CityID = value.ToInt();
                 break;
             case "CityType":
                 _CityType = value.ToShort();
                 break;
             case "CityName":
                 _CityName = value.ToNotNullString();
                 break;
             case "PreCityID":
                 _PreCityID = value.ToNotNullString();
                 break;
             case "PointX":
                 _PointX = value.ToShort();
                 break;
             case "PointY":
                 _PointY = value.ToShort();
                 break;
             case "GoPointY1":
                 _GoPointY1 = value.ToShort();
                 break;
             case "GoPointY2":
                 _GoPointY2 = value.ToShort();
                 break;
             case "MinLv":
                 _MinLv = value.ToShort();
                 break;
             case "MaxLv":
                 _MaxLv = value.ToShort();
                 break;
             case "HeadID":
                 _HeadID = value.ToNotNullString();
                 break;
             case "BgScence":
                 _BgScence = value.ToNotNullString();
                 break;
             case "FgScence":
                 _FgScence = value.ToNotNullString();
                 break;
             case "CityShowFilter":
                 _CityShowFilter = value.ToNotNullString();
                 break;
             case "CountryID":
                 _CountryID = value.ToEnum<CountryType>();
                 break;
             case "Version":
                 _Version = value.ToInt();
                 break;
             default: throw new ArgumentException(string.Format("CityInfo index[{0}] isn't exist.", index));
         }
         #endregion
     }
 }
Пример #35
0
 protected override object this[string index]
 {
     get
     {
         #region
         switch (index)
         {
             case "UserID": return UserID;
             case "CountryID": return CountryID;
             case "CityID": return CityID;
             case "PointX": return PointX;
             case "PointY": return PointY;
             case "NickName": return NickName;
             case "Sex": return Sex;
             case "MercenariesID": return MercenariesID;
             case "UserLv": return UserLv;
             case "ObtainNum": return ObtainNum;
             case "EnergyNum": return EnergyNum;
             case "GiftGold": return GiftGold;
             case "PayGold": return PayGold;
             case "ItemGold": return ItemGold;
             case "UseGold": return UseGold;
             case "GameCoin": return GameCoin;
             case "ExpNum": return ExpNum;
             case "VipLv": return VipLv;
             case "UserStatus": return UserStatus;
             case "MsgState": return MsgState;
             case "GridNum": return GridNum;
             case "WarehouseNum": return WarehouseNum;
             case "CrystalNum": return CrystalNum;
             case "QueueNum": return QueueNum;
             case "UseMagicID": return UseMagicID;
             case "TaskProgress": return TaskProgress;
             case "PlotProgress": return PlotProgress;
             case "PlotCompleteDate": return PlotCompleteDate;
             case "RankID": return RankID;
             case "RetailID": return RetailID;
             case "Pid": return Pid;
             case "MobileType": return MobileType;
             case "ScreenX": return ScreenX;
             case "ScreenY": return ScreenY;
             case "ClientAppVersion": return ClientAppVersion;
             case "CreateDate": return CreateDate;
             case "UserLocation": return UserLocation;
             case "SweepPool": return SweepPool;
             case "ExtGold": return ExtGold;
             case "LoginTime": return LoginTime;
             case "SurplusEnergy": return SurplusEnergy;
             case "UserExtend": return UserExtend;
             case "SessionID": return SessionID;
             case "CardID": return CardID;
             case "CardTimes": return CardTimes;
             case "VictoryNum": return VictoryNum;
             case "CombatNum": return CombatNum;
             case "Leadership": return Leadership;
             case "AbilityExperienceNum": return AbilityExperienceNum;
             case "HonourNum": return HonourNum;
             case "SportsIntegral": return SportsIntegral;
             case "RankDate": return RankDate;
             case "IsLv": return IsLv;
             case "WizardDate": return WizardDate;
             case "WizardNum": return WizardNum;
             default: throw new ArgumentException(string.Format("GameUser index[{0}] isn't exist.", index));
         }
         #endregion
     }
     set
     {
         #region
         switch (index)
         {
             case "UserID":
                 _UserID = value.ToNotNullString();
                 break;
             case "CountryID":
                 _CountryID = value.ToEnum<CountryType>();
                 break;
             case "CityID":
                 _CityID = value.ToInt();
                 break;
             case "PointX":
                 _PointX = value.ToShort();
                 break;
             case "PointY":
                 _PointY = value.ToShort();
                 break;
             case "NickName":
                 _NickName = value.ToNotNullString();
                 break;
             case "Sex":
                 _Sex = value.ToBool();
                 break;
             case "MercenariesID":
                 _MercenariesID = value.ToNotNullString();
                 break;
             case "UserLv":
                 _UserLv = value.ToShort();
                 break;
             case "ObtainNum":
                 _ObtainNum = value.ToInt();
                 break;
             case "EnergyNum":
                 _EnergyNum = value.ToShort();
                 break;
             case "GiftGold":
                 _GiftGold = value.ToInt();
                 break;
             case "PayGold":
                 _PayGold = value.ToInt();
                 break;
             case "ItemGold":
                 _ItemGold = value.ToInt();
                 break;
             case "UseGold":
                 _UseGold = value.ToInt();
                 break;
             case "GameCoin":
                 _GameCoin = value.ToInt();
                 break;
             case "ExpNum":
                 _ExpNum = value.ToInt();
                 break;
             case "VipLv":
                 _VipLv = value.ToInt();
                 break;
             case "UserStatus":
                 _UserStatus = value.ToEnum<UserStatus>();
                 break;
             case "MsgState":
                 _MsgState = value.ToBool();
                 break;
             case "GridNum":
                 _GridNum = value.ToInt();
                 break;
             case "WarehouseNum":
                 _WarehouseNum = value.ToInt();
                 break;
             case "CrystalNum":
                 _CrystalNum = value.ToInt();
                 break;
             case "QueueNum":
                 _QueueNum = value.ToShort();
                 break;
             case "UseMagicID":
                 _UseMagicID = value.ToInt();
                 break;
             case "TaskProgress":
                 _TaskProgress = value.ToInt();
                 break;
             case "PlotProgress":
                 _PlotProgress = value.ToInt();
                 break;
             case "PlotCompleteDate":
                 _PlotCompleteDate = value.ToDateTime();
                 break;
             case "RankID":
                 _RankID = value.ToInt();
                 break;
             case "RetailID":
                 _RetailID = value.ToNotNullString();
                 break;
             case "Pid":
                 _Pid = value.ToNotNullString();
                 break;
             case "MobileType":
                 _MobileType = value.ToEnum<MobileType>();
                 break;
             case "ScreenX":
                 _ScreenX = value.ToShort();
                 break;
             case "ScreenY":
                 _ScreenY = value.ToShort();
                 break;
             case "ClientAppVersion":
                 _ClientAppVersion = value.ToShort();
                 break;
             case "CreateDate":
                 _CreateDate = value.ToDateTime();
                 break;
             case "UserLocation":
                 _UserLocation = value.ToEnum<Location>();
                 break;
             case "SweepPool":
                 _SweepPool = ConvertCustomField<SweepPoolInfo>(value, index);
                 break;
             case "ExtGold":
                 _ExtGold = value.ToInt();
                 break;
             case "LoginTime":
                 _LoginTime = value.ToDateTime();
                 break;
             case "SurplusEnergy":
                 _SurplusEnergy = value.ToShort();
                 break;
             case "UserExtend":
                 _UserExtend = ConvertCustomField<GameUserExtend>(value, index);
                 break;
             case "CardID":
                 _CardID = value.ToNotNullString();
                 break;
             case "CardTimes":
                 _CardTimes = value.ToInt();
                 break;
             case "VictoryNum":
                 _VictoryNum = value.ToInt();
                 break;
             case "CombatNum":
                 _CombatNum = value.ToInt();
                 break;
             case "Leadership":
                 _Leadership = value.ToInt();
                 break;
             case "AbilityExperienceNum":
                 _AbilityExperienceNum = value.ToInt();
                 break;
             case "HonourNum":
                 _HonourNum = value.ToInt();
                 break;
             case "IsLv":
                 _IsLv = value.ToBool();
                 break;
             case "SportsIntegral":
                 _SportsIntegral = value.ToDecimal();
                 break;
             case "RankDate":
                 _RankDate = value.ToDateTime();
                 break;
             case "WizardDate":
                 _WizardDate = value.ToDateTime();
                 break;
             case "WizardNum":
                 _WizardNum = value.ToInt();
                 break;
             default: throw new ArgumentException(string.Format("GameUser index[{0}] isn't exist.", index));
         }
         #endregion
     }
 }
Пример #36
0
        /// <summary>
        /// 获取国家的参战人员
        /// </summary>
        /// <param name="countryType"></param>
        /// <param name="lv">1:40级内,2:40级发上</param>
        /// <returns></returns>
        public List<CountryUser> GetCountryUser(CountryType countryType, short lv)
        {
            List<CountryUser> list = new List<CountryUser>();
            CountryGroup countryGroup;
            if (TryGroup(countryType, out countryGroup))
            {
                List<CountryLvGroup> lvGroupList = new List<CountryLvGroup>();
                if (lv == 0)
                {
                    lvGroupList.Add(countryGroup.NomarlGroup);
                    lvGroupList.Add(countryGroup.AdvancedGroup);
                }
                if (lv == 2)
                {
                    lvGroupList.Add(countryGroup.AdvancedGroup);
                }
                else
                {
                    lvGroupList.Add(countryGroup.NomarlGroup);
                }
                foreach (var lvGroup in lvGroupList)
                {
                    List<KeyValuePair<string, CountryUser>> cuserList = lvGroup.UserList.ToList();

                    foreach (KeyValuePair<string, CountryUser> keyPair in cuserList)
                    {
                        CountryUser cuser = keyPair.Value;
                        if (!list.Exists(m => m.UserId.Equals(cuser.UserId)))
                        {
                            list.Add(cuser);
                        }
                    }

                }

            }
            return list;
        }
Пример #37
0
        /// <summary>
        /// Sets an individual party country code.
        /// </summary>
        /// <param name="countryCode">The country code.</param>
        /// <returns></returns>
        public IndividualType SetCountryCode(CountryType countryCode)
        {
            if (this.Item is AddressType)
            {
                (this.Item as AddressType).CountryCode = countryCode;
            }
            else
            {
                (this.Item as OverseasAddressType).CountryCode = countryCode;
            }

            return this;
        }
Пример #38
0
 /// <summary>
 /// 分为1:先功团,2:护卫队两个阵营
 /// </summary>
 /// <returns></returns>
 public static bool TryGroup(CountryType groupType, out CountryGroup group)
 {
     group = null;
     if (_countryGroupDict != null && _countryGroupDict.ContainsKey(groupType))
     {
         group = _countryGroupDict[groupType];
         return true;
     }
     return false;
 }
Пример #39
0
        public AdministrativeCentreType SetCountryCode(CountryType countryCode)
        {
            if (this.Item is AddressType)
            {
                (this.Item as AddressType).CountryCode = countryCode;
            }
            else
            {
                (this.Item as OverseasAddressType).CountryCode = countryCode;
            }

            return this;
        }
Пример #40
0
        public LegalEntityType SetCountryCode(CountryType countryCode)
        {
            if (this.Item is AddressType)
            {
                (this.Item as AddressType).CountryCode = countryCode;
            }
            else
            {
                (this.Item as OverseasAddressType).CountryCode = countryCode;
            }

            return this;
        }
Пример #41
0
 public CalendarManager(DateTime refDate, CountryType countryType)
 {
     this.refDate_ = refDate;
     this.countryType_ = countryType;
     this.BusinessDayConvention_ = BusinessDayConv.ModifiedFollowing;
 }
Пример #42
0
 protected override object this[string index]
 {
     get
     {
         #region
         switch (index)
         {
             case "TaskID": return TaskID;
             case "TaskType": return TaskType;
             case "PreTaskID": return PreTaskID;
             case "CountryID": return CountryID;
             case "TaskName": return TaskName;
             case "TaskDescp": return TaskDescp;
             case "ReleaseNpcID": return ReleaseNpcID;
             case "ReleaseDialogue": return ReleaseDialogue;
             case "TakedDialogue": return TakedDialogue;
             case "DeliveryNpcID": return DeliveryNpcID;
             case "DeliveryDialogue": return DeliveryDialogue;
             case "TaskLv": return TaskLv;
             case "TermsType": return TermsType;
             case "PlotID": return PlotID;
             case "PlotNpcID": return PlotNpcID;
             case "TargetMonsterID": return TargetMonsterID;
             case "TargetMonsterNum": return TargetMonsterNum;
             case "TargetItemID": return TargetItemID;
             case "TargetItemNum": return TargetItemNum;
             case "FunctionEnum": return FunctionEnum;
             case "Experience": return Experience;
             case "GameCoin": return GameCoin;
             case "EnablePlot": return EnablePlot;
             case "Version": return Version;
             case "GeneralID": return GeneralID;
             case "Reward": return Reward;
             default: throw new ArgumentException(string.Format("StoryTaskInfo index[{0}] isn't exist.", index));
         }
         #endregion
     }
     set
     {
         #region
         switch (index)
         {
             case "TaskID":
                 _TaskID = value.ToInt();
                 break;
             case "TaskType":
                 _TaskType = value.ToEnum<TaskType>();
                 break;
             case "PreTaskID":
                 _PreTaskID = value as int[] ?? new int[0];
                 break;
             case "CountryID":
                 _CountryID = value.ToEnum<CountryType>();
                 break;
             case "TaskName":
                 _TaskName = value.ToNotNullString();
                 break;
             case "TaskDescp":
                 _TaskDescp = value.ToNotNullString();
                 break;
             case "ReleaseNpcID":
                 _ReleaseNpcID = value.ToInt();
                 break;
             case "ReleaseDialogue":
                 _ReleaseDialogue = ConvertCustomField<CacheList<DialogueInfo>>(value, index);
                 break;
             case "TakedDialogue":
                 _TakedDialogue = ConvertCustomField<CacheList<DialogueInfo>>(value, index);
                 break;
             case "DeliveryNpcID":
                 _DeliveryNpcID = value.ToInt();
                 break;
             case "DeliveryDialogue":
                 _DeliveryDialogue = ConvertCustomField<CacheList<DialogueInfo>>(value, index);
                 break;
             case "TaskLv":
                 _TaskLv = value.ToShort();
                 break;
             case "TermsType":
                 _TermsType = value.ToEnum<PlotTermsType>();
                 break;
             case "PlotID":
                 _PlotID = value.ToInt();
                 break;
             case "PlotNpcID":
                 _PlotNpcID = value.ToInt();
                 break;
             case "TargetMonsterID":
                 _TargetMonsterID = value.ToNotNullString();
                 break;
             case "TargetMonsterNum":
                 _TargetMonsterNum = value.ToNotNullString();
                 break;
             case "TargetItemID":
                 _TargetItemID = value.ToInt();
                 break;
             case "TargetItemNum":
                 _TargetItemNum = value.ToInt();
                 break;
             case "FunctionEnum":
                 _FunctionEnum = value.ToEnum<FunctionEnum>();
                 break;
             case "Experience":
                 _Experience = value.ToInt();
                 break;
             case "GameCoin":
                 _GameCoin = value.ToInt();
                 break;
             case "EnablePlot":
                 _EnablePlot = value.ToNotNullString();
                 break;
             case "Version":
                 _Version = value.ToInt();
                 break;
             case "GeneralID":
                 _GeneralID = value.ToInt();
                 break;
             case "Reward":
                 _Reward = ConvertCustomField<CacheList<PrizeInfo>>(value, index);
                 break;
             default: throw new ArgumentException(string.Format("StoryTaskInfo index[{0}] isn't exist.", index));
         }
         #endregion
     }
 }