Exemple #1
0
        private void TB_CodLegajo_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Escape)
            {
                TB_CodLegajo.Text = "";
                TB_DesLegajo.Text = "";
            }

            if (e.KeyCode == Keys.Enter)
            {
                if (TB_CodLegajo.Text.Trim() != "")
                {
                    Legajo _Leg = (new Legajo()).BuscarUno(TB_CodLegajo.Text);

                    if (_Leg.Codigo != 0)
                    {
                        TB_DesLegajo.Text = _Leg.Descripcion.Trim();
                        TB_Año.Focus();
                    }
                    else
                    {
                        TB_DesLegajo.Text = "";
                    }
                }
            }
        }
Exemple #2
0
 private void TB_Mes_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         TB_Año.Focus();
     }
 }
Exemple #3
0
 private void TB_DesLegajo_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (Cargado)
     {
         TB_Año.Focus();
     }
 }