public async Task <IActionResult> IssueMore([Bind("Id,Price,TimeOut,Amount")] IssueMoreViewModel issueMoreViewModel) { var(jwtToken, id) = JwtHelper.GetJwtAndIdFromJwt(Request); await _publicShareOwnerControlClient.IssueShares(new IssueSharesRequest { Amount = issueMoreViewModel.Amount, Owner = id }, issueMoreViewModel.Id, jwtToken); var sellRequestRequest = new SellRequestRequest { AmountOfShares = issueMoreViewModel.Amount, AccountId = id, Price = issueMoreViewModel.Price, StockId = issueMoreViewModel.Id, TimeOut = issueMoreViewModel.TimeOut }; var validationResult = await _stockShareProviderClient.SetSharesForSale(sellRequestRequest, jwtToken); if (validationResult.Valid) { return(await List()); } ViewBag.ShowErrorDialog = true; ViewBag.ErrorText = validationResult.ErrorMessage; return(View(issueMoreViewModel)); }
public IActionResult IssueMore(long id) { var issueMoreViewModel = new IssueMoreViewModel { Id = id, Amount = 1, TimeOut = DateTime.Today.AddDays(1), Price = 1 }; return(View(issueMoreViewModel)); }