예제 #1
0
        private void txtCodigo_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyData == Keys.Enter)
            {
                if (txtCodigo.Text.Trim() == "")
                {
                    return;
                }

                string IdAModificar     = txtCodigo.Text.Trim();
                Legajo LegajoAModificar = new Legajo();
                LegajoAModificar = L.BuscarUno(IdAModificar);

                if (LegajoAModificar.Codigo == 0)
                {
                    return;
                }

                AgModLegajo AgMod = new AgModLegajo(LegajoAModificar)
                {
                    StartPosition = FormStartPosition.CenterScreen
                };
                AgMod.Show();

                txtCodigo.Text = "";
            }
            else if (e.KeyData == Keys.Escape)
            {
                txtCodigo.Text = "";
            }
        }
예제 #2
0
        private void BTAgregarLegajo_Click(object sender, EventArgs e)
        {
            AgModLegajo agrModLegajo = new AgModLegajo {
                StartPosition = FormStartPosition.CenterScreen
            };

            agrModLegajo.Show();

            //ActualizarGrilla();
        }