コード例 #1
0
        public bool UpdatePost(ClassificationPageSectionUpdateGet ClassificationPageSection)
        {
            string usp = "usp_ClassificationPageSectionUpdatePost @ClassificationPageSectionId,  @ClassificationId, @Sequence, @PageSectionTypeId, @PageSectionDataTypeId, @ShowSectionTitleName, @ShowSectionTitleDescription, @ShowContentTypeTitleName, @ShowContentTypeTitleDescription, @OneTwoColumns, @ContentTypeId, @SortById, @MaxContent, @HasPaging, @LanguageId, @Name, @Description, @MenuName, @MouseOver, @TitleName, @TitleDescription, @ModifierId";

            _sqlDataAccess.SaveData <ClassificationPageSectionUpdateGet>(usp, ClassificationPageSection);
            return(true);
        }
コード例 #2
0
        public async Task <IActionResult> Update(int Id)
        {
            var CurrentUser = await _userManager.GetUserAsync(User);

            if (await _claimCheck.CheckClaim(CurrentUser, "ApplicationRight", this.ControllerContext.RouteData.Values["controller"].ToString() + "\\" + this.ControllerContext.RouteData.Values["action"].ToString()))
            {
                if (await _checkProvider.CheckIfRecordExists("ClassificationPages", "ClassificationPageID", Id) == 0)
                {
                    return(BadRequest(new
                    {
                        IsSuccess = false,
                        Message = "No record with this ID",
                    }));
                }
                var cps = new ClassificationPageSectionUpdateGet();
                cps = await _classificationPageSectionProvider.UpdateGet(CurrentUser.Id, Id);

                cps.ContentTypes = await _contentTypeProvider.List(CurrentUser.Id);

                cps.PageSectionTypes = await _pageSectionTypeProvider.List(CurrentUser.Id);

                cps.PageSectionDataTypes = await _pageSectionDataTypeProvider.List(CurrentUser.Id);

                cps.SortBys = await _masterListProvider.SortByList(CurrentUser.Id);

                cps.Sequences = await _classificationPageSectionProvider.SequenceListBySectionIdGet(CurrentUser.Id, Id);

                var intlist = new List <int>();
                intlist.Add(1);
                intlist.Add(2);

                cps.OneTwoColumnSource = intlist;

                return(Ok(cps));
            }
            return(BadRequest(new
            {
                IsSuccess = false,
                Message = "No rights",
            }));
        }