Exemplo n.º 1
0
 private void llenarPresentaciones()
 {
     presentaciones = new List <string>();
     data           = metodos_Bd.REGRESAR_TODO(NOMBRE_TABLA_2, TABLA2_PRESENTACIONES);
     foreach (DataRow row in data.Rows)
     {
         presentaciones.Add(row[0].ToString());
     }
     if (datos == null)
     {
         datos = new ObservableCollection <fila>();
     }
     tabla_Principal.ItemsSource = datos;
 }
Exemplo n.º 2
0
        private void llenarPresentaciones()
        {
            DataTable data;

            if (presentaciones.Count == 0)
            {
                data = metodos_Bd.REGRESAR_TODO(NOMBRE_TABLA_2, TABLA2_PRESENTACIONES);
                foreach (DataRow row in data.Rows)
                {
                    presentaciones.Add(row[0].ToString());
                }
                tabla_Principal.ItemsSource = datos;
            }
            data = null;

            //inserta la primera fila en tabla
            datos.Add(new fila()
            {
                numero = "", presentacion = presentaciones
            });

            agregarControles();
            elegirFase();
        }