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); } }
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(); } }
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(); } }
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); } }
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; } }
private void Inicio_Shown(object sender, EventArgs e) { TB_Desde.Focus(); }
private void TB_Prove_SelectedIndexChanged(object sender, EventArgs e) { TB_Desde.Focus(); }
private void IniEvaSemActProve_Shown(object sender, EventArgs e) { TB_Desde.Focus(); }