Example #1
0
        public async Task <IActionResult> Profile(Account account)
        {
            Account acc = account;

            if (account.Id == 0)
            {
                acc = await _crud.GetAccountDetails(int.Parse(HttpContext.Session.GetString("Id")));
            }
            return(View(acc));
        }
        public async Task <IActionResult> Purchase()
        {
            PurchaseViewModel pVM = new PurchaseViewModel();
            Account           acc = await _crud.GetAccountDetails(int.Parse(HttpContext.Session.GetString("Id")));

            pVM.Account = acc;
            Random rnd = new Random();

            pVM.OrderNo = rnd.Next(0, 999999);
            return(View(pVM));
        }