/// <summary> /// Save Page Specific Placeholder /// </summary> /// <param name="tblPageSpecificPlaceholderConfigDto"></param> /// <returns></returns> public int SavePageSpecificPlaceholder(PageSpecificPlaceholderConfigVM PageSpecificPlaceholderConfigVM) { var pageSpecificPlaceholderConfigBLL = new PageSpecificPlaceholderConfigBLL(); Mapper.CreateMap<PageSpecificPlaceholderConfigVM, PageSpecificPlaceholderConfigBO>(); var pageSpecificPlaceholderConfigBO = new PageSpecificPlaceholderConfigBO(); pageSpecificPlaceholderConfigBO = Mapper.Map<PageSpecificPlaceholderConfigVM, PageSpecificPlaceholderConfigBO>(PageSpecificPlaceholderConfigVM); return pageSpecificPlaceholderConfigBLL.SavePageSpecificPlaceholder(pageSpecificPlaceholderConfigBO); }
/// <summary> /// Save Page Specific Placeholder /// </summary> /// <param name="postedfileName"></param> /// <param name="pageSpecificPlaceholder"></param> /// <param name="pageSpecificPlaceholderId"></param> /// <param name="moduleId"></param> /// <param name="topFrameHTML"></param> /// <param name="leftFrameHTML"></param> /// <param name="rightFrameHTML"></param> /// <param name="bottomFrameHTML"></param> /// <returns></returns> public JsonResult SavePageSpecificPlaceHolderConfig(string postedfileName , int pageSpecificPlaceholder , int pageSpecificPlaceholderId , int moduleId , string topFrameHTML , string leftFrameHTML , string rightFrameHTML , string bottomFrameHTML) { try { var pageSpecificPlaceholderConfigVM = new PageSpecificPlaceholderConfigVM(); pageSpecificPlaceholderConfigVM.Id = pageSpecificPlaceholderId; pageSpecificPlaceholderConfigVM.ModuleId = moduleId; pageSpecificPlaceholderConfigVM.TopFrameHTML = topFrameHTML; pageSpecificPlaceholderConfigVM.LeftFrameHTML = leftFrameHTML; pageSpecificPlaceholderConfigVM.RightFrameHTML = rightFrameHTML; pageSpecificPlaceholderConfigVM.BottomFrameHTML = bottomFrameHTML; pageSpecificPlaceholderConfigVM.IPAddressOfLastAction = CurrentFPApplicationContext.LoggedInUser.IPAddress; if (pageSpecificPlaceholderConfigVM.Id == 0) { pageSpecificPlaceholderConfigVM.CreatedOn = DateTime.Now; pageSpecificPlaceholderConfigVM.CreatedBy = CurrentFPApplicationContext.LoggedInUser.Username; } else { pageSpecificPlaceholderConfigVM.ModifiedOn = DateTime.Now; pageSpecificPlaceholderConfigVM.ModifiedBy = CurrentFPApplicationContext.LoggedInUser.Username; } switch ((SolutionEnums.PageSpecificPlaceholder)pageSpecificPlaceholder) { case SolutionEnums.PageSpecificPlaceholder.Top: pageSpecificPlaceholderConfigVM.TopFrameHTML = postedfileName; break; case SolutionEnums.PageSpecificPlaceholder.Left: pageSpecificPlaceholderConfigVM.LeftFrameHTML = postedfileName; break; case SolutionEnums.PageSpecificPlaceholder.Right: pageSpecificPlaceholderConfigVM.RightFrameHTML = postedfileName; break; case SolutionEnums.PageSpecificPlaceholder.Bottom: pageSpecificPlaceholderConfigVM.BottomFrameHTML = postedfileName; break; } int result = _FPConfigurationService.SavePageSpecificPlaceholder(pageSpecificPlaceholderConfigVM); return Json(new { PageSpecificPlaceholderId = result, TopFrameHTML = pageSpecificPlaceholderConfigVM.TopFrameHTML, LeftFrameHTML = pageSpecificPlaceholderConfigVM.LeftFrameHTML, RightFrameHTML = pageSpecificPlaceholderConfigVM.RightFrameHTML, BottomFrameHTML = pageSpecificPlaceholderConfigVM.BottomFrameHTML, pageSpecificPlaceholder = ((SolutionEnums.PageSpecificPlaceholder)pageSpecificPlaceholder).ToString() }); } catch (Exception ex) { return Json(new { PageSpecificPlaceholderId = -1, Message = ex.Message }); } }