public void SalvarPerfilCargo(TPerfilVO tperfilvo) { try { if (ValidarPerfilCargo(tperfilvo).Count > 0) { throw new CABTECException("Este Cargo já esta relacionado a um Perfil."); } if (tperfilvo.IDPerfilCargo > 0) { TPerfilBLL.AlterarPerfilCargo(tperfilvo); } else { TPerfilBLL.InserirPerfilCargo(tperfilvo); } TUsuarioBLL.AlterarPerfilCargo(tperfilvo.NomeCargo, tperfilvo.IDPerfil); } catch (CABTECException ex) { throw new CABTECException(ex.Message); } catch (Exception) { throw new CABTECException("Erro ao Salvar Perfil - Cargo."); } }