//[HttpPost] public ActionResult PostTheEditedProfile(string uid, string details) { var model = new accountViewModel(); model.fugitive = dataHandler.SelctOneRecordRandomly(uid); model.reports = dataHandler.reports(uid); model.locationDetails = details; return(View(model)); }
//[HttpPost] public ActionResult Edit(string uid) { //ViewBag.Message = "MOST WANTED Profile"; //// Item singleProfile = root.items[index]; //var testMostWantedProfile = new Item(); //testMostWantedProfile.description = "THE TITLE of MOST wanted PERson"; //testMostWantedProfile.description = "this is a DESCRIPTION of a most wanted person"; //testMostWantedProfile.caution = "this is a CAUTION for this most wanted person"; //var image1 = new Image(); //var image2= new Image(); //image1.large = "https://pncguam.com/wp-content/uploads/2013/07/michael%20tony.jpg"; //image2.large = "https://kuam.images.worldnow.com/images/18564862_G.jpeg?auto=webp&disable=upscale&height=560&fit=bounds&lastEditedDate=1562204300000"; //List<Image> ImageList = new List<Image>(new Image[] { image1, image2 }); //testMostWantedProfile.images = ImageList; //testMostWantedProfile.nationality = "this is a NATIONALITY of a most wanted person"; //testMostWantedProfile.images[1] = image2; //testMostWantedProfile.status = "na"; //testMostWantedProfile.uid = "UID NUMBER"; //imageListToPassAround = modelToPassAround.images.ToList(); if (User.Identity.IsAuthenticated) { var model = new accountViewModel(); model.fugitive = dataHandler.SelctOneRecordRandomly(uid); model.reports = dataHandler.reports(uid); return(View(model)); } else { return(RedirectToAction("PostTheEditedProfile", "Home", new { uid })); } }
public async Task <IActionResult> addBank(accountViewModel model) { var acctModel = new accountModel(); //string accountId = "ACC _ID_" + model.acctNumber; if (model.bankName.ToLower() == "seb") { TempData["accountnumber"] = model.acctNumber; var redirecturl = _sEBAccountAuthService.AuthRedirectUrl(); return(Redirect(redirecturl)); } else { var bankInfo = _medBankServices.GetAccountInfoById(model.acctNumber).Result; acctModel.BankName = model.bankName; acctModel.BankAccountNumber = bankInfo.AccountNumber; acctModel.BankAccountName = bankInfo.AccountName; acctModel.Currency = bankInfo.Currency; acctModel.AccountType = bankInfo.AccountType; acctModel.Balance = bankInfo.AccountBalance; acctModel.TotalExpense = bankInfo.TotalExpenses; acctModel.TotalIncome = bankInfo.TotalIncome; acctModel.SandboxIdentification = bankInfo.SandboxIdentification; acctModel.CreatedAt = DateTime.Now; acctModel.User = await _userManager.GetUserAsync(HttpContext.User); acctModel.TransactionLimit = model.transactionLimit; _context.AccountModels.Add(acctModel); await _context.SaveChangesAsync(); } return(RedirectToAction(nameof(Dashboard))); }