public HttpResponseMessage GetKPIMorosos(int? ciclo, int? cuatri, int? legajo, int? sede, string carrera, string nombre, string apellido, decimal? dni, int? kpi_monto_mayor, int? kpi_monto_menor)
        {
            try
            {
                string tokenString = string.Empty;
                string userString = string.Empty;
                try
                {
                    tokenString = this.ActionContext.Request.Headers.GetValues("Authorization").ToList().FirstOrDefault();
                    userString = this.ActionContext.Request.Headers.GetValues("User").ToList().FirstOrDefault();
                }
                catch
                {
                    return HttpResponseController.Return_401_Unauthorized(string.Empty);
                }

                if (SessionTokenService.ValidRequestByUserAndToken(tokenString, userString))
                {
                    return HttpResponseController.Return_200_OK(UniAlumnoService.GetKPIMorosos(ciclo, cuatri, legajo, sede, carrera, nombre, apellido, dni, kpi_monto_mayor, kpi_monto_menor));
                }
                return HttpResponseController.Return_401_Unauthorized(string.Empty);
            }
            catch
            {
                return HttpResponseController.Return_500_InternalServerError(string.Empty);
            }
        }
示例#2
0
        public HttpResponseMessage GetEdificioByCodins(string codins)
        {
            try
            {
                string tokenString = this.ActionContext.Request.Headers.GetValues("Authorization").ToList().FirstOrDefault();
                string userString  = this.ActionContext.Request.Headers.GetValues("User").ToList().FirstOrDefault();

                if (SessionTokenService.ValidRequestByUserAndToken(tokenString, userString))
                {
                    return(HttpResponseController.Return_200_OK(UniEdificioService.GetEdificioByCodins(codins)));
                }
                return(HttpResponseController.Return_401_Unauthorized(string.Empty));
            }
            catch
            {
                return(HttpResponseController.Return_401_Unauthorized(string.Empty));
            }
        }
        public HttpResponseMessage GetMorososTotal(int? ciclo, int? cuatri)
        {
            try
            {
                string tokenString = this.ActionContext.Request.Headers.GetValues("Authorization").ToList().FirstOrDefault();
                string userString = this.ActionContext.Request.Headers.GetValues("User").ToList().FirstOrDefault();

                if (SessionTokenService.ValidRequestByUserAndToken(tokenString, userString))
                {
                    return HttpResponseController.Return_200_OK(UniAlumnoService.GetMorososTotal(ciclo, cuatri));
                }
                return HttpResponseController.Return_401_Unauthorized(string.Empty);
            }
            catch
            {
                return HttpResponseController.Return_500_InternalServerError(string.Empty);
            }
        }
        public HttpResponseMessage GetByLegajo(int legajo)
        {
            try
            {
                string tokenString = this.ActionContext.Request.Headers.GetValues("Authorization").ToList().FirstOrDefault();
                string userString = this.ActionContext.Request.Headers.GetValues("User").ToList().FirstOrDefault();

                if (SessionTokenService.ValidRequestByUserAndToken(tokenString, userString))
                {
                    return HttpResponseController.Return_200_OK(UniRegionalService.GetAll());
                }
                return HttpResponseController.Return_401_Unauthorized(string.Empty);
            }
            catch
            {
                return HttpResponseController.Return_401_Unauthorized(string.Empty);
            }
        }