//Métodos para devolver al APP
        /// <summary>
        /// Retorna un JSON con los pasos del compa del partcipante
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public async Task <string> GetPasos(int userId, string startDate, string endDate)
        {
            using (var scope = EkilibrateUI.Autofac.ContainerConfig.ProxyContainer.BeginLifetimeScope())
            {
                var middleTier = scope.Resolve <Ekilibrate.Model.Services.Participante.IDataRetriever>();
                Ekilibrate.Model.Entity.Participante.clsPasosApp Result = await middleTier.GetPasosDiaApp(userId);

                //return Json(Result.ToDataSourceResult(request, ModelState));
                return("OK");
            }
        }
예제 #2
0
        public async Task <JsonResult> GetPasosCompa(int userId)
        {
            using (var scope = EkilibrateUI.Autofac.ContainerConfig.ProxyContainer.BeginLifetimeScope())
            {
                var middleTier = scope.Resolve <Ekilibrate.Model.Services.Participante.IDataRetriever>();
                Ekilibrate.Model.Entity.Participante.clsPasosApp Result = await middleTier.GetPasosDiaCompaApp(userId);

                return(Json(Result, JsonRequestBehavior.AllowGet));
                //return "OK";
            }
        }
예제 #3
0
        public async Task <JsonResult> GetPasos(int userId, string startDate, string endDate)
        {
            using (var scope = EkilibrateUI.Autofac.ContainerConfig.ProxyContainer.BeginLifetimeScope())
            {
                BarcoSoftUtilidades.Seguridad.Usuario user = this.HttpContext.GetActualUser();

                var middleTier = scope.Resolve <Ekilibrate.Model.Services.Participante.IDataRetriever>();
                Ekilibrate.Model.Entity.Participante.clsPasosApp Result = await middleTier.GetPasosDiaApp(userId);

                return(Json(Result));
            }
        }