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


C# GiftBatchTDS.Merge方法代码示例

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


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

示例1: SpeedTestLoadIntoTypedTable

        public void SpeedTestLoadIntoTypedTable()
        {
            TDBTransaction ReadTransaction = null;
            DateTime before = DateTime.Now;
            DateTime after = DateTime.Now;
            GiftBatchTDS ds = new GiftBatchTDS();

            DBAccess.GDBAccessObj.GetNewOrExistingAutoReadTransaction(
                IsolationLevel.ReadCommitted,
                TEnforceIsolationLevel.eilMinimum,
                ref ReadTransaction,
                delegate
                {
                    string sql = "SELECT PUB_a_gift_detail.*, false AS AlreadyMatched, PUB_a_gift_batch.a_batch_status_c AS BatchStatus " +
                                 "FROM PUB_a_gift_batch, PUB_a_gift_detail " +
                                 "WHERE PUB_a_gift_detail.a_ledger_number_i = PUB_a_gift_batch.a_ledger_number_i AND PUB_a_gift_detail.a_batch_number_i = PUB_a_gift_batch.a_batch_number_i";

                    before = DateTime.Now;
                    DataTable untyped = DBAccess.GDBAccessObj.SelectDT(sql, "test", ReadTransaction);
                    after = DateTime.Now;

                    TLogging.Log(String.Format("loading all {0} gift details into an untyped table took {1} milliseconds",
                            untyped.Rows.Count,
                            (after.Subtract(before)).TotalMilliseconds));

                    GiftBatchTDSAGiftDetailTable typed = new GiftBatchTDSAGiftDetailTable();
                    before = DateTime.Now;
                    DBAccess.GDBAccessObj.SelectDT(typed, sql, ReadTransaction, new OdbcParameter[0], 0, 0);
                    after = DateTime.Now;

                    TLogging.Log(String.Format("loading all {0} gift details into a typed table took {1} milliseconds",
                            typed.Rows.Count,
                            (after.Subtract(before)).TotalMilliseconds));

                    AMotivationDetailAccess.LoadAll(ds, ReadTransaction);

                    before = DateTime.Now;
                    DBAccess.GDBAccessObj.Select(ds, sql, ds.AGiftDetail.TableName, ReadTransaction);
                    after = DateTime.Now;
                });

            TLogging.Log(String.Format("loading all {0} gift details into a typed dataset took {1} milliseconds",
                    ds.AGiftDetail.Rows.Count,
                    (after.Subtract(before)).TotalMilliseconds));

            before = DateTime.Now;
            GiftBatchTDS ds2 = new GiftBatchTDS();
            ds2.Merge(ds.AGiftDetail);
            after = DateTime.Now;

            TLogging.Log(String.Format("merging typed table into other dataset took {0} milliseconds",
                    (after.Subtract(before)).TotalMilliseconds));
        }
开发者ID:js1987,项目名称:openpetragit,代码行数:53,代码来源:test.cs


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