예제 #1
0
 public ActionResult Edit(SettingViewModel viewModel)
 {
     string errorMessage = _settingsService.EditSetting(viewModel);
     if (string.IsNullOrEmpty(errorMessage))
         return RedirectToActionPermanent("Index");
     ViewBag.ErrorMessage = errorMessage;
     return View(viewModel);
 }
예제 #2
0
 public string EditSetting(SettingViewModel setting)
 {
     Setting entity = _settingMappingService.ToEntity(setting);
     string errorMessage = _settingRepository.Edit(entity);
     return errorMessage;
 }
예제 #3
0
 public Setting ToEntity(SettingViewModel viewModel)
 {
     return Mapper.Map<SettingViewModel, Setting>(viewModel);
 }
예제 #4
0
 public ActionResult Create()
 {
     var list = new SettingViewModel();
     return View(list);
 }