protected override void Fill(WmXmlPackage wmXmlPackage) { if (null == wmXmlPackage) { throw new ArgumentNullException(nameof(wmXmlPackage)); } TransferId = wmXmlPackage.SelectInt64("operation/@wmtransid"); InvoiceId = wmXmlPackage.SelectInt64("operation/@wminvoiceid"); CreateTime = wmXmlPackage.SelectWmDateTime("operation/operdate"); Description = (Description)wmXmlPackage.SelectString("operation/purpose"); SourcePurse = wmXmlPackage.SelectPurse("operation/pursefrom"); SourceWmId = wmXmlPackage.SelectWmId("operation/wmidfrom"); CapitallerFlag = wmXmlPackage.SelectBoolIfExists("operation/capitallerflag") ?? false; EnumFlag = wmXmlPackage.SelectUInt8IfExists("operation/enumflag") ?? 0; IpAddress = IPAddress.Parse(wmXmlPackage.SelectNotEmptyString("operation/IPAddress")); TelepatPhone = wmXmlPackage.SelectString("operation/telepat_phone"); TelepatMethod = (TelepatMethod?)wmXmlPackage.SelectEnumFromIntegerIfExists(typeof(TelepatMethod), "operation/telepat_paytype"); PaymerNumber = wmXmlPackage.TrySelectNotEmptyString("operation/paymer_number"); PaymerEmail = wmXmlPackage.TrySelectNotEmptyString("operation/paymer_email"); PaymerType = (PaymerType?)wmXmlPackage.SelectEnumFromIntegerIfExists(typeof(PaymerType), "operation/paymer_type") ?? PaymerType.None; //CashierNumber = wmXmlResponsePackage.SelectString("operation/cashier_number"); //if (!string.IsNullOrEmpty(wmXmlResponsePackage.SelectString("operation/cashier_date"))) // CashierDate = wmXmlResponsePackage.SelectWmDateTime("operation/cashier_date"); //if (!string.IsNullOrEmpty(wmXmlResponsePackage.SelectString("operation/cashier_amount"))) // CashierAmount = wmXmlResponsePackage.SelectAmount("operation/cashier_amount"); SdpType = wmXmlPackage.SelectInt32IfExists("operation/sdp_type"); }
protected override void Fill(WmXmlPackage wmXmlPackage) { if (null == wmXmlPackage) { throw new ArgumentNullException(nameof(wmXmlPackage)); } WmId = wmXmlPackage.SelectWmId("certinfo/@wmid"); // attestat Degree = (PassportDegree)wmXmlPackage.SelectInt32("certinfo/attestat/row/@tid"); Revoked = wmXmlPackage.SelectBool("certinfo/attestat/row/@recalled"); CreateTime = wmXmlPackage.SelectWmDateTime("certinfo/attestat/row/@datecrt"); IssuerId = wmXmlPackage.SelectWmId("certinfo/attestat/row/@regwmid"); IssuerAlias = wmXmlPackage.SelectString("certinfo/attestat/row/@regnickname"); WmIdInfoList = new List <WmIdInfo>(); var packageList = wmXmlPackage.SelectList("certinfo/wmids/row"); foreach (var innerPackage in packageList) { var wmIdInfo = new WmIdInfo(); wmIdInfo.Fill(new WmXmlPackage(innerPackage)); WmIdInfoList.Add(wmIdInfo); } // userinfo Status = (PassportStatus)wmXmlPackage.SelectInt32("certinfo/userinfo/value/row/@ctype"); Appointment = (PassportAppointment)wmXmlPackage.SelectInt32("certinfo/userinfo/value/row/@jstatus"); Basis = wmXmlPackage.SelectString("certinfo/userinfo/value/row/@osnovainfo"); Alias = wmXmlPackage.SelectString("certinfo/userinfo/value/row/@nickname"); Information = wmXmlPackage.SelectString("certinfo/userinfo/value/row/@infoopen"); City = wmXmlPackage.SelectString("certinfo/userinfo/value/row/@city"); Region = wmXmlPackage.SelectString("certinfo/userinfo/value/row/@region"); Country = wmXmlPackage.SelectString("certinfo/userinfo/value/row/@country"); ZipCode = wmXmlPackage.SelectString("certinfo/userinfo/value/row/@zipcode"); Address = wmXmlPackage.SelectString("certinfo/userinfo/value/row/@adres"); Surname = wmXmlPackage.SelectString("certinfo/userinfo/value/row/@fname"); FirstName = wmXmlPackage.SelectString("certinfo/userinfo/value/row/@iname"); Patronymic = wmXmlPackage.SelectString("certinfo/userinfo/value/row/@oname"); // Passport PassportNumber = wmXmlPackage.SelectString("certinfo/userinfo/value/row/@pnomer"); PassportDate = wmXmlPackage.SelectWmDateIfExists("certinfo/userinfo/value/row/@pdate"); PassportCountry = wmXmlPackage.SelectString("certinfo/userinfo/value/row/@pcountry"); PassportCity = wmXmlPackage.SelectString("certinfo/userinfo/value/row/@pcity"); PassportIssuer = wmXmlPackage.SelectString("certinfo/userinfo/value/row/@pbywhom"); RegistrationCountry = wmXmlPackage.SelectString("certinfo/userinfo/value/row/@rcountry"); RegistrationCity = wmXmlPackage.SelectString("certinfo/userinfo/value/row/@rcity"); RegistrationAddress = wmXmlPackage.SelectString("certinfo/userinfo/value/row/@radres"); // Birthplace and birthday Birthplace = wmXmlPackage.SelectString("certinfo/userinfo/value/row/@bplace"); int?birthDay = wmXmlPackage.SelectInt32IfExists("certinfo/userinfo/value/row/@bday"); if (null != birthDay) { int birthMonth = wmXmlPackage.SelectInt32("certinfo/userinfo/value/row/@bmonth"); int birthYear = wmXmlPackage.SelectInt32("certinfo/userinfo/value/row/@byear"); Birthday = (WmDate) new DateTime(birthYear, birthMonth, birthDay.Value); } // Organization OrganizationName = wmXmlPackage.SelectString("certinfo/userinfo/value/row/@name"); OrganizationManager = wmXmlPackage.SelectString("certinfo/userinfo/value/row/@dirfio"); OrganizationAccountant = wmXmlPackage.SelectString("certinfo/userinfo/value/row/@buhfio"); OrganizationTaxId = wmXmlPackage.SelectString("certinfo/userinfo/value/row/@inn"); OrganizationId = wmXmlPackage.SelectString("certinfo/userinfo/value/row/@okpo"); OrganizationActivityId = wmXmlPackage.SelectString("certinfo/userinfo/value/row/@okonx"); OrganizationAddress = wmXmlPackage.SelectString("certinfo/userinfo/value/row/@jadres"); OrganizationCountry = wmXmlPackage.SelectString("certinfo/userinfo/value/row/@jcountry"); OrganizationCity = wmXmlPackage.SelectString("certinfo/userinfo/value/row/@jcity"); OrganizationZipCode = wmXmlPackage.SelectString("certinfo/userinfo/value/row/@jzipcode"); OrganizationBankName = wmXmlPackage.SelectString("certinfo/userinfo/value/row/@bankname"); OrganizationBankId = wmXmlPackage.SelectString("certinfo/userinfo/value/row/@bik"); OrganizationCorrespondentAccount = wmXmlPackage.SelectString("certinfo/userinfo/value/row/@ks"); OrganizationAccount = wmXmlPackage.SelectString("certinfo/userinfo/value/row/@rs"); // Contacts HomePhone = wmXmlPackage.SelectString("certinfo/userinfo/value/row/@phonehome"); CellPhone = wmXmlPackage.SelectString("certinfo/userinfo/value/row/@phonemobile"); ICQ = wmXmlPackage.SelectString("certinfo/userinfo/value/row/@icq"); Fax = wmXmlPackage.SelectString("certinfo/userinfo/value/row/@fax"); EMail = wmXmlPackage.SelectString("certinfo/userinfo/value/row/@email"); WebAddress = wmXmlPackage.SelectString("certinfo/userinfo/value/row/@web"); ContactPhone = wmXmlPackage.SelectString("certinfo/userinfo/value/row/@phone"); CapitallerParent = wmXmlPackage.TrySelectWmId("certinfo/userinfo/value/row/@cap_owner"); PassportInspection = wmXmlPackage.SelectBoolIfExists("certinfo/userinfo/value/row/@pasdoc") ?? false; TaxInspection = wmXmlPackage.SelectBoolIfExists("certinfo/userinfo/value/row/@inndoc") ?? false; StatusConfirmation = selectConfirmationFlag(wmXmlPackage, "certinfo/userinfo/check-lock/row/@jstatus"); BasisConfirmation = selectConfirmationFlag(wmXmlPackage, "certinfo/userinfo/check-lock/row/@osnovainfo"); AliasConfirmation = selectConfirmationFlag(wmXmlPackage, "certinfo/userinfo/check-lock/row/@nickname"); InformationConfirmation = selectConfirmationFlag(wmXmlPackage, "certinfo/userinfo/check-lock/row/@infoopen"); CityConfirmation = selectConfirmationFlag(wmXmlPackage, "certinfo/userinfo/check-lock/row/@city"); RegionConfirmation = selectConfirmationFlag(wmXmlPackage, "certinfo/userinfo/check-lock/row/@region"); CountryConfirmation = selectConfirmationFlag(wmXmlPackage, "certinfo/userinfo/check-lock/row/@country"); ZipCodeConfirmation = selectConfirmationFlag(wmXmlPackage, "certinfo/userinfo/check-lock/row/@zipcode"); AddressConfirmation = selectConfirmationFlag(wmXmlPackage, "certinfo/userinfo/check-lock/row/@adres"); SurnameConfirmation = selectConfirmationFlag(wmXmlPackage, "certinfo/userinfo/check-lock/row/@fname"); FirstNameConfirmation = selectConfirmationFlag(wmXmlPackage, "certinfo/userinfo/check-lock/row/@iname"); PatronymicConfirmation = selectConfirmationFlag(wmXmlPackage, "certinfo/userinfo/check-lock/row/@oname"); // Passport confirmation PassportNumberConfirmation = selectConfirmationFlag(wmXmlPackage, "certinfo/userinfo/check-lock/row/@pnomer"); PassportDateConfirmation = selectConfirmationFlag(wmXmlPackage, "certinfo/userinfo/check-lock/row/@pdate"); PassportCountryConfirmation = selectConfirmationFlag(wmXmlPackage, "certinfo/userinfo/check-lock/row/@pcountry"); PassportCityConfirmation = selectConfirmationFlag(wmXmlPackage, "certinfo/userinfo/check-lock/row/@pcity"); PassportIssuerConfirmation = selectConfirmationFlag(wmXmlPackage, "certinfo/userinfo/check-lock/row/@pbywhom"); RegistrationCountryConfirmation = selectConfirmationFlag(wmXmlPackage, "certinfo/userinfo/check-lock/row/@rcountry"); RegistrationCityConfirmation = selectConfirmationFlag(wmXmlPackage, "certinfo/userinfo/check-lock/row/@rcity"); RegistrationAddressConfirmation = selectConfirmationFlag(wmXmlPackage, "certinfo/userinfo/check-lock/row/@radres"); // Birthplace and birthday confirmation BirthplaceConfirmation = selectConfirmationFlag(wmXmlPackage, "certinfo/userinfo/check-lock/row/@bplace"); BirthdayConfirmation = selectConfirmationFlag(wmXmlPackage, "certinfo/userinfo/check-lock/row/@bday"); // Organization confirmation OrganizationNameConfirmation = selectConfirmationFlag(wmXmlPackage, "certinfo/userinfo/check-lock/row/@name"); OrganizationManagerConfirmation = selectConfirmationFlag(wmXmlPackage, "certinfo/userinfo/check-lock/row/@dirfio"); OrganizationAccountantConfirmation = selectConfirmationFlag(wmXmlPackage, "certinfo/userinfo/check-lock/row/@buhfio"); OrganizationTaxIdConfirmation = selectConfirmationFlag(wmXmlPackage, "certinfo/userinfo/check-lock/row/@inn"); OrganizationIdConfirmation = selectConfirmationFlag(wmXmlPackage, "certinfo/userinfo/check-lock/row/@okpo"); OrganizationActivityIdConfirmation = selectConfirmationFlag(wmXmlPackage, "certinfo/userinfo/check-lock/row/@okonx"); OrganizationAddressConfirmation = selectConfirmationFlag(wmXmlPackage, "certinfo/userinfo/check-lock/row/@jadres"); OrganizationCountryConfirmation = selectConfirmationFlag(wmXmlPackage, "certinfo/userinfo/check-lock/row/@jcountry"); OrganizationCityConfirmation = selectConfirmationFlag(wmXmlPackage, "certinfo/userinfo/check-lock/row/@jcity"); OrganizationZipCodeConfirmation = selectConfirmationFlag(wmXmlPackage, "certinfo/userinfo/check-lock/row/@jzipcode"); OrganizationBankNameConfirmation = selectConfirmationFlag(wmXmlPackage, "certinfo/userinfo/check-lock/row/@bankname"); OrganizationBankIdConfirmation = selectConfirmationFlag(wmXmlPackage, "certinfo/userinfo/check-lock/row/@bik"); OrganizationCorrespondentAccountConfirmation = selectConfirmationFlag(wmXmlPackage, "certinfo/userinfo/check-lock/row/@ks"); OrganizationAccountConfirmation = selectConfirmationFlag(wmXmlPackage, "certinfo/userinfo/check-lock/row/@rs"); // Contacts confirmation HomePhoneConfirmation = selectConfirmationFlag(wmXmlPackage, "certinfo/userinfo/check-lock/row/@phonehome"); CellPhoneConfirmation = selectConfirmationFlag(wmXmlPackage, "certinfo/userinfo/check-lock/row/@phonemobile"); ICQConfirmation = selectConfirmationFlag(wmXmlPackage, "certinfo/userinfo/check-lock/row/@icq"); FaxConfirmation = selectConfirmationFlag(wmXmlPackage, "certinfo/userinfo/check-lock/row/@fax"); EMailConfirmation = selectConfirmationFlag(wmXmlPackage, "certinfo/userinfo/check-lock/row/@email"); WebAddressConfirmation = selectConfirmationFlag(wmXmlPackage, "certinfo/userinfo/check-lock/row/@web"); ContactPhoneConfirmation = selectConfirmationFlag(wmXmlPackage, "certinfo/userinfo/check-lock/row/@phone"); }