コード例 #1
0
        private void Button_Tickets(object sender, RoutedEventArgs e)
        {
            var window = new TicketWindow();

            Close();
            window.Show();
        }
コード例 #2
0
        private void BuildETicket_Executed(object obj)
        {
            ITicketBuilder b2 = new ETicketConcreteBuilder();

            b2.BuildReservation(SelectedReservation);
            b2.BuildIdentity();
            if (_ticket == null)
            {
                _ticket = b2.BuildTicket();
            }
            SelectedReservation.WasPaid = true;
            _db.Update(SelectedReservation);
            TicketWindow t = new TicketWindow(_ticket);

            t.Show();
        }
コード例 #3
0
        private void Button_Add_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                _model.Description = textDescription.Text;
                _model.Date        = DateTime.Now;
                _model.Admin       = (Admin)cbAdmin.SelectedItem;
                _model.User        = (User)cbUser.SelectedItem;
                _model.VPS         = (VPS)cbVps.SelectedItem;

                _context.Get <Ticket, ITicketRepository>().Persist(_model);

                _context.PersistState();
                var window = new TicketWindow();
                Close();
                window.Show();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
コード例 #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();
     }
 }