示例#1
0
        public static void GetUserBuyRecordDetail(BuyRecordObject obj)
        {
            string xmlOrderDetail = string.Empty;

            xmlOrderDetail = hiPiaoSrv.QueryUserBuyRecordDetail(obj.User, obj.OrderId);
            XmlDocument docOrderDetail = new XmlDocument();

            docOrderDetail.LoadXml(xmlOrderDetail);
            XmlNode detailNode = docOrderDetail.SelectSingleNode("//return");

            obj.BuyTime       = DateTime.Parse(docOrderDetail.SelectSingleNode("//buytime").InnerText);
            obj.ConnectMobile = docOrderDetail.SelectSingleNode("//phonenum").InnerText;
            //obj.TotalPrice = Int32.Parse(docOrderDetail.SelectSingleNode("//summoney").InnerText);
            obj.ValidCode = docOrderDetail.SelectSingleNode("//hipiaonumber").InnerText;
            TicketObject ticket = null;
            MovieObject  movie  = null;
            CinemaObject cinema = null;
            SeatObject   seat   = null;
            RoomObject   room   = null;
            int          count  = Int32.Parse(docOrderDetail.SelectSingleNode("//ticketnum").InnerText);

            cinema      = new CinemaObject();
            cinema.Name = docOrderDetail.SelectSingleNode("//cinemaname").InnerText;
            seat        = new SeatObject();
            seat.SeatId = docOrderDetail.SelectSingleNode("//cinemaseat").InnerText;
            room        = new RoomObject();
            room.Name   = docOrderDetail.SelectSingleNode("//cinemahall").InnerText;
            seat.Room   = room;
            room.Cinema = cinema;
            string tmp = docOrderDetail.SelectSingleNode("//onemoney").InnerText;

            tmp = tmp.Substring(1, tmp.IndexOf("元*") - 1);
            //cinemaseat onemoney
            double price = double.Parse(tmp);

            movie      = new MovieObject();
            movie.Name = docOrderDetail.SelectSingleNode("//pixname").InnerText;
            DateTime buyTime  = DateTime.Parse(docOrderDetail.SelectSingleNode("//buytime").InnerText);
            DateTime playTime = DateTime.Parse(docOrderDetail.SelectSingleNode("//playtime").InnerText);

            for (int j = 0; j < count; j++)
            {
                ticket          = new TicketObject();
                ticket.BuyTime  = buyTime;
                ticket.Price    = (int)price;
                ticket.PlayTime = playTime;
                ticket.Movie    = movie;
                ticket.Seat     = seat;
                obj.Tickets.Add(ticket);
            }
        }
示例#2
0
 public List<BuyRecordObject> MockBuyRecordObject(int row)
 {
     List<BuyRecordObject> result = new List<BuyRecordObject>();
     for (int i = 0; i < row; i++)
     {
         BuyRecordObject record = new BuyRecordObject();
         record.BuyTime = System.DateTime.Now;
         record.ConnectMobile = "13811110000";
         record.User = mockUser;
         record.ValidCode = "888888";
         record.Tickets.Add(this.MockTicket());
         record.Tickets.Add(this.MockTicket());
         result.Add(record);
     }
     return result;
 }
        public SingleFeeDetailPanel(BuyRecordObject record)
        {
            InitializeComponent();
            //record.BuyTime;
            TicketObject ticket=record.Tickets[0];
            string movieName = ticket.Movie.Name;
            this.lbCinema.Text = string.Format(this.lbCinema.Text, record.Tickets[0].Seat.Room.Cinema.Name);

            this.lbMovieName.Text = string.Format(this.lbMovieName.Text, movieName,ticket.Movie.Type==null|| ticket.Movie.Type.Length == 0 ? "" : "(" + ticket.Movie.Type + ")");
            DateTime playDate = Convert.ToDateTime(ticket.PlayTime);
            this.lbDate.Text = string.Format(this.lbDate.Text, ticket.PlayTime.ToString("yyyy-MM-dd / HH:mm"));

            //this.lbRoom.Location = new Point(this.lbTimeHint.Location.X + this.lbTimeHint.Width, this.lbTimeHint.Location.Y);

            int num = 4;
            string seat = string.Empty;
            string[] seatArray = record.Tickets[0].Seat.SeatId.Split(',');
            for (int i = 0; i < seatArray.Length; i++)
            {
                if (i != 0 && i % num == 0)
                {
                    // seat += "\n座位:"
                    seat += "\n              ";
                }
                if (i == 0)
                {
                    seat += seatArray[i];
                }
                else
                {
                    seat += "、" + seatArray[i];
                }

            }

            int totalPrice = record.TotalPrice;

            // WinFormHelper.LocationAfter(this.lbPrice, this.lbTicketPriceHint);
            this.lbNum.Text = string.Format(this.lbNum.Text, record.Tickets.Count.ToString());
            // WinFormHelper.LocationAfter(this.lbTicketPriceHint, this.lbTicketCount);
            //WinFormHelper.LocationAfter(this.lbTicketCount, this.lbTicketCountHint);
            this.lbRoom.Text = string.Format(this.lbRoom.Text, ticket.Seat.Room.Name, seat);

            this.lbAllFee.Text = string.Format(this.lbAllFee.Text, totalPrice.ToString());
            FT.Commons.Tools.WinFormHelper.VerLocationAfter(this.lbRoom, this.lbAllFee, 14);
        }
