private void btnNuevo_Click(object sender, EventArgs e) { FormAgregarUsuario frm = new FormAgregarUsuario(true, false); AddOwnedForm(frm); frm.ShowDialog(); }
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."); } }