Пример #1
0
 private void ListBoxSession_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     try
     {
         var contentForListBox = ListBoxSession.SelectedItem as AppViewSession;
         if (contentForListBox != null)
         {
             IDSession = contentForListBox.sessionID;
             TicketWPF ticketWPF = new TicketWPF(LOGIN, IDSession, ADMIN, FilmID);
             ticketWPF.Show();
             this.Close();
         }
     }
     catch (Exception)
     {
         MessageBox.Show("Нет подключения к интернету ");
     }
 }
 private void ListBoxSession_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     try
     {
         var contentForListBox = ListBoxSession.SelectedItem as AppViewSession;
         if (contentForListBox != null)
         {
             IDSession = Convert.ToInt32(contentForListBox.sessionID);
             TicketWPF ticketWPF = new TicketWPF(LOGIN, IDSession, ADMIN, FilmID);
             ticketWPF.Show();
             this.Close();
         }
     }
     catch (Exception)
     {
         MessageBox.Show("Ошибка ");
     }
 }