Ejemplo n.º 1
0
        public async Task <IActionResult> RegistrationLevel()
        {
            RegistrationLevelViewModel model = new RegistrationLevelViewModel
            {
                registrationLevels = await lostAndFoundType.GetRegistrationLevel()
            };

            return(View(model));
        }
Ejemplo n.º 2
0
        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)));
        }