public async Task <ViewResult> GetAccountProducts(int IdBankAccount) { CookieOptions option = new CookieOptions(); option.Expires = DateTime.Now.AddDays(1); Response.Cookies.Append("IdBankAccount", IdBankAccount.ToString(), option); //get iduser from cookie String idUserString = Request.Cookies["IdUser"]; // get products accounts AccountProductsViewModel model = await _mediator.Send(new GetAcccountInformation.Query(IdBankAccount, Int32.Parse(idUserString ?? string.Empty))); return(View(model)); }
public async Task <IActionResult> ShowATM(int IdBankAccount) { ViewData["Title"] = "Accounts"; if (Request.Cookies["IdBankAccountATM"] == "" || Request.Cookies["IdBankAccountATM"] == null) { return(new RedirectResult("/ATM/")); } if (IdBankAccount == 0 || IdBankAccount == null) { IdBankAccount = Int16.Parse(Request.Cookies["IdBankAccountATM"]); } //get iduser from cookie String idUserString = Request.Cookies["IdUserATM"]; // get products accounts AccountProductsViewModel model = await _mediator.Send(new GetAcccountInformation.Query(IdBankAccount, Int32.Parse(idUserString ?? string.Empty))); return(View(model)); }