Esempio n. 1
0
        public JsonResult AddSection(int pageId, int pageSectionTypeId, string componentStamp)
        {
            try
            {
                var pageAssociation = _sectionService.Add(pageId, pageSectionTypeId, componentStamp);

                return(Json(new { State = true, PageSectionId = pageAssociation.PageSection.PageSectionId, PageAssociationId = pageAssociation.PageAssociationId }));
            }
            catch (Exception)
            {
                return(Json(new { State = false }));
            }
        }
Esempio n. 2
0
        public JsonResult Add(int pageId, int pageSectionTypeId, string componentStamp)
        {
            try
            {
                var pageSectionId = _pageSectionService.Add(pageId, pageSectionTypeId, componentStamp);

                return(new JsonResult {
                    Data = pageSectionId
                });
            }
            catch (Exception ex)
            {
                return(Json(new { State = false, ex.InnerException.Message }));
            }
        }
Esempio n. 3
0
        public ActionResult Add(AddViewModel model)
        {
            _pageSectionService.Add(model.PageId, model.PageSectionTypeId);

            return(Redirect(HttpContext.Request.UrlReferrer.AbsoluteUri));
        }