コード例 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                if (SeleccionEstadistica.Text == "")
                {
                    throw new CampoVacioException("Estadistica");
                }
                if (seleccionTrimestre.Text == "")
                {
                    throw new CampoVacioException("Trimestre");
                }


                String funcion   = this.getTipoEstadistica();
                int    trimestre = this.getTrimestre();

                listado.DataSource = mapper.AplicarEstadistica(seleccionAño.Value.Year, trimestre, funcion);
            }
            catch (CampoVacioException exception)
            {
                MessageBox.Show("Falta completar campo: " + exception.Message);
                return;
            }
        }