Example #1
0
 private void cbDisp_SelectionChanged_1(object sender, SelectionChangedEventArgs e)
 {
     _aviso = (Aviso)cbDisp.SelectedValue;
     if (_aviso != null)
     {
         txtAvi2.Text = _aviso.Noticia;
     }
 }
Example #2
0
 private void AgregarLab(object sender, RoutedEventArgs e)
 {
     if (Utilidades.Validar(txtAvi))
     {
         AvisoBLL avisos = new AvisoBLL();
         _aviso = new  Aviso();
         _aviso.Noticia = txtAvi.Text;
         if (avisos.Agregar(_aviso) != -1)
         {
             MessageBox.Show(this, "Aviso Agregado, OK ", appInfo.AssemblyProduct,
                 MessageBoxButton.OK, MessageBoxImage.Information);
             this.CargaAvisos();
             Utilidades.Limpiar(txtAvi);
         }
         else
             MessageBox.Show(this, "Se produjo un Error, Fail", appInfo.AssemblyProduct,
                 MessageBoxButton.OK, MessageBoxImage.Information);
     }
     else MessageBox.Show(this, "No debe de haber campos vacios", appInfo.AssemblyProduct,
                 MessageBoxButton.OK, MessageBoxImage.Information);
 }