public async Task <IActionResult> OnGetAsync() { var user = await _userManager.GetUserAsync(User); if (user == null || !user.StudentIdentityConfirmed) { return(RedirectToPage("Index")); } var post = await _takeExpress.GetLastMissionInfoAsync(user.Id); TakeExpressInput = new TakeExpressInputModel { PostUserId = user.Id, }; if (post != null) { TakeExpressInput.ReceiveAddress1 = post.PosterAddress1; TakeExpressInput.ReceiveAddress2 = post.PosterAddress2; TakeExpressInput.ReceivePhoneNumber = post.PosterPhoneNumber; } ExpressCompanyList = await _expressCompanyListService.GetAllAsync(); PostUserId = user.Id; EditMark = false; return(Page()); }
public async Task <IActionResult> OnGetAsync() { var user = await _userManager.GetUserAsync(User); if (user == null || !user.StudentIdentityConfirmed) { return(RedirectToPage("Index")); } var post = await _purchase.GetLastMissionInfoAsync(user.Id); PurchaseInput = new PurchaseInputModel { PostUserId = user.Id, }; if (post != null) { PurchaseInput.ReceiveAddress1 = post.PosterAddress1; PurchaseInput.ReceiveAddress2 = post.PosterAddress2; PurchaseInput.ReceivePhoneNumber = post.PosterPhoneNumber; } PostUserId = user.Id; EditMark = false; return(Page()); }