private void btnEditUser_Click(object sender, EventArgs e) { if (dgvUsers.SelectedRows.Count == 0) { return; } var selectedItem = int.Parse(dgvUsers.SelectedRows[0].Cells["id"].Value.ToString()); Usuario selectedUser = UsuarioManager.obtener(selectedItem); AgregarUsuario au = new AgregarUsuario { user = selectedUser }; au.Show(); }
private void btnAddUser_Click(object sender, EventArgs e) { AgregarUsuario aU = new AgregarUsuario(); aU.Show(); }