/// <summary> /// responde a um cliente via moderacao um usuário valido /// </summary> /// <param name="request"></param> /// <returns></returns> public async Task ModeracaoResponderCliente(QAModeracaoResponderClienteRQ request) { object[] xParams = { new SqlParameter("@IdQuestion", request.IdQuestion), new SqlParameter("@IdClienteAcesso", request.IdClienteAcesso), new SqlParameter("@NomeRespondente", request.NomeRespondente), new SqlParameter("@Resposta", request.Resposta), new SqlParameter("@IdBadge", request.IdBadge), }; await DataContext.Database.ExecuteSqlCommandAsync("exec QAModeracaoResponderCliente @IdQuestion,@IdClienteAcesso, @NomeRespondente, @Resposta,@IdBadge", xParams); }
public async Task <ActionResult> ResponderCliente(QAModeracaoResponderClienteRQ request) { if (request == null) { return(Json(false, JsonRequestBehavior.AllowGet)); } try { request.IdClienteAcesso = AppUserManager.Usuario.IdUsuario; await _QAService.ModeracaoResponderCliente(request); return(Json(true, JsonRequestBehavior.AllowGet)); } catch (Exception) { return(Json(false, JsonRequestBehavior.AllowGet)); } }