public async Task <IActionResult> RegistrationLevel() { RegistrationLevelViewModel model = new RegistrationLevelViewModel { registrationLevels = await lostAndFoundType.GetRegistrationLevel() }; return(View(model)); }
public async Task <IActionResult> RegistrationLevel(RegistrationLevelViewModel model) { string userName = User.Identity.Name; RegistrationLevel level = new RegistrationLevel { Id = (int)model.levelId, levelName = model.levelName, levelNameBn = model.levelNameBn, shortOrder = model.shortOrder }; int id = await lostAndFoundType.SaveRegistrationLevel(level); return(RedirectToAction(nameof(RegistrationLevel))); }