public Task<HttpResponseMessage> CriarGrupo(GrupoModel model)
        {
            HttpResponseMessage response;
            try
            {
                var grupoPermissao = Mapper.Map<GrupoPermissao>(model);
                _usuarioService.CriarGrupoPermissao(grupoPermissao);
                response = ReturnSuccess();
            }
            catch (Exception ex)
            {
                response = ReturnError(ex);
            }

            var tsc = new TaskCompletionSource<HttpResponseMessage>();
            tsc.SetResult(response);
            return tsc.Task;
        }
 public JsonResult NovoGrupo(GrupoModel model)
 {
     var response = ServiceRequest.Post<RetornoBase<string>>(model, "api/Usuario/CriarGrupo");
     return ReturnResponse(response);
 }
 public JsonResult EditarGrupo(GrupoModel model)
 {
     var response = ServiceRequest.Put<RetornoBase<string>>(model, "api/Usuario/EditarGrupo");
     AtualizarPermissoesDoUsuarioLogado();
     return ReturnResponse(response);
 }