Example #1
0
        private void ButtonDatosMostrar_Click(object sender, RoutedEventArgs e)
        {
            ClsConexion     cn = new ClsConexion();
            DataTable       dt = cn.consultaTablaDirecta("SELECT* FROM dbprogra.tb_proyectof where Fecha between '" + Fecha1.Value.ToString("yyyy/MM/dd") + "' and '" + Fecha2.Value.ToString("yyyy/MM/dd") + "'");
            ClsCargaArchivo ar = new ClsCargaArchivo(dt);

            string datoS = "";

            foreach (DataRow x in dt.Rows)
            {
                datoS += ($"{x[0]},{x[1]},{x[2]},{x[3]},{x[4]},{x[5]},{x[6]}\n");
            }

            ListDatos.ItemsSource = datoS;
        }
Example #2
0
        private void ButtonBsxNombre_Click(object sender, RoutedEventArgs e)
        {
            string          nombre = TexBoxNombreCons.Text;
            ClsConexion     cn     = new ClsConexion();
            DataTable       dt     = cn.consultaTablaDirecta("SELECT * FROM dbprogra.tb_proyectof where UPPER(Nombre) like ('%" + nombre + "%')");
            ClsCargaArchivo ar     = new ClsCargaArchivo(dt);

            string datoS = "";

            foreach (DataRow x in dt.Rows)
            {
                datoS = ($"{x[0]},{x[1]},{x[2]},{x[3]},{x[4]},{x[5]},{x[6]}\n");
            }

            ListDatos.ItemsSource = datoS;

            TexBoxNombreCons.Clear();
        }