예제 #1
0
        public UserObject Login(string name, string pwd)
        {
            string xml = hiPiaoSrv.LoginUser(name, pwd);
            XmlDocument doc = new XmlDocument();
            doc.LoadXml(xml);
            XmlNode ret = doc.SelectSingleNode("//result");
            UserObject user = null;
            string returnCode = ret.InnerText;

            if (ret.InnerText == "1")
            {
                user = new UserObject();
                user.Name = name;
               // user.Name = doc.SelectSingleNode("//nickname").InnerText;
                user.Mobile = doc.SelectSingleNode("//phone").InnerText;
                user.MemberId = doc.SelectSingleNode("//memberId").InnerText;
                user.HipiaoCard = doc.SelectSingleNode("//hipiaocard").InnerText;
                user.SessionKey = doc.SelectSingleNode("//sessionkey").InnerText;
                user.RewardPoints = Convert.ToInt32(doc.SelectSingleNode("//score").InnerText);
                XmlNode blance = doc.SelectSingleNode("//blance");
                user.IsBindMobile = doc.SelectSingleNode("//isbanded").InnerText == "1";
                user.Balance = Convert.ToDouble(blance.InnerText);
                user.Email = doc.SelectSingleNode("//mail").InnerText;
                user.Pwd = pwd;
            }

            return user;
        }
예제 #2
0
 public static bool BindMobile(UserObject user, string mobile)
 {
     string xml = hiPiaoSrv.BindMobile(user, mobile);
     XmlDocument doc = new XmlDocument();
     doc.LoadXml(xml);
     XmlNode node = doc.SelectSingleNode("//return");
     if (node != null)
     {
         return node.Attributes["result"].Value.ToString() == "1";
     }
     return false;
 }
예제 #3
0
 /// <summary>
 /// 退出账户
 /// </summary>
 public static bool QuitAccount()
 {
     loginUser = null;
     GlobalTools.ReturnMain();
     return true;
 }
        public string UserBuyTicketWap(UserObject user, List<TicketPrintObject> tickets)
        {
            #if DEBUG
            Console.WriteLine(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "开始购票");
            #endif
            string url = System.Configuration.ConfigurationManager.AppSettings["Interface_Buy_Wap_Url"];
            StringBuilder body = new StringBuilder();
            String fromclient = "ANDROID";
            string seatv = string.Empty;
            for (int i = 0; i < tickets.Count; i++)
            {
                seatv += tickets[i].SeatId + ",";
            }
            seatv=seatv.TrimEnd(',');
            string planid = tickets[0].PlanId;
            //string planid = tickets[0].PlanId.Substring(0, tickets[0].PlanId.IndexOf("@@")) ;
            //ISecurity md5 = new MD5Security();
            String r1 = "MEMBERID" + user.MemberId +
                        "fromclient" + fromclient+
                        "mobile" + user.Mobile +
                        "normal" + tickets.Count.ToString() +
                        "planId" + planid +
                        "seatids" + seatv

                        ;
            String r2 = Encrypt(Encrypt(Encrypt(user.Pwd)) + user.HipiaoCard);
            String r3 = Encrypt(r1 + r2);
            String r4 = "MEMBERID=" + user.MemberId + "&mobile="
                    + user.Mobile + "&normal="
                    + tickets.Count.ToString() + "&planId="
                    + planid + "&seatids=" + seatv
                    + "&fromclient" + fromclient;
            String query = r4 + "&pass="******"&pass="******"yyyy-MM-dd HH:mm:ss") + "发送购票内容为:" + query);
            #endif
            Uri uri = new Uri(url);

            if (url.StartsWith("https"))
            {
                ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3;
                ServicePointManager.ServerCertificateValidationCallback =
                                        new System.Net.Security.RemoteCertificateValidationCallback(CheckValidationResult);

            }

            WebRequest webRequest = WebRequest.Create(uri);

            webRequest.ContentType = "application/x-www-form-urlencoded;charset=UTF-8";
            webRequest.ContentLength = query.Length;
            webRequest.Method = "POST";

            webRequest.Timeout = GetInterfaceTimeout();

            using (Stream requestStream = webRequest.GetRequestStream())
            {

                byte[] paramBytes = Encoding.UTF8.GetBytes(query.ToString());

                requestStream.Write(paramBytes, 0, paramBytes.Length);

            }

            //响应

            WebResponse webResponse = webRequest.GetResponse();

            using (StreamReader myStreamReader = new StreamReader(webResponse.GetResponseStream(), Encoding.UTF8))
            {

                string result = "";
                 result = myStreamReader.ReadToEnd();
            #if DEBUG
                Console.WriteLine("调用购票接口返回结果为:"+result);
            #endif
                return result;

            }
            return string.Empty;
        }
 public bool UpdatePwd(UserObject user, string newPwd)
 {
     return true;
 }
 public string SmsUserContent(UserObject user, string content)
 {
     return SmsMobileContent(user.Mobile, content);
 }
        public string QueryUserBuyRecordDetail(UserObject user,string orderid)
        {
            StringBuilder body = new StringBuilder();

            body.Append("<ns2:getConsumptionDatialRequest xmlns:ns2=\"http://service.server.com\">");
            body.Append("<memberid>" + user.MemberId + "</memberid><orderformid>"+orderid+"</orderformid><clintform>ANDROID/IPHONE/IPAD</clintform></ns2:getConsumptionDatialRequest>");
            return GetSoapServiceResult(body, user.SessionKey);
        }
