当前位置: 首页>>代码示例>>C#>>正文


C# BriefItemInfo.Page_Sequence_By_FileName方法代码示例

本文整理汇总了C#中SobekCM.Core.BriefItem.BriefItemInfo.Page_Sequence_By_FileName方法的典型用法代码示例。如果您正苦于以下问题:C# BriefItemInfo.Page_Sequence_By_FileName方法的具体用法?C# BriefItemInfo.Page_Sequence_By_FileName怎么用?C# BriefItemInfo.Page_Sequence_By_FileName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SobekCM.Core.BriefItem.BriefItemInfo的用法示例。


在下文中一共展示了BriefItemInfo.Page_Sequence_By_FileName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Item_HtmlSubwriter


//.........这里部分代码省略.........
                            HttpContext.Current.Response.Redirect(HttpContext.Current.Items["Original_URL"].ToString(), false);
                            HttpContext.Current.ApplicationInstance.CompleteRequest();
                            RequestSpecificValues.Current_Mode.Request_Completed = true;
                            return;
                        }
                    }
                }

                // Handle any request from the internal header for the item
                if ((HttpContext.Current != null) && (HttpContext.Current.Request.Form["internal_header_action"] != null) && (RequestSpecificValues.Current_User != null))
                {
                    // Pull the action value
                    string internalHeaderAction = HttpContext.Current.Request.Form["internal_header_action"].Trim();

                    // Was this to save the item comments?
                    if (internalHeaderAction == "save_comments")
                    {
                        string new_comments = HttpContext.Current.Request.Form["intheader_internal_notes"].Trim();
                        if (SobekCM_Item_Database.Save_Item_Internal_Comments(currentItem.Web.ItemID, new_comments))
                            currentItem.Web.Internal_Comments = new_comments;
                    }
                }
            }

            // Set the code for bib level mets to show the volume tree by default
            if ((is_bib_level) && (String.IsNullOrEmpty(RequestSpecificValues.Current_Mode.ViewerCode)))
            {
                RequestSpecificValues.Current_Mode.ViewerCode = "allvolumes1";
            }

            // If there is a file name included, look for the sequence of that file
            if (!String.IsNullOrEmpty(RequestSpecificValues.Current_Mode.Page_By_FileName))
            {
                int page_sequence = currentItem.Page_Sequence_By_FileName(RequestSpecificValues.Current_Mode.Page_By_FileName);
                if (page_sequence > 0)
                {
                    RequestSpecificValues.Current_Mode.ViewerCode = page_sequence.ToString();
                    RequestSpecificValues.Current_Mode.Page = (ushort)page_sequence;
                }
            }

            // Get the valid viewer code
            RequestSpecificValues.Tracer.Add_Trace("Item_HtmlSubwriter.Add_Controls", "Getting the appropriate item viewer");
            prototyper = ItemViewer_Factory.Get_Item_Viewer(currentItem, RequestSpecificValues.Current_Mode.ViewerCode);
            if (( prototyper != null ) && ( prototyper.Has_Access(currentItem, RequestSpecificValues.Current_User, !String.IsNullOrEmpty(restriction_message))))
                pageViewer = prototyper.Create_Viewer(currentItem, RequestSpecificValues.Current_User, RequestSpecificValues.Current_Mode, RequestSpecificValues.Tracer );
            else
            {
                // Since the user did not have access to THAT viewer, try to find one that he does have access to
                if (currentItem.UI.Viewers_By_Priority != null)
                {
                    foreach (string viewerType in currentItem.UI.Viewers_By_Priority)
                    {
                        prototyper = ItemViewer_Factory.Get_Viewer_By_ViewType(viewerType);
                        if ((prototyper != null) && (prototyper.Has_Access(currentItem, RequestSpecificValues.Current_User, !String.IsNullOrEmpty(restriction_message))))
                        {
                            pageViewer = prototyper.Create_Viewer(currentItem, RequestSpecificValues.Current_User, RequestSpecificValues.Current_Mode, RequestSpecificValues.Tracer);
                            break;
                        }
                    }
                }

            }

            // If execution should end, do it now
            if (RequestSpecificValues.Current_Mode.Request_Completed)
开发者ID:MarkVSullivan,项目名称:SobekCM-Web-Application,代码行数:67,代码来源:Item_HtmlSubwriter.cs


注:本文中的SobekCM.Core.BriefItem.BriefItemInfo.Page_Sequence_By_FileName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。