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


C# LibraryChannel.GetIssues方法代码示例

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


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

示例1: OutputEntities

        public static int OutputEntities(
            Stop stop,
            LibraryChannel channel,
            string strBiblioRecPath,
            string strDbType,
            XmlTextWriter writer,
            out string strError)
        {
            strError = "";

            bool bBegin = false;

            long lPerCount = 100; // 每批获得多少个
            long lStart = 0;
            long lResultCount = 0;
            long lCount = -1;
            for (; ; )
            {
                if (stop != null && stop.State != 0)
                {
                    strError = "用户中断";
                    return -1;
                }

                EntityInfo[] entities = null;

                long lRet = 0;

                channel.Timeout = new TimeSpan(0, 5, 0);
                if (strDbType == "item")
                {
                    lRet = channel.GetEntities(
                         stop,
                         strBiblioRecPath,
                         lStart,
                         lCount,
                         "", // "onlygetpath",
                         "zh",
                         out entities,
                         out strError);
                }
                if (strDbType == "order")
                {
                    lRet = channel.GetOrders(
                         stop,
                         strBiblioRecPath,
                         lStart,
                         lCount,
                         "", // "onlygetpath",
                         "zh",
                         out entities,
                         out strError);
                }
                if (strDbType == "issue")
                {
                    lRet = channel.GetIssues(
                         stop,
                         strBiblioRecPath,
                         lStart,
                         lCount,
                         "", // "onlygetpath",
                         "zh",
                         out entities,
                         out strError);
                }
                if (strDbType == "comment")
                {
                    lRet = channel.GetComments(
                         stop,
                         strBiblioRecPath,
                         lStart,
                         lCount,
                         "", // "onlygetpath",
                         "zh",
                         out entities,
                         out strError);
                }
                if (lRet == -1)
                    return -1;

                lResultCount = lRet;

                if (lRet == 0)
                    return 0;

                Debug.Assert(entities != null, "");

                foreach (EntityInfo info in entities)
                {
                    if (info.ErrorCode != ErrorCodeValue.NoError)
                    {
                        strError = "路径为 '" + info.OldRecPath + "' 的册记录装载中发生错误: " + info.ErrorInfo;  // NewRecPath
                        return -1;
                    }

                    if (bBegin == false)
                    {
                        writer.WriteStartElement("dprms", strDbType + "Collection", DpNs.dprms);
                        bBegin = true;
                    }
//.........这里部分代码省略.........
开发者ID:renyh1013,项目名称:dp2,代码行数:101,代码来源:BiblioSearchForm.cs


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