private void btnTim_Click(object sender, EventArgs e) { RoleBUS roleBus = new RoleBUS(); RoleNV roleNV = roleBus.getRole(txtRoleID.Text); txtRoleID.Text = roleNV.RoleId; txtTenRole.Text = roleNV.RoleName; txtMoTa.Text = roleNV.Description; }
private void btnTim_Click(object sender, EventArgs e) { RoleBUS roleBus = new RoleBUS(); RoleNV roleNV = roleBus.getRole(txtRoleID.Text); if (roleNV == null) { MessageBox.Show(txtRoleID.Text + " không tồn tại!!!"); } else { txtRoleID.Text = roleNV.RoleId; txtTenRole.Text = roleNV.RoleName; txtMoTa.Text = roleNV.Description; } }