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


C# DCFactory.SetUnCommit方法代码示例

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


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

示例1: LiteClientSearch

        public static IEnumerable<BriefClientInfo> LiteClientSearch(
          string clientName,
          string mainPhone,
          ClientSearchMatching matching, string isAutoOrder, string isChecked, string TradingVolume, string RegDateMin, string RegDateMax, string ManagerID)
        {
            var signs = new string[3] { ">=", "=", "=" };

            using (var dc = new DCFactory<StoreDataContext>(false))
            {
                dc.SetUnCommit();
                IEnumerable<BriefClientInfo> rezSearch;

                dc.DataContext.Log = new DebugTextWriter(); //включить логгер

                rezSearch = dc.DataContext.ExecuteQuery<BriefClientInfo>(@"select a.AcctgID as ClientID, a.ManagerId , a.ClientName, a.ContactPhone as MainPhone, isChecked, TradingVolume, ISNULL(b.isAutoOrder, 0) as isAutoOrder, a.CreationTime as CreationTime  from dbo.users a LEFT JOIN dbo.UserSettings b  ON a.UserID = b.UserID LEFT JOIN dbo.orders c ON a.AcctgId = c.ClientId LEFT JOIN dbo.OrderLines d ON c.OrderId = d.OrderId WHERE clientname like '%" + clientName + "%' and a.ContactPhone like '%" + mainPhone + "%' and d.InternalFranchName = '" + SiteContext.Current.InternalFranchName + @"' and
                    ISNULL(b.isAutoOrder, 0) " + signs[int.Parse(isAutoOrder)] + (int.Parse(isAutoOrder) - 1) + " and CAST(a.isChecked as int) " + signs[int.Parse(isChecked)+1] + " {0} and a.TradingVolume " + signs[int.Parse(TradingVolume)] + " {1} AND UserRole = 0 " + RegDateMin + RegDateMax + ManagerID, isChecked, (int.Parse(TradingVolume) - 1));

                return rezSearch.ToList();
            }
        }
开发者ID:dmziryanov,项目名称:ApecAuto,代码行数:20,代码来源:ClientSearch.cs


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