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


C# YellowstonePathology.Add方法代码示例

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


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

示例1: AddAllSQLTables

        public static void AddAllSQLTables(YellowstonePathology.Business.Mongo.TransferCollection transferCollection)
        {
            SqlCommand cmd = new SqlCommand();
            cmd.CommandText = "SELECT Table_Name, Column_Name " +
                "FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE " +
                "WHERE OBJECTPROPERTY(OBJECT_ID(constraint_name), 'IsPrimaryKey') = 1 " +
                "AND table_name like 'tbl%'";
            cmd.CommandType = CommandType.Text;

            YellowstonePathology.Business.Mongo.Server server = new Business.Mongo.TestServer(Business.Mongo.TestServer.SQLTransferDatabasename);

            using (SqlConnection cn = new SqlConnection(YellowstonePathology.Business.Properties.Settings.Default.CurrentConnectionString))
            {
                cn.Open();
                cmd.Connection = cn;
                using (SqlDataReader dr = cmd.ExecuteReader())
                {
                    while (dr.Read())
                    {
                        YellowstonePathology.Business.Mongo.Transfer transfer = new Transfer();
                        transfer.ObjectId = BsonObjectId.GenerateNewId().ToString();
                        transfer.TableName = dr.GetString(0);
                        transfer.PrimaryKeyName = dr.GetString(1);
                        transferCollection.Add(transfer);
                    }
                }
            }
        }
开发者ID:WilliamCopland,项目名称:YPILIS,代码行数:28,代码来源:Gateway.cs

示例2: BuildClientOrderCollection

        public static void BuildClientOrderCollection(SqlDataReader dr, YellowstonePathology.Business.ClientOrder.Model.ClientOrderCollection clientOrderCollection)
        {
            int clientOrderIdCount = 0;
            while (dr.Read())
            {
                if (dr["ClientOrderIdCount"] != DBNull.Value)
                {
                    clientOrderIdCount = Convert.ToInt32(dr["ClientOrderIdCount"].ToString());
                }
            }

            for (int i = 0; i < clientOrderIdCount; i++)
            {
                dr.NextResult();
                YellowstonePathology.Business.ClientOrder.Model.ClientOrder clientOrder = BuildClientOrder(dr);
                dr.NextResult();
                BuildClientOrderDetailCollection(clientOrder.ClientOrderDetailCollection, dr);

                if (clientOrder.ClientOrderId != null)
                {
                    clientOrderCollection.Add(clientOrder);
                }
            }
        }
开发者ID:ericramses,项目名称:YPILIS,代码行数:24,代码来源:ClientOrderGateway.cs

示例3: BuildClientOrderDetailCollection

        public static void BuildClientOrderDetailCollection(YellowstonePathology.Business.ClientOrder.Model.ClientOrderDetailCollection clientOrderDetailCollection, SqlDataReader dr)
        {
            int clientOrderDetailCount = 0;
            while (dr.Read())
            {
                clientOrderDetailCount = Convert.ToInt32(dr["ClientOrderDetailCount"].ToString());
            }

            if (clientOrderDetailCount > 0)
            {
                for (int i = 0; i < clientOrderDetailCount; i++)
                {
                    dr.NextResult();

                    string orderTypeCode = null;
                    while (dr.Read())
                    {
                        orderTypeCode = dr["OrderTypeCode"].ToString();
                    }

                    dr.NextResult();

                    YellowstonePathology.Business.ClientOrder.Model.ClientOrderDetail clientOrderDetail = YellowstonePathology.Business.ClientOrder.Model.ClientOrderDetailFactory.GetClientOrderDetail(orderTypeCode, Persistence.PersistenceModeEnum.UpdateChangedProperties);
                    while (dr.Read())
                    {
                        YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter propertyWriter = new Persistence.SqlDataReaderPropertyWriter(clientOrderDetail, dr);
                        propertyWriter.WriteProperties();
                        clientOrderDetailCollection.Add(clientOrderDetail);
                    }
                }
            }
            else
            {
                dr.NextResult();
                dr.NextResult();
            }
        }
开发者ID:ericramses,项目名称:YPILIS,代码行数:37,代码来源:ClientOrderGateway.cs


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