Exemple #1
0
        // GET: Admin/Setting
        public ActionResult Index()
        {
            var vm = new SettingIndexViewModel();

            vm.Settings = SettingService.GetSettings();
            return(View(vm));
        }
        public async Task <IActionResult> Index(SettingIndexViewModel model)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }

            if (model.LogoFormFile != null)
            {
                model.Logo = await _fileProvider.UploadFileAsync("", model.LogoFormFile);
            }

            if (model.FaviconFormFile != null)
            {
                model.Favicon = await _fileProvider.UploadFileAsync("", model.FaviconFormFile);
            }

            await _appSettingsService.SaveAppSettingsAsync(_mapper.Map <AppSettings>(model));

            _notificationService.SuccessNotification("Ayarlar güncelleştirildi.");

            return(View(model));
        }
        public ActionResult Index()
        {
            var model = new SettingIndexViewModel().BuildSettings();

            return(AreaView("setting/index.cshtml", model));
        }