Пример #1
0
        public JsonResult GetDeclinedPerUser()
        {
            string serverResponse = "";

            List <MotoRequestModel> declined = new List <MotoRequestModel>();

            if (UniversalService.CurrentUser.Type == "USR")
            {
                declined = ECardService.GetAllMotoPerUser("D", out serverResponse);
            }
            else
            {
                declined = ECardService.GetAllMoto("D", out serverResponse);
            }

            return(Json(new { error = serverResponse, declined }));
        }
Пример #2
0
        public JsonResult GetPending()
        {
            string serverResponse = "";

            List <MotoRequestModel> request = new List <MotoRequestModel>();

            if (UniversalService.CurrentUser.Type == "USR")
            {
                request = ECardService.GetAllMotoPerUser("P", out serverResponse);
            }
            else if (UniversalService.CurrentUser.Type == "APR")
            {
                request = ECardService.GetAllMoto("P", out serverResponse);
            }

            return(Json(new { error = serverResponse, request }));
        }