コード例 #1
0
        private void BT_Imprimir_Click(object sender, EventArgs e)
        {
            try
            {
                if (TB_Desde.Text == "")
                {
                    TB_Desde.Text = "1";
                }

                if (TB_Hasta.Text == "")
                {
                    TB_Hasta.Text = "9999";
                }

                ReportDocument reporte = new ListadoTemas();

                VistaPrevia rp = new VistaPrevia();
                rp.CargarReporte(reporte, "{Curso.Codigo}>=" + TB_Desde.Text.Trim() + " AND {Curso.Codigo}<=" + TB_Hasta.Text.Trim() + " AND {Curso.Codigo}>0");
                rp.Imprimir();

                TB_Desde.Text = "";
                TB_Hasta.Text = "";

                TB_Desde.Focus();
            }
            catch (Exception err)
            {
                MessageBox.Show(err.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
コード例 #2
0
        private void TB_Hasta_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyData == Keys.Enter)
            {
                if (TB_Hasta.Text.Replace('/', ' ').Trim() == "")
                {
                    return;
                }

                TB_Desde.Focus();
            }
            else if (e.KeyData == Keys.Escape)
            {
                TB_Hasta.Clear();
            }
        }
コード例 #3
0
        private void BT_Imprimir_Click(object sender, EventArgs e)
        {
            try
            {
                var rp = _PrepararReporte();
                rp.Imprimir();

                TB_Desde.Text = "";
                TB_Hasta.Text = "";

                TB_Desde.Focus();
            }
            catch (Exception err)
            {
                MessageBox.Show(err.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
コード例 #4
0
        private void rbPorLegajo_Click(object sender, EventArgs e)
        {
            TB_Desde.Enabled = rbPorLegajo.Checked && !rbPorSector.Checked && !rbPorPerfil.Checked;
            TB_Hasta.Enabled = TB_Desde.Enabled;

            cmbSectores.Enabled = rbPorSector.Enabled;
            cmbPerfiles.Enabled = rbPorPerfil.Enabled;

            if (rbPorLegajo.Checked)
            {
                TB_Desde.Focus();
            }
            else if (rbPorSector.Checked)
            {
                cmbSectores.Focus();
                cmbSectores.DroppedDown = true;
            }
            else
            {
                cmbPerfiles.Focus();
                cmbPerfiles.DroppedDown = true;
            }
        }
コード例 #5
0
 private void Inicio_Shown(object sender, EventArgs e)
 {
     TB_Desde.Focus();
 }
コード例 #6
0
 private void TB_Prove_SelectedIndexChanged(object sender, EventArgs e)
 {
     TB_Desde.Focus();
 }
コード例 #7
0
 private void IniEvaSemActProve_Shown(object sender, EventArgs e)
 {
     TB_Desde.Focus();
 }