示例#4
0
        public List <BuyRecordObject> MockBuyRecordObject(int row)
        {
            List <BuyRecordObject> result = new List <BuyRecordObject>();

            for (int i = 0; i < row; i++)
            {
                BuyRecordObject record = new BuyRecordObject();
                record.BuyTime       = System.DateTime.Now;
                record.ConnectMobile = "13811110000";
                record.User          = mockUser;
                record.ValidCode     = "888888";
                record.Tickets.Add(this.MockTicket());
                record.Tickets.Add(this.MockTicket());
                result.Add(record);
            }
            return(result);
        }
示例#5
0
        private void SetRow(int row,BuyRecordObject record,int listIndex)
        {
            Console.WriteLine(string.Format("row:{0},listIndex{1}",row,listIndex));
            if (row < 1 || row > 6)
            {
                return;
            }
            Label lb1 = this.Controls["panelRow"+row.ToString()+"Col1"].Controls["lbRow" + row.ToString() + "Col1"] as Label;
            Label lb2 = this.Controls["panelRow" + row.ToString() + "Col2"].Controls["lbRow" + row.ToString() + "Col2"] as Label;
            Label lb3 = this.Controls["panelRow" + row.ToString() + "Col3"].Controls["lbRow" + row.ToString() + "Col3"] as Label;
            //Label lb4 = this.Controls["panelRow" + row.ToString() + "Col3"].Controls["lbRow" + row.ToString() + "Col4"] as Label;
            Label lb4 = lb1;
            Panel btn = this.Controls["panelRow" + row.ToString() + "Col4"] as Panel;
            if (record != null&&lb1!=null)
            {
                lb1.Text =  record.BuyTime.ToString("yyyy-MM-dd HH:mm");
                //listIndex.ToString() + "-"+
               // lb2.Text = string.Format("《{0}》 {1} 张 {2}元/张",record.Tickets[0].Movie.Name,record.Tickets.Count.ToString(),record.Tickets[0].Price.ToString());
              //  lb3.Text = record.Tickets[0].Seat.Room.Name+"-"+record.Tickets[0].Seat.Room.Cinema.Name  ;
               // lb4.Text = record.TotalPrice.ToString();
                lb2.Text = record.Tickets[0].Seat.Room.Cinema.Name;
                lb3.Text = record.TotalPrice.ToString();
                btn.BackgroundImage = Properties.Resources.Account_FeeDetail_RowCol4_detail;
                btn.Tag = record;
               // lb4.Text = string.Empty;

            }
            else
            {
                btn.Tag = null;
                lb1.Text = lb2.Text = lb3.Text = lb4.Text = string.Empty;
                btn.BackgroundImage = Properties.Resources.Account_FeeDetail_RowCol4;
            }
        }
示例#6
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);
        }
示例#7
0
        public static void GetUserBuyRecordDetail(BuyRecordObject obj)
        {
            string xmlOrderDetail = string.Empty;
            xmlOrderDetail = hiPiaoSrv.QueryUserBuyRecordDetail(obj.User,obj.OrderId);
            XmlDocument docOrderDetail = new XmlDocument();
            docOrderDetail.LoadXml(xmlOrderDetail);
            XmlNode detailNode = docOrderDetail.SelectSingleNode("//return");

            obj.BuyTime = DateTime.Parse(docOrderDetail.SelectSingleNode("//buytime").InnerText);
            obj.ConnectMobile = docOrderDetail.SelectSingleNode("//phonenum").InnerText;
            //obj.TotalPrice = Int32.Parse(docOrderDetail.SelectSingleNode("//summoney").InnerText);
            obj.ValidCode = docOrderDetail.SelectSingleNode("//hipiaonumber").InnerText;
            TicketObject ticket = null;
            MovieObject movie = null;
            CinemaObject cinema = null;
            SeatObject seat = null;
            RoomObject room = null;
            int count = Int32.Parse(docOrderDetail.SelectSingleNode("//ticketnum").InnerText);
            cinema = new CinemaObject();
            cinema.Name = docOrderDetail.SelectSingleNode("//cinemaname").InnerText;
            seat = new SeatObject();
            seat.SeatId = docOrderDetail.SelectSingleNode("//cinemaseat").InnerText;
            room = new RoomObject();
            room.Name = docOrderDetail.SelectSingleNode("//cinemahall").InnerText;
            seat.Room = room;
            room.Cinema = cinema;
            string tmp = docOrderDetail.SelectSingleNode("//onemoney").InnerText;
            tmp = tmp.Substring(1, tmp.IndexOf("元*") - 1);
            //cinemaseat onemoney
            double price = double.Parse(tmp);
            movie = new MovieObject();
            movie.Name = docOrderDetail.SelectSingleNode("//pixname").InnerText;
            DateTime buyTime = DateTime.Parse(docOrderDetail.SelectSingleNode("//buytime").InnerText);
            DateTime playTime=DateTime.Parse(docOrderDetail.SelectSingleNode("//playtime").InnerText);
            for (int j = 0; j < count; j++)
            {
                ticket = new TicketObject();
                ticket.BuyTime =buyTime ;
                ticket.Price = (int)price;
                ticket.PlayTime = playTime;
                ticket.Movie = movie;
                ticket.Seat = seat;
                obj.Tickets.Add(ticket);
            }
        }
示例#8
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;
        }