protected override void Fill(WmXmlPackage wmXmlPackage) { if (null == wmXmlPackage) { throw new ArgumentNullException(nameof(wmXmlPackage)); } OperationId = wmXmlPackage.SelectUInt32("operation/@wmtransid"); InvoiceId = wmXmlPackage.SelectUInt32("operation/@wminvoiceid"); CreateTime = wmXmlPackage.SelectWmDateTime("operation/operdate"); Description = (Description)wmXmlPackage.SelectString("operation/purpose"); SourcePurse = wmXmlPackage.SelectPurse("operation/pursefrom"); SourceWmId = wmXmlPackage.SelectWmId("operation/wmidfrom"); var capitallerFlagXPath = "operation/capitallerflag"; if (!string.IsNullOrEmpty(wmXmlPackage.SelectString(capitallerFlagXPath))) { CapitallerFlag = wmXmlPackage.SelectBool(capitallerFlagXPath); } var enumFlagFlagXPath = "operation/enumflag"; if (!string.IsNullOrEmpty(wmXmlPackage.SelectString(enumFlagFlagXPath))) { EnumFlag = wmXmlPackage.SelectUInt8(enumFlagFlagXPath); } IpAddress = IPAddress.Parse(wmXmlPackage.SelectNotEmptyString("operation/IPAddress")); TelepatPhone = wmXmlPackage.SelectString("operation/telepat_phone"); // TelepatMethod var telepatMethod = wmXmlPackage.SelectString("operation/telepat_paytype"); if (!string.IsNullOrEmpty(telepatMethod) && !"null".Equals(telepatMethod)) { TelepatMethod = (TelepatMethod)int.Parse(telepatMethod, NumberStyles.Integer, CultureInfo.InvariantCulture.NumberFormat); } PaymerNumber = wmXmlPackage.SelectString("operation/paymer_number"); PaymerEmail = wmXmlPackage.SelectString("operation/paymer_email"); string paymerType = wmXmlPackage.SelectString("operation/paymer_type"); if (!string.IsNullOrEmpty(paymerType) && !"null".Equals(paymerType)) { PaymerType = (PaymerType)int.Parse(paymerType, NumberStyles.Integer, CultureInfo.InvariantCulture.NumberFormat); } else { PaymerType = 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"); string sdpType = wmXmlPackage.SelectString("operation/sdp_type"); if (!string.IsNullOrEmpty(sdpType)) { SdpType = int.Parse(sdpType, NumberStyles.Integer, CultureInfo.InvariantCulture.NumberFormat); } }