// GET: ReceivePaymentCulturalExchange/Create public async Task <IActionResult> Create() { var userId = this.User.FindFirstValue(ClaimTypes.NameIdentifier); var user = _applicationUserAppService.GetById(userId); if (user == null) { return(NotFound()); } ViewBag.EnvironmentId = user.EnvironmentId; ViewBag.CulturalExchange = _culturalExchangeAppService.GetAll(user.EnvironmentId, true).OrderBy(x => x.StudentViewModel.FullName); return(View()); }
// GET: CulturalExchange public async Task <IActionResult> Index() { var userId = this.User.FindFirstValue(ClaimTypes.NameIdentifier); var user = _applicationUserAppService.GetById(userId); if (user == null) { return(NotFound()); } ViewBag.EnvironmentId = user.EnvironmentId; ViewBag.Colleges = _collegeAppService.GetAll(user.EnvironmentId); ViewBag.Accomodations = _accomodationAppService.GetAll(user.EnvironmentId); List <CulturalExchangeViewModel> culturalExchangeList = _culturalExchangeAppService.GetAll(user.EnvironmentId, true); return(View("~/Views/CulturalExchange/Index.cshtml", culturalExchangeList)); }