Exemple #1
0
        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));
        }
Exemple #2
0
        public ActionResult OurMission(CellSettingViewModel cellSettingViewModel)
        {
            var cellsetting  = _cellSettingService.GetCellSettingsByCellId(9);
            var cellsettings = Mapper.Map <CellSetting, CellSettingViewModel>(cellsetting);

            return(View(cellsettings));
        }
Exemple #3
0
 public ActionResult HomeAd(CellSettingViewModel cellSettingViewModel)
 {
     cellSettingViewModel.ShowHideImage = true;
     return(View(cellSettingViewModel));
 }
Exemple #4
0
 public ActionResult LatestNews(CellSettingViewModel cellSettingViewModel)
 {
     cellSettingViewModel.ShowHideImage = true;
     return(View(cellSettingViewModel));
 }