Exemplo n.º 1
0
        public paymentEntity createBillHelp(inTimeReqPara para)
        {
            var billNoTmp = para.ReqId + DateTime.Now.Ticks;
            var res       = new paymentEntity {
                BillNo = billNoTmp
            };

            var bankEnt = new bankEntity {
                PayId = billNoTmp
            };
            var t = Task.Factory.StartNew(() =>
            {
                using (var req = new BankServiceClient())
                {
                    req.processPaymentHelp(bankEnt);
                }
            });

            var ip   = "jimmyMStation";//"172.16.144.70";
            var port = 6379;

            using (var help = helpBase.init(ip, port, new TimeSpan(0, 5, 0)))
            {
                var ts = new TimeSpan(0, 5, 0);

                help.set(bankEnt.PayId, para.ReqId, ts);
            }

            t.Wait(100);
            return(res);
        }
Exemplo n.º 2
0
        public paymentEntity createBill(inTimeReqPara para)
        {
            var billNoTmp = para.ReqId + DateTime.Now.Ticks;
            var res = new paymentEntity { BillNo = billNoTmp };
            
            var bankEnt = new bankEntity { PayId = billNoTmp };
            var t = Task.Factory.StartNew(() =>
                {
                    using (var req = new BankServiceClient())
                    {
                        req.processPayment(bankEnt);
                    }
                }
                );

            var ip = "jimmyMStation";//"172.16.144.70";
            var port = 6379;

            try
            {
                using (var help = helpBase.init(ip, port, new TimeSpan(0, 5, 0)))
                {
                    var strTmp = JsonSerializer.SerializeToString(new { reqId = para.ReqId, billno = billNoTmp });
                    var ts = new TimeSpan(0, 5, 0);

                    help.set(bankEnt.PayId, strTmp, ts);
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
            t.Wait(100);
            return res;
        }
Exemplo n.º 3
0
        public paymentEntity createBill(inTimeReqPara para)
        {
            var billNoTmp = para.ReqId + DateTime.Now.Ticks;
            var res       = new paymentEntity {
                BillNo = billNoTmp
            };

            var bankEnt = new bankEntity {
                PayId = billNoTmp
            };
            var t = Task.Factory.StartNew(() =>
            {
                using (var req = new BankServiceClient())
                {
                    req.processPayment(bankEnt);
                }
            }
                                          );

            var ip   = "jimmyMStation";//"172.16.144.70";
            var port = 6379;

            try
            {
                using (var help = helpBase.init(ip, port, new TimeSpan(0, 5, 0)))
                {
                    var strTmp = JsonSerializer.SerializeToString(new { reqId = para.ReqId, billno = billNoTmp });
                    var ts     = new TimeSpan(0, 5, 0);

                    help.set(bankEnt.PayId, strTmp, ts);
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
            t.Wait(100);
            return(res);
        }
Exemplo n.º 4
0
        public paymentEntity createBillHelp(inTimeReqPara para)
        {
            var billNoTmp = para.ReqId + DateTime.Now.Ticks;
            var res = new paymentEntity { BillNo = billNoTmp };
            
            var bankEnt = new bankEntity { PayId = billNoTmp };
            var t = Task.Factory.StartNew(() =>
            {
                using (var req = new BankServiceClient())
                {
                    req.processPaymentHelp(bankEnt);
                }
            });

            var ip = "jimmyMStation";//"172.16.144.70";
            var port = 6379;
            using (var help = helpBase.init(ip, port, new TimeSpan(0, 5, 0)))
            {
                var ts = new TimeSpan(0, 5, 0);

                help.set(bankEnt.PayId, para.ReqId, ts);
            }

            t.Wait(100);
            return res;
        }