예제 #1
0
        private void btnNuevo_Click(object sender, EventArgs e)
        {
            FormAgregarUsuario frm = new FormAgregarUsuario(true, false);

            AddOwnedForm(frm);
            frm.ShowDialog();
        }
예제 #2
0
        private void btnEditar_Click(object sender, EventArgs e)
        {
            FormAgregarUsuario frm = new FormAgregarUsuario(false, true);

            AddOwnedForm(frm);
            if (dataGridView1.SelectedRows.Count > 0)
            {
                frm.txtNombreUsuario.Text = usuarioBLL.NombreUsuario;
                frm.txtCargo.Text         = usuarioBLL.Cargo;
                frm.txtApellido.Text      = usuarioBLL.Apellido;
                frm.txtnombre.Text        = usuarioBLL.Nombre;

                frm.pictureSet       = usuarioBLL.Foto;
                frm.IDPERMISOS       = IDPERMISOS;
                frm.IDAux            = usuarioBLL.ID;
                frm.txtPassword.Text = usuarioBLL.Password;
                frm.IDCBX            = usuarioBLL.Permisos;
                frm.ShowDialog();
            }
            else
            {
                MessageBox.Show("Seleccione una fila.");
            }
        }