private void Button_Tickets(object sender, RoutedEventArgs e) { var window = new TicketWindow(); Close(); window.Show(); }
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(); }
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); } }
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(); } }