Пример #1
0
        public TicketObject MockTicket()
        {
            TicketObject ticket = new TicketObject();

            ticket.PlayTime = System.DateTime.Now;
            ticket.Price    = 35;
            ticket.TicketId = "00000FEDD000";
            ticket.Movie    = MockMovie();
            ticket.Seat     = MockCinema().Rooms[0].Seats[5];
            return(ticket);
        }
Пример #2
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);
            }
        }
Пример #3
0
 public ReturnObject PrintTicket(UserObject user, TicketObject ticket)
 {
     throw new NotImplementedException();
 }
Пример #4
0
 public TicketObject MockTicket()
 {
     TicketObject ticket = new TicketObject();
     ticket.PlayTime = System.DateTime.Now;
     ticket.Price = 35;
     ticket.TicketId = "00000FEDD000";
     ticket.Movie = MockMovie();
     ticket.Seat = MockCinema().Rooms[0].Seats[5];
     return ticket;
 }
Пример #5
0
 public ReturnObject PrintTicket(UserObject user, TicketObject ticket)
 {
     throw new NotImplementedException();
 }
Пример #6
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);
            }
        }