AerolineaFrba.Listado_Estadistico.Form1.button1_Click_1 C# (CSharp) Метод

button1_Click_1() приватный Метод

private button1_Click_1 ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
Результат void
        private void button1_Click_1(object sender, EventArgs e)
        {
            Boolean huboError = false;
            huboError = !Validacion.estaSeleccionado(cboSemestre,  true , "Semestre") || huboError;
            huboError = Validacion.esVacio(txtAnio, "Año", true) || huboError;
            huboError = !Validacion.esNumero(txtAnio, "Año", true) || huboError;
            huboError = !Validacion.estaEntreLimites(txtAnio,1990,2050,false, "Año") || huboError;
            huboError = !Validacion.estaSeleccionado(cboEstadistica, true, "Estadística") || huboError;

            if (!huboError)
            {
                SQLManager.ejecutarQuery("select * from " + this.estadisticaSeleccionada() + "(" + this.semestreSeleccionado() + ", '" + txtAnio.Text + "')", dg);
                dg.CurrentCell = null;

                if (dg.RowCount == 0)
                {
                    MessageBox.Show("No se encontraron registros para armar el TOP 5", "Estadistica vacia", MessageBoxButtons.OK);
                    dg.Visible = false;
                }
                else
                {
                    dg.Visible = true;

                    if (dg.RowCount < 5)
                        MessageBox.Show(mensaje, "Estadistica incompleta", MessageBoxButtons.OK);
                }
            }
        }