Beispiel #1
0
 private void llenarGrid()
 {
     try
     {
         Biblioteca.Anfitrion anfitrion = new Biblioteca.Anfitrion();
         dataGrid.ItemsSource = anfitrion.readTodos();
     }
     catch (Exception)
     {
         throw;
     }
 }
Beispiel #2
0
 private void btnActualizar_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         Biblioteca.Anfitrion anf = (Biblioteca.Anfitrion)dataGrid.SelectedItem;
         if (anf != null)
         {
             ActualizarAnfitrion actualizarAnfitrion = new ActualizarAnfitrion(anf.Id_tributario);
             actualizarAnfitrion.Show();
         }
         else
         {
             System.Windows.MessageBox.Show("Seleccione Anfitiron del listado", "Aviso");
         }
     }
     catch (Exception ex)
     {
         System.Windows.MessageBox.Show(ex.Message, "Error");
     }
 }
Beispiel #3
0
 private void btnBorrar_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         Biblioteca.Anfitrion anf = (Biblioteca.Anfitrion)dataGrid.SelectedItem;
         if (anf != null)
         {
             anf.crud(3);
             llenarGrid();
             System.Windows.MessageBox.Show("Anfitrion Eliminado (Cupos 0)", "Aviso");
         }
         else
         {
             System.Windows.MessageBox.Show("Seleccione Anfitrion del listado", "Aviso");
         }
     }
     catch (Exception ex)
     {
         System.Windows.MessageBox.Show(ex.Message, "Error");
     }
 }