示例#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_Desde_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         TB_Hasta.Focus();
     }
     else if (e.KeyCode == Keys.Escape)
     {
         TB_Desde.Clear();
     }
 }
示例#3
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();
            }
        }
示例#4
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);
            }
        }
示例#5
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;
            }
        }
示例#6
0
 private void Inicio_Shown(object sender, EventArgs e)
 {
     TB_Desde.Focus();
 }
示例#7
0
 private void TB_Prove_SelectedIndexChanged(object sender, EventArgs e)
 {
     TB_Desde.Focus();
 }
示例#8
0
 private void IniEvaSemActProve_Shown(object sender, EventArgs e)
 {
     TB_Desde.Focus();
 }