public ActionResult OurSolutions(CellSettingViewModel cellSettingViewModel, string submit) { if (ModelState.IsValid) { if (cellSettingViewModel != null && submit == "Save") { cellSettingViewModel.DateCreated = DateTime.UtcNow; cellSettingViewModel.DateModified = DateTime.UtcNow; cellSettingViewModel.CellId = 1; cellSettingViewModel.Id = 12; var cellSetting = Mapper.Map <CellSettingViewModel, CellSetting>(cellSettingViewModel); _cellSettingService.Edit(cellSetting); AddMessage(this, "", "Record has Modified Successfully", MessageType.Success); return(RedirectToAction("Index", "Cell")); } if (cellSettingViewModel != null && submit == "SaveAndContinue") { cellSettingViewModel.DateCreated = DateTime.UtcNow; cellSettingViewModel.DateModified = DateTime.UtcNow; cellSettingViewModel.CellId = 1; cellSettingViewModel.Id = 12; var cellSetting = Mapper.Map <CellSettingViewModel, CellSetting>(cellSettingViewModel); _cellSettingService.Edit(cellSetting); AddMessage(this, "", "Record has Modified Successfully", MessageType.Success); ModelState.Clear(); return(View()); } } return(View(cellSettingViewModel)); }
public ActionResult OurMission(CellSettingViewModel cellSettingViewModel) { var cellsetting = _cellSettingService.GetCellSettingsByCellId(9); var cellsettings = Mapper.Map <CellSetting, CellSettingViewModel>(cellsetting); return(View(cellsettings)); }
public ActionResult HomeAd(CellSettingViewModel cellSettingViewModel) { cellSettingViewModel.ShowHideImage = true; return(View(cellSettingViewModel)); }
public ActionResult LatestNews(CellSettingViewModel cellSettingViewModel) { cellSettingViewModel.ShowHideImage = true; return(View(cellSettingViewModel)); }