Пример #1
0
        internal override void Fill(WmXmlPackage wmXmlPackage)
        {
            if (null == wmXmlPackage)
            {
                throw new ArgumentNullException(nameof(wmXmlPackage));
            }

            Id           = wmXmlPackage.SelectUInt32("@id");
            Ts           = wmXmlPackage.SelectUInt32("@ts");
            OrderId      = wmXmlPackage.SelectUInt32("orderid");
            SourceWmId   = wmXmlPackage.SelectWmId("customerwmid");
            TargetPurse  = wmXmlPackage.SelectPurse("storepurse");
            Amount       = wmXmlPackage.SelectAmount("amount");
            Description  = (Description)wmXmlPackage.SelectString("desc");
            Address      = (Description)wmXmlPackage.SelectString("address");
            Period       = wmXmlPackage.SelectUInt8("period");
            Expiration   = wmXmlPackage.SelectUInt8("expiration");
            InvoiceState = (InvoiceState)wmXmlPackage.SelectInt32("state");
            CreateTime   = wmXmlPackage.SelectWmDateTime("datecrt");
            UpdateTime   = wmXmlPackage.SelectWmDateTime("dateupd");
            OperationId  = wmXmlPackage.SelectUInt32("wmtranid");

            if (wmXmlPackage.Exists("customerpurse") &&
                !string.IsNullOrEmpty(wmXmlPackage.SelectString("customerpurse")))
            {
                SourcePurse = wmXmlPackage.SelectPurse("customerpurse");
            }
        }
Пример #2
0
        internal override void Fill(WmXmlPackage wmXmlPackage)
        {
            if (null == wmXmlPackage)
            {
                throw new ArgumentNullException(nameof(wmXmlPackage));
            }

            PrimaryId    = wmXmlPackage.SelectInt64("@id");
            SecondaryId  = wmXmlPackage.SelectInt64("@ts");
            SourcePurse  = wmXmlPackage.SelectPurse("pursesrc");
            TargetPurse  = wmXmlPackage.SelectPurse("pursedest");
            Amount       = wmXmlPackage.SelectAmount("amount");
            Commission   = wmXmlPackage.SelectAmount("comiss");
            TransferType = (TransferType)wmXmlPackage.SelectInt32("opertype");
            InvoiceId    = wmXmlPackage.SelectInt64("wminvid");
            OrderId      = wmXmlPackage.SelectInt32("orderid");
            PaymentId    = wmXmlPackage.SelectInt32("tranid");
            Period       = wmXmlPackage.SelectUInt8("period");
            Description  = (Description)wmXmlPackage.SelectString("desc");
            CreateTime   = wmXmlPackage.SelectWmDateTime("datecrt");
            UpdateTime   = wmXmlPackage.SelectWmDateTime("dateupd");
            Partner      = wmXmlPackage.SelectWmId("corrwm");
            Rest         = wmXmlPackage.SelectAmount("rest");

            if (wmXmlPackage.Exists("timelock"))
            {
                IsLocked = true;
            }
        }
Пример #3
0
        internal override void Fill(WmXmlPackage wmXmlPackage)
        {
            if (null == wmXmlPackage)
            {
                throw new ArgumentNullException(nameof(wmXmlPackage));
            }

            Id          = wmXmlPackage.SelectUInt32("invoice/@id");
            Ts          = wmXmlPackage.SelectUInt32("invoice/@ts");
            OrderId     = wmXmlPackage.SelectUInt32("invoice/orderid");
            SourceWmId  = wmXmlPackage.SelectWmId("invoice/customerwmid");
            TargetPurse = wmXmlPackage.SelectPurse("invoice/storepurse");
            Amount      = wmXmlPackage.SelectAmount("invoice/amount");
            Description = (Description)wmXmlPackage.SelectString("invoice/desc");
            Address     = (Description)wmXmlPackage.SelectString("invoice/address");
            Period      = wmXmlPackage.SelectUInt8("invoice/period");
            Expiration  = wmXmlPackage.SelectUInt8("invoice/expiration");
            State       = (InvoiceState)wmXmlPackage.SelectInt32("invoice/state");
            CreateTime  = wmXmlPackage.SelectWmDateTime("invoice/datecrt");
            UpdateTime  = wmXmlPackage.SelectWmDateTime("invoice/dateupd");
        }
        internal override void Fill(WmXmlPackage wmXmlPackage)
        {
            if (null == wmXmlPackage)
            {
                throw new ArgumentNullException(nameof(wmXmlPackage));
            }

            PrimaryId    = wmXmlPackage.SelectInt64("@id");
            SecondaryId  = wmXmlPackage.SelectInt64("@ts");
            OrderId      = wmXmlPackage.SelectInt32("orderid");
            TargetWmId   = wmXmlPackage.SelectWmId("storewmid");
            TargetPurse  = wmXmlPackage.SelectPurse("storepurse");
            Amount       = wmXmlPackage.SelectAmount("amount");
            Description  = (Description)wmXmlPackage.SelectString("desc");
            Address      = (Description)wmXmlPackage.SelectString("address");
            Period       = wmXmlPackage.SelectUInt8("period");
            Expiration   = wmXmlPackage.SelectUInt8("expiration");
            InvoiceState = (InvoiceState)wmXmlPackage.SelectInt32("state");
            CreateTime   = wmXmlPackage.SelectWmDateTime("datecrt");
            UpdateTime   = wmXmlPackage.SelectWmDateTime("dateupd");
            TransferId   = wmXmlPackage.SelectInt64("wmtranid");
        }
        internal override void Fill(WmXmlPackage wmXmlPackage)
        {
            if (null == wmXmlPackage)
            {
                throw new ArgumentNullException(nameof(wmXmlPackage));
            }

            Id           = wmXmlPackage.SelectUInt32("operation/@id");
            Ts           = wmXmlPackage.SelectUInt32("operation/@ts");
            TransferId   = wmXmlPackage.SelectUInt32("operation/tranid");
            SourcePurse  = wmXmlPackage.SelectPurse("operation/pursesrc");
            TargetPurse  = wmXmlPackage.SelectPurse("operation/pursedest");
            Amount       = wmXmlPackage.SelectAmount("operation/amount");
            Commission   = wmXmlPackage.SelectAmount("operation/comiss");
            TransferType = (TransferType)wmXmlPackage.SelectInt32("operation/opertype");
            Period       = wmXmlPackage.SelectUInt8("operation/period");
            InvoiceId    = wmXmlPackage.SelectUInt32("operation/wminvid");
            Description  = (Description)wmXmlPackage.SelectString("operation/desc");
            CreateTime   = wmXmlPackage.SelectWmDateTime("operation/datecrt");
            UpdateTime   = wmXmlPackage.SelectWmDateTime("operation/dateupd");
        }
        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);
            }
        }