Example #1
0
 public TicketInfoMessage(TicketInfoMessage msg)
 {
     this.TripInfo = msg.TripInfo;
     this.SeatId = msg.SeatId;
     this.EmpId = msg.SeatId;
     this.ClientId = msg.ClientId;
     this.TicketPrice = msg.TicketPrice;
 }
Example #2
0
        public ClientInfoViewModel()
        {
            SaveClientInfoCmd = new RelayCommand<ClientInfoWindow>(this.SaveClientInfo);

            Messenger.Default.Register<TicketInfoMessage>(this, (msg) =>
            {
                this.message = msg;
            });
        }
Example #3
0
 public TicketViewModel()
 {
     PrintTicketCmd = new RelayCommand<object>(PrintTicket);
     Messenger.Default.Register<TicketInfoMessage>(this, (msg) =>
     {
         if (msg.IsForPrint)
         {
             ticketMessage = msg;
             SetTicketInfo();
         }
     });
 }
Example #4
0
 private void SaveClientInfo(ClientInfoWindow window)
 {
     if (!String.IsNullOrEmpty(FIO) && !String.IsNullOrEmpty(PassportNum))
     {
         var client = new Client();
         client.FullName = this.FIO;
         client.PassportNum = this.PassportNum;
         ContextKeeper.Clients.Add(client);
         this.message.ClientId = client.Id;
         BuyTicket();
         var ticket = new TicketWindow();
         ticket.Show();
         var printTicketMsg = new TicketInfoMessage(message);
         printTicketMsg.IsForPrint = true;
         Messenger.Default.Send(printTicketMsg);
         window.Close();
     }
 }