예제 #8
0
 public bool UpdatePwd(UserObject user, string newPwd)
 {
     if (user.Pwd == "123456")
         return false;
     return true;
 }
예제 #9
0
 public static int GetUserBuyRecordCount(UserObject user)
 {
     #if DEBUG
     Console.WriteLine("开始执行获取订购记录数量时间!" + System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
     #endif
     string xml = hiPiaoSrv.QueryUserBuyRecord(user);
     #if DEBUG
     Console.WriteLine("结束执行获取订购记录数量时间!" + System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
     #endif
     XmlDocument doc = new XmlDocument();
     doc.LoadXml(xml);
     #if DEBUG
     Console.WriteLine("加载返回结果到XmlDocument文档中!" + System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
     #endif
     string xmlOrderDetail = string.Empty;
     string xpath = "//consumption[@orderformid]";
     //string xpath = "//consumption";
     XmlNodeList orderNodes = doc.SelectNodes(xpath);
     return orderNodes.Count;
 }
예제 #10
0
        public void QueryUser(UserObject user)
        {
            int c=user.Deductions.Count;
            int t = user.Coupons.Count;

            /*
            string xmlBuyRecord = hiPiaoSrv.QueryUserBuyRecord(user);
            XmlDocument docBuyRecord = new XmlDocument();
            docBuyRecord.LoadXml(xmlBuyRecord);
            XmlNodeList buyrecordNode = docDeduction.SelectNodes("//consum");

            BuyRecordObject buyRecord = null;
            TicketObject ticket = null;
            MovieObject movie=null;

            for (int i = 0; i < buyrecordNode.Count; i++)
            {
                buyRecord = new BuyRecordObject();
                string movieName = buyrecordNode[i].Attributes["cinemaname"].Value;
                int totalPrice = Convert.ToInt32(buyrecordNode[i].Attributes["crossmoney"].Value);
                //buyRecord.TotalPrice = buyrecordNode[i].Attributes["orderformid"].Value;

                buyRecord.BuyTime = Convert.ToDateTime(buyrecordNode[i].Attributes["costtime"].Value);
                int count = Convert.ToInt32(buyrecordNode[i].Attributes["ticketcount"].Value);
                for (int j = 0; j < count; j++)
                {
                    ticket = new TicketObject();
                    movie=new MovieObject();
                    movie.Name=movieName;
                    ticket.Movie = movie;
                    ticket.Price = totalPrice / count;
                    buyRecord.Tickets.Add(ticket);

                }
                user.BuyRecords.Add(buyRecord);
            }
            */
        }
예제 #11
0
        public static string UserBuyTicket(UserObject user, List<TicketPrintObject> tickets)
        {
            string xml = hiPiaoSrv.UserBuyTicket(user, tickets);
            XmlDocument doc = new XmlDocument();
            doc.LoadXml(xml);
            XmlNode node = doc.SelectSingleNode("//order");
            if (node != null)
            {

                string result=node.Attributes["res"].Value.ToString();
                if (result == "1")
                {
                    //余额消减
                    int money=tickets.Count*tickets[0].Price;
                    user.Balance -= money;
                    string ticketId = node.Attributes["ticketNumber"].Value.ToString();
                    for (int i = 0; i < tickets.Count; i++)
                    {
                        tickets[i].ValidCode=tickets[i].TicketId = ticketId;

                    }
                }
                else
                {
                    result += node.Attributes["stat"].Value.ToString()+"," + node.Attributes["text"].Value.ToString();
                }
                return result;
            }
            else return "-1";
        }
예제 #12
0
 public static bool SmsUserFeeDetail(UserObject user, int fee)
 {
     string xml = hiPiaoSrv.SmsUserFeeDetail(user,fee);
     XmlDocument doc = new XmlDocument();
     doc.LoadXml(xml);
     XmlNode node = doc.SelectSingleNode("//sms");
     if (node != null)
     {
         return node.Attributes["stat"].Value.ToString()=="1";
     }
     return false;
 }
예제 #13
0
 public static int GetUserDeductionCount(UserObject user)
 {
     #if DEBUG
     Console.WriteLine("开始执行获取用户折扣券数量时间!" + System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
     #endif
     string xml = hiPiaoSrv.QueryUserDeduction(user);
     #if DEBUG
     Console.WriteLine("结束执行获取用户折扣券数量时间!" + System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
     #endif
     XmlDocument doc = new XmlDocument();
     doc.LoadXml(xml);
     #if DEBUG
     Console.WriteLine("加载返回结果到XmlDocument文档中!" + System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
     #endif
     XmlNodeList deductionNodes = doc.SelectNodes("//dif");
     return deductionNodes.Count;
 }
예제 #14
0
 public static List<DeductionObject> GetUserDeduction(UserObject user)
 {
     List<DeductionObject> lists = new List<DeductionObject>();
     #if DEBUG
     Console.WriteLine("开始执行获取用户折扣券时间!" + System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
     #endif
     string xml = hiPiaoSrv.QueryUserDeduction(user);
     #if DEBUG
     Console.WriteLine("结束执行获取用户折扣券时间!" + System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
     #endif
     XmlDocument doc = new XmlDocument();
     doc.LoadXml(xml);
     #if DEBUG
     Console.WriteLine("加载返回结果到XmlDocument文档中!" + System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
     #endif
     XmlNodeList deductionNodes = doc.SelectNodes("//dif");
     DeductionObject deduction;
     for (int i = 0; i < deductionNodes.Count; i++)
     {
     #if DEBUG
         Console.WriteLine("初始化折扣券对象时间1!" + System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
     #endif
         deduction = new DeductionObject();
         /*
         deduction.Amount = Double.Parse(deductionNodes[i].Attributes["amount"].Value);
         deduction.CardId = deductionNodes[i].Attributes["cardId"].Value;
         deduction.Period = deductionNodes[i].Attributes["period"].Value;
         deduction.UseDate =deductionNodes[i].Attributes["useDate"]!=null? deductionNodes[i].Attributes["useDate"].Value:string.Empty;
         deduction.UseRule = deductionNodes[i].Attributes["useRule"].Value;
         deduction.Status = deductionNodes[i].Attributes["status"].Value;
     #if DEBUG
         Console.WriteLine("初始化折扣券对象时间2!" + System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
     #endif
          * */
         lists.Add(deduction);
     }
     return lists;
 }
예제 #15
0
        public static List<CouponObject> GetUserCoupons(UserObject user)
        {
            List<CouponObject> lists = new List<CouponObject>();
            #if DEBUG
            Console.WriteLine("开始执行获取用户抵购券时间!" + System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
            #endif
            string xml = hiPiaoSrv.QueryUserCoupon(user);
            #if DEBUG
            Console.WriteLine("结束执行获取用户抵购券时间!" + System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
            #endif
            XmlDocument doc = new XmlDocument();
            doc.LoadXml(xml);
            #if DEBUG
            Console.WriteLine("加载返回结果到XmlDocument文档中!" + System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
            #endif
            XmlNodeList couponNodes = doc.SelectNodes("//couponInfo");
            XmlNode useRuleNode;
            CouponObject coupon;
            for (int i = 0; i < couponNodes.Count; i++)
            {
            #if DEBUG
                Console.WriteLine("初始化抵购券对象时间!" + System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
            #endif
                coupon = new CouponObject();
                /*
                coupon.CardId = couponNodes[i].Attributes["cardId"].Value;
            #if DEBUG
                Console.WriteLine("抵扣券ID:"+coupon.CardId);
            #endif
                coupon.Period = couponNodes[i].Attributes["period"].Value;
                coupon.UseDate = couponNodes[i].Attributes["useDate"].Value;
                coupon.Status = Convert.ToInt32(couponNodes[i].Attributes["status"].Value);
            #if DEBUG
                Console.WriteLine("初始化抵购券对象时间2!" + System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
            #endif
                useRuleNode=couponNodes[i].SelectSingleNode("useRule");
                if(useRuleNode!=null)
                {
                    coupon.UseCinema = useRuleNode.Attributes["useDate"]==null?string.Empty:useRuleNode.Attributes["useDate"].Value;
                    coupon.Enable3D = useRuleNode.Attributes["is3D"].Value == "1";
                    coupon.EveryDayTime = useRuleNode.Attributes["everyDayTime"].Value;
                    coupon.WeekEnd = useRuleNode.Attributes["weekEnd"].Value == "1";
                    coupon.FileRule = useRuleNode.Attributes["fileRule"]==null?string.Empty:useRuleNode.Attributes["fileRule"].Value;
                    coupon.Type = Convert.ToInt32(useRuleNode.Attributes["type"].Value);

                }
                 * */
            #if DEBUG
                Console.WriteLine("初始化抵购券对象时间3!" + System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
            #endif
                lists.Add(coupon);

            }
            return lists;
        }
        public string SmsUserFeeDetail(UserObject user, int fee)
        {
            string content = "您的" + user.Name + "账户于" + System.DateTime.Now.ToString("M月d日") + "以" + user.Mobile + "成功消费" + fee + "元,账户余额" + user.Balance + "元。如有疑问请致电400-601-5566";//【哈票网】

            return(SmsUserContent(user, content));
        }
        public string UserBuyTicketWap(UserObject user, List <TicketPrintObject> tickets)
        {
#if DEBUG
            Console.WriteLine(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "开始购票");
#endif
            string        url        = System.Configuration.ConfigurationManager.AppSettings["Interface_Buy_Wap_Url"];
            StringBuilder body       = new StringBuilder();
            String        fromclient = "ANDROID";
            string        seatv      = string.Empty;
            for (int i = 0; i < tickets.Count; i++)
            {
                seatv += tickets[i].SeatId + ",";
            }
            seatv = seatv.TrimEnd(',');
            string planid = tickets[0].PlanId;
            //string planid = tickets[0].PlanId.Substring(0, tickets[0].PlanId.IndexOf("@@")) ;
            //ISecurity md5 = new MD5Security();
            String r1 = "MEMBERID" + user.MemberId +
                        "fromclient" + fromclient +
                        "mobile" + user.Mobile +
                        "normal" + tickets.Count.ToString() +
                        "planId" + planid +
                        "seatids" + seatv

            ;
            String r2 = Encrypt(Encrypt(Encrypt(user.Pwd)) + user.HipiaoCard);
            String r3 = Encrypt(r1 + r2);
            String r4 = "MEMBERID=" + user.MemberId + "&mobile="
                        + user.Mobile + "&normal="
                        + tickets.Count.ToString() + "&planId="
                        + planid + "&seatids=" + seatv
                        + "&fromclient" + fromclient;
            String query = r4 + "&pass="******"&pass="******"yyyy-MM-dd HH:mm:ss") + "发送购票内容为:" + query);
#endif
            Uri uri = new Uri(url);

            if (url.StartsWith("https"))
            {
                ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3;
                ServicePointManager.ServerCertificateValidationCallback =
                    new System.Net.Security.RemoteCertificateValidationCallback(CheckValidationResult);
            }

            WebRequest webRequest = WebRequest.Create(uri);

            webRequest.ContentType   = "application/x-www-form-urlencoded;charset=UTF-8";
            webRequest.ContentLength = query.Length;
            webRequest.Method        = "POST";

            webRequest.Timeout = GetInterfaceTimeout();

            using (Stream requestStream = webRequest.GetRequestStream())
            {
                byte[] paramBytes = Encoding.UTF8.GetBytes(query.ToString());

                requestStream.Write(paramBytes, 0, paramBytes.Length);
            }

            //响应

            WebResponse webResponse = webRequest.GetResponse();

            using (StreamReader myStreamReader = new StreamReader(webResponse.GetResponseStream(), Encoding.UTF8))
            {
                string result = "";
                result = myStreamReader.ReadToEnd();
#if DEBUG
                Console.WriteLine("调用购票接口返回结果为:" + result);
#endif
                return(result);
            }
            return(string.Empty);
        }
예제 #18
0
        public UserObject Register(string name, string pwd, string mobile, ref string returnCode)
        {
            string xml = hiPiaoSrv.RegisterUser(name, pwd, mobile);
            XmlDocument doc = new XmlDocument();
            doc.LoadXml(xml);
            XmlNode ret = doc.SelectSingleNode("//result");
            UserObject user=null;
            returnCode = ret.InnerText;

            if (ret.InnerText == "1")
            {
                user = new UserObject();
                user.Name = doc.SelectSingleNode("//nickname").InnerText;
                user.Mobile = doc.SelectSingleNode("//phone").InnerText;
                user.MemberId = doc.SelectSingleNode("//memberId").InnerText;
                user.MemberId = doc.SelectSingleNode("//hipiaocard").InnerText;
                user.SessionKey = doc.SelectSingleNode("//sessionkey").InnerText;
                user.RewardPoints = Convert.ToInt32(doc.SelectSingleNode("//score").InnerText);
                XmlNode blance=doc.SelectSingleNode("//blance");
                user.Balance = Convert.ToDouble(blance.InnerText);
                user.Pwd = pwd;
            }

            return user;
            //throw new NotImplementedException();
        }
예제 #19
0
 public void QueryUser(UserObject user)
 {
     throw new NotImplementedException();
 }
예제 #20
0
 public bool UpdatePwd(UserObject user, string newPwd)
 {
     string xml = hiPiaoSrv.UpdateUserPwd(user, newPwd);
     XmlDocument doc = new XmlDocument();
     doc.LoadXml(xml);
     XmlNode ret = doc.SelectSingleNode("//result");
     bool result= ret.InnerText == "1";
     if (result)
     {
         user.Pwd = newPwd;
     }
     return result;
 }
        public string BindMobile(UserObject user,string mobile)
        {
            StringBuilder body = new StringBuilder();

            body.Append("<ns2:bindUserMobile  xmlns:ns2=\"http://service.server.com\">");
            body.Append("<memberid>" + user.MemberId + "</memberid><bindmobile>" + mobile + "</bindmobile><clintform>ANDROID</clintform></ns2:bindUserMobile>");
            return GetSoapServiceResult(body,user.SessionKey);
        }
예제 #22
0
        public static List <BuyRecordObject> GetUserBuyRecord(UserObject user)
        {
            List <BuyRecordObject> lists = new List <BuyRecordObject>();

#if DEBUG
            Console.WriteLine("开始执行获取订购记录时间!" + System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
#endif
            string xml = hiPiaoSrv.QueryUserBuyRecord(user);
#if DEBUG
            Console.WriteLine("结束执行获取订购记录时间!" + System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
#endif
            XmlDocument doc = new XmlDocument();
            doc.LoadXml(xml);
#if DEBUG
            Console.WriteLine("加载返回结果到XmlDocument文档中!" + System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
#endif
            string xmlOrderDetail = string.Empty;
            string xpath          = "//consumption[@orderformid]";
            //string xpath = "//consumption";
            XmlNodeList orderNodes = doc.SelectNodes(xpath);

            string          orderid = string.Empty;
            BuyRecordObject obj     = null;

            for (int i = 0; i < orderNodes.Count; i++)
            {
#if DEBUG
                Console.WriteLine("开始执行获取订购记录详细时间!" + System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
#endif
                obj = new BuyRecordObject();

                /*
                 * <return xmlns:ns2="http://service.server.com/">
                 * <buyplace>WEB</buyplace>
                 * <buytime>2012-09-05 16:40:40</buytime>
                 * <cinemahall>4号厅</cinemahall>
                 * <cinemaname>大地数字影院--广州增城东汇城</cinemaname>
                 * <cinemaseat>11排17号</cinemaseat>
                 * <format>数字</format>
                 * <hipiaonumber>340887</hipiaonumber>
                 * <issend>全部退票</issend>
                 * <language>英语</language>
                 * <memberId>26c52c2e-69ae-102e-8c3d-001a4beef7e4</memberId>
                 * <onemoney>¥301</onemoney>
                 * <paytype>仅使用账户余额</paytype>
                 * <phonenum>13269402753</phonenum>
                 * <pixname>蝙蝠侠:黑暗骑士崛起</pixname>
                 * <playtime>2012-09-05 22:10:00</playtime>
                 * <result>1</result>
                 * <summoney>30元</summoney>
                 * <ticketnum>1</ticketnum>
                 * </return>
                 */
                //obj.BuyTime
                orderid     = orderNodes[i].Attributes["orderformid"].Value;
                obj.OrderId = orderid;
                obj.User    = user;

                lists.Add(obj);
#if DEBUG
                Console.WriteLine("开始结束获取订购记录详细时间!" + System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
#endif
            }

            return(lists);
        }
        public string QueryUserDeduction(UserObject user)
        {
            StringBuilder body = new StringBuilder();

            body.Append("<ns2:getDeductionInfo xmlns:ns2=\"http://service.server.com\">");
            body.Append("<memberid>" + user.MemberId + "</memberid><clintform>ANDROID</clintform></ns2:getDeductionInfo>");
            return GetSoapServiceResult(body, user.SessionKey);
        }
예제 #24
0
 public TicketObject BuyTicket(UserObject user, CinemaObject cinema, MovieObject movie, DateTime playTime)
 {
     throw new NotImplementedException();
 }
 public string SmsUserFeeDetail(UserObject user, int fee)
 {
     string content = "您的" + user.Name + "账户于" + System.DateTime.Now.ToString("M月d日") + "以" + user.Mobile + "成功消费" + fee + "元,账户余额" + user.Balance + "元。如有疑问请致电400-601-5566";//【哈票网】
     return SmsUserContent(user, content);
 }
예제 #26
0
 public ReturnObject PrintTicket(UserObject user, TicketObject ticket)
 {
     throw new NotImplementedException();
 }
        public string UpdateUserPwd(UserObject user, string newPwd)
        {
            StringBuilder body = new StringBuilder();

            body.Append("<ns2:updateUserInfo  xmlns:ns2=\"http://service.server.com\">");
            body.Append("<memberid>" + user.MemberId + "</memberid><oldpass>" + user.Pwd + "</oldpass><newpass>" + newPwd + "</newpass><clintform>ANDROID/IPHONE/IPAD</clintform></ns2:updateUserInfo>");
            return GetSoapServiceResult(body);
        }
예제 #28
0
 public void QueryUser(UserObject user)
 {
     throw new NotImplementedException();
 }
예제 #29
0
 /// <summary>
 /// 登陆账户
 /// </summary>
 /// <param name="uid"></param>
 /// <param name="pwd"></param>
 public static bool LoginAccount(string uid, string pwd)
 {
     UserObject obj = HiPiaoInterface.HiPiaoOperatorFactory.GetHiPiaoOperator().Login(uid, pwd);
         if (obj != null)
         {
             loginUser = obj;
             return true;
         }
         else
         {
             return false;
         }
 }
예제 #30
0
 public TicketObject BuyTicket(UserObject user, CinemaObject cinema, MovieObject movie, DateTime playTime)
 {
     throw new NotImplementedException();
 }
예제 #31
0
 public UserInfoPanel(UserObject user)
 {
     InitializeComponent();
     CheckForIllegalCrossThreadCalls = false;
     this.userInfo = user;
 }
예제 #32
0
        public UserObject MockUser()
        {
            if (mockUser == null)
            {
                UserObject user = new UserObject();
                mockUser = user;
                user.Pwd = "qqqqqq";
                user.Name = "测试用户";
                user.Mobile = "15814584511";
                user.Balance = 50;
                user.Email = "*****@*****.**";
                user.RewardPoints = 10078;
                user.BuyRecords = this.MockBuyRecordObject(32);
                user.Coupons = this.MockCoupon(12);

            }
            return mockUser;
        }
 public string SmsUserContent(UserObject user, string content)
 {
     return(SmsMobileContent(user.Mobile, content));
 }
예제 #34
0
 public ReturnObject PrintTicket(UserObject user, TicketObject ticket)
 {
     throw new NotImplementedException();
 }
 public bool UpdatePwd(UserObject user, string newPwd)
 {
     return(true);
 }
예제 #36
0
        public static List<BuyRecordObject> GetUserBuyRecord(UserObject user)
        {
            List<BuyRecordObject> lists = new List<BuyRecordObject>();
            #if DEBUG
            Console.WriteLine("开始执行获取订购记录时间!"+System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
            #endif
            string xml = hiPiaoSrv.QueryUserBuyRecord(user);
            #if DEBUG
            Console.WriteLine("结束执行获取订购记录时间!" + System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
            #endif
            XmlDocument doc = new XmlDocument();
            doc.LoadXml(xml);
            #if DEBUG
            Console.WriteLine("加载返回结果到XmlDocument文档中!" + System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
            #endif
            string xmlOrderDetail = string.Empty;
            string xpath = "//consumption[@orderformid]";
            //string xpath = "//consumption";
            XmlNodeList orderNodes = doc.SelectNodes(xpath);

            string orderid = string.Empty;
            BuyRecordObject obj = null;

            for (int i = 0; i < orderNodes.Count; i++)
            {
            #if DEBUG
                Console.WriteLine("开始执行获取订购记录详细时间!" + System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
            #endif
                obj = new BuyRecordObject();
                /*
                 <return xmlns:ns2="http://service.server.com/">
            <buyplace>WEB</buyplace>
            <buytime>2012-09-05 16:40:40</buytime>
            <cinemahall>4号厅</cinemahall>
            <cinemaname>大地数字影院--广州增城东汇城</cinemaname>
            <cinemaseat>11排17号</cinemaseat>
            <format>数字</format>
            <hipiaonumber>340887</hipiaonumber>
            <issend>全部退票</issend>
            <language>英语</language>
            <memberId>26c52c2e-69ae-102e-8c3d-001a4beef7e4</memberId>
            <onemoney>¥301</onemoney>
            <paytype>仅使用账户余额</paytype>
            <phonenum>13269402753</phonenum>
            <pixname>蝙蝠侠:黑暗骑士崛起</pixname>
            <playtime>2012-09-05 22:10:00</playtime>
            <result>1</result>
            <summoney>30元</summoney>
            <ticketnum>1</ticketnum>
              </return>
                 */
                //obj.BuyTime
                orderid = orderNodes[i].Attributes["orderformid"].Value;
                obj.OrderId = orderid;
                obj.User = user;

                lists.Add(obj);
            #if DEBUG
                Console.WriteLine("开始结束获取订购记录详细时间!" + System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
            #endif
            }

            return lists;
        }