Exemplo n.º 1
0
        private void btnNuevo_Click(object sender, EventArgs e)
        {
            FrmCargo frmCargo = new FrmCargo();

            frmCargo.StartPosition = FormStartPosition.CenterScreen;
            frmCargo.ShowDialog();

            MostrarCargos();
        }
Exemplo n.º 2
0
        private void btnModificar_Click(object sender, EventArgs e)
        {
            byte id = (byte)UFormulario.ObtenerIdGrid(dgvCargos);

            if (id > 0)
            {
                FrmCargo frmCargo = new FrmCargo();
                frmCargo.StartPosition = FormStartPosition.CenterScreen;
                frmCargo._idCargo      = id;
                frmCargo.ShowDialog();
                MostrarCargos();
            }
            else
            {
                MessageBox.Show("Debes seleccionar un Estado");
            }
        }