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 })); }
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 })); }