Ejemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            String year = maskedTextBoxAÑO.Text;

            if (year.Equals(""))
            {
                MessageBox.Show("Ingrese el año");
            }
            else if (!(year.Length == 4) || (Convert.ToInt16(year) < 1990))
            {
                MessageBox.Show("Ingrese un año correcto");
            }

            else if (comboBoxSEMESTRE.Text.Equals(""))
            {
                MessageBox.Show("Seleccione un semestre");
            }

            else if (comboBoxSEMESTRE.Text.Equals("PRIMER SEMESTRE"))
            {
                semestre = "1";
                Listados_Estadisticos.ResultadoListado conf = new Listados_Estadisticos.ResultadoListado(numList, maskedTextBoxAÑO.Text, semestre);
                try
                {
                    conf.Show();
                }
                catch { }

            }
            else if (comboBoxSEMESTRE.Text.Equals("SEGUNDO SEMESTRE"))
            {
                semestre = "2";
                Listados_Estadisticos.ResultadoListado conf = new Listados_Estadisticos.ResultadoListado(numList, maskedTextBoxAÑO.Text, semestre);
                try
                {
                    conf.Show();
                }
                catch { }

            }
        }
Ejemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            String year = maskedTextBoxAÑO.Text;

            if (year.Equals(""))
            {
                MessageBox.Show("Ingrese el año");
            }
            else if (!(year.Length == 4) || (Convert.ToInt16(year) < 1990))
            {
                MessageBox.Show("Ingrese un año correcto");
            }

            else if (comboBoxSEMESTRE.Text.Equals(""))
            {
                MessageBox.Show("Seleccione un semestre");
            }

            else if (comboBoxSEMESTRE.Text.Equals("PRIMER SEMESTRE"))
            {
                semestre = "1";
                Listados_Estadisticos.ResultadoListado conf = new Listados_Estadisticos.ResultadoListado(numList, maskedTextBoxAÑO.Text, semestre);
                try
                {
                    conf.Show();
                }
                catch { }
            }
            else if (comboBoxSEMESTRE.Text.Equals("SEGUNDO SEMESTRE"))
            {
                semestre = "2";
                Listados_Estadisticos.ResultadoListado conf = new Listados_Estadisticos.ResultadoListado(numList, maskedTextBoxAÑO.Text, semestre);
                try
                {
                    conf.Show();
                }
                catch { }
            }
        }