<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12
      代碼
      <%@ CodeTemplate Language="C#" Inherits="CodeSmith.BaseTemplates.SqlCodeTemplate" TargetLanguage="T-SQL" Description="編輯用的存儲過程,包括添加、修改和刪除"  Debug="False" ResponseEncoding="UTF-8"%>
      <%@ Assembly Name="SchemaExplorer" %>
      <%@ Assembly Name="CodeSmith.BaseTemplates" %>
      <%@ Assembly Name="System.Data" %>
      <%@ Import Namespace="SchemaExplorer" %>
      <%@ Import Namespace="System.Data" %>

      <%@ Property Name="SourceTable" Type="SchemaExplorer.TableSchema" Category="數據" Description="要進行操作的表" %>
      <%@ Property Name="IncludeDrop" Type="System.Boolean" Default="False" Category="選項" Description="是否需要先Drop掉以前的存儲過程" %>
      <%@ Property Name="IncludeInsert" Type="System.Boolean" Default="True" Category="選項" Description="插入數據" %>
      <%@ Property Name="IncludeUpdate" Type="System.Boolean" Default="True" Category="選項" Description="更新數據" %>

      <% 
      if(false)
      {
      %>
          
      <% for (int i = 0; i < SourceTable.Columns.Count; i++) { %>
              
      <%= GetSqlParameterStatement(SourceTable.Columns[i]) %> <% if ((i < SourceTable.Columns.Count - 1)) { %>,<% } %>  <% if(SourceTable.Columns[i].Description.Length > 0) { %>--<%= SourceTable.Columns[i].Description %><% } %>
          
      <%
          }
          
      %>
          
          Update 
      <%= GetTableOwner() %>[<%= SourceTable.Name %>] Set
          
      <% for (int i = 0; i < SourceTable.Columns.Count; i++) { %>
              [
      <%= SourceTable.Columns[i].Name %>= @<%= SourceTable.Columns[i].Name %> <% if (i < SourceTable.Columns.Count - 1) { %>,<% } %> <% if(SourceTable.Columns[i].Description.Length > 0) { %>--<%= SourceTable.Columns[i].Description %><% } %>
          
      <% } %>
          
          Insert Into 
      <%= GetTableOwner() %>[<%= SourceTable.Name %>
              (
          
      <% for (int i = 0; i < SourceTable.Columns.Count; i++) { %>
                  [
      <%= SourceTable.Columns[i].Name %>]<% if (i < SourceTable.Columns.Count - 1) { %>,<% } %> <% if(SourceTable.Columns[i].Description.Length > 0) { %>--<%= SourceTable.Columns[i].Description %><% } %>
          
      <% } %>
              ) 
              Values 
              (
          
      <% for (int i = 0; i < SourceTable.Columns.Count; i++) { %>
                  @
      <%= SourceTable.Columns[i].Name %><% if (i < SourceTable.Columns.Count - 1) { %>,<% } %> <% if(SourceTable.Columns[i].Description.Length > 0) { %>--<%= SourceTable.Columns[i].Description %><% } %>
          
      <% } %>
              )
      <%    
          
      return;

      %>
          
      <% if (SourceTable.PrimaryKeys == nullthrow new ApplicationException("該表缺少主鍵。"); %>

      <% if (IncludeDrop) { %>
          
      <% if (IncludeInsert) { %>
      /****** Object:  Stored Procedure <%= GetTableOwner() %><%= SourceTable.Name %>_Insert    Script Date:  ******/
      if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[<%= SourceTable.Name %>_Insert]') and OBJECTPROPERTY(id, N'IsProcedure'= 1)
      drop procedure 
      <%= GetTableOwner() %>[<%= SourceTable.Name %>_Insert]
      GO

          
      <% } %>
          
          
      <% if (IncludeUpdate) { %>
      /****** Object:  Stored Procedure <%= GetTableOwner() %><%= SourceTable.Name %>_Update    Script Date:  ******/
      if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[<%= SourceTable.Name %>_Update]') and OBJECTPROPERTY(id, N'IsProcedure'= 1)
      drop procedure 
      <%= GetTableOwner() %>[<%= SourceTable.Name %>_Update]
      GO

          
      <% } %>
          
      <%}%>


      <% if (IncludeInsert) { %>
      /*
      ******************************************************************************************
        過程名稱:<%= SourceTable.Name %>_Insert
        設計時間:<%= System.DateTime.Now.ToString("yyyy年MM月dd日 hh:mm:ss") %>
      ******************************************************************************************

      <% if (SourceTable.PrimaryKey.MemberColumns.Count == 1 && (SourceTable.PrimaryKey.MemberColumns[0].DataType == DbType.Guid || SourceTable.PrimaryKey.MemberColumns[0].DataType == DbType.Int16 || SourceTable.PrimaryKey.MemberColumns[0].DataType == DbType.Int32 || SourceTable.PrimaryKey.MemberColumns[0].DataType == DbType.Int64)) {
          ColumnSchema primaryKey = SourceTable.PrimaryKey.MemberColumns[0];
      %>
      Create Procedure <%= GetTableOwner() %>[<%= SourceTable.Name %>_Insert]
          <%= GetSqlParameterStatement(primaryKey, true) %>,
          <% for (int i = 0; i < SourceTable.NonPrimaryKeyColumns.Count; i++) { %>
          <%= GetSqlParameterStatement(SourceTable.NonPrimaryKeyColumns[i]) %><%if (i < SourceTable.NonPrimaryKeyColumns.Count - 1){%>,<%}%>        <% if(SourceTable.NonPrimaryKeyColumns[i].Description.Length > 0) { %>--<%= SourceTable.NonPrimaryKeyColumns[i].Description %><% } %>
          <% } %>
      AS
          <% if (primaryKey.DataType == DbType.Guid) { %>
          Set @<%= primaryKey.Name %> = NEWID()
          <% } %>
          Insert Into <%= GetTableOwner() %>[<%= SourceTable.Name %>] 
              (
          <% if (primaryKey.DataType == DbType.Guid) { %>
                  [<%= primaryKey.Name %>],
          <% } %>
          <% for (int i = 0; i < SourceTable.NonPrimaryKeyColumns.Count; i++) { %>
                  [<%= SourceTable.NonPrimaryKeyColumns[i].Name %>]<% if (i < SourceTable.NonPrimaryKeyColumns.Count - 1) { %>,<% } %>
          <% } %>
              ) 
              Values 
              (
          <% if (primaryKey.DataType == DbType.Guid) { %>
                  @<%= primaryKey.Name %>,
          <% } %>
          <% for (int i = 0; i < SourceTable.NonPrimaryKeyColumns.Count; i++) { %>
                  @<%= SourceTable.NonPrimaryKeyColumns[i].Name %><% if (i < SourceTable.NonPrimaryKeyColumns.Count - 1) { %>,<% } %>
          <% } %>
              )
          <% if (primaryKey.DataType == DbType.Int16 || primaryKey.DataType == DbType.Int32 || primaryKey.DataType == DbType.Int64) { %>
          Set @<%= primaryKey.Name %> = @@IDENTITY
          <% } %>
          Return @@IDENTITY
      <% } else { %>
      Create Procedure <%= GetTableOwner() %>[Insert_<%= SourceTable.Name %>]
          <% for (int i = 0; i < SourceTable.Columns.Count; i++) { %>
          <%= GetSqlParameterStatement(SourceTable.Columns[i]) %><% if (i < SourceTable.Columns.Count - 1) { %>,<% } %>
          <% } %>
      AS
          Insert Into <%= GetTableOwner() %>[<%= SourceTable.Name %>] 
              (
          <% for (int i = 0; i < SourceTable.Columns.Count; i++) { %>
                  [<%= SourceTable.Columns[i].Name %>]<% if (i < SourceTable.Columns.Count - 1) { %>,<% } %>
          <% } %>
              ) 
              Values 
              (
          <% for (int i = 0; i < SourceTable.Columns.Count; i++) { %>
                  @<%= SourceTable.Columns[i].Name %><% if (i < SourceTable.Columns.Count - 1) { %>,<% } %>
          <% } %>
              )
          Return @@IDENTITY
      <% } %>
      GO
      <% } %>

      <% if (IncludeUpdate) { %>
      /*
      ******************************************************************************************
        過程名稱:<%= SourceTable.Name %>_Update
        設計時間:<%= System.DateTime.Now.ToString("yyyy年MM月dd日 hh:mm:ss") %>
      ******************************************************************************************
      Create Procedure <%= GetTableOwner() %>[<%= SourceTable.Name %>_Update]
          <% for (int i = 0; i < SourceTable.Columns.Count; i++) { %>
          <%= GetSqlParameterStatement(SourceTable.Columns[i]) %><% if (i < SourceTable.Columns.Count - 1) { %>,<% } %> <% if (SourceTable.Columns[i].Description.Length > 0) { %>-- <%= SourceTable.Columns[i].Description %><% } %>
          <% } %>
      AS
          Update <%= GetTableOwner() %>[<%= SourceTable.Name %>] Set
          <% for (int i = 0; i < SourceTable.NonPrimaryKeyColumns.Count; i++) { %>
              [<%= SourceTable.NonPrimaryKeyColumns[i].Name %>] = @<%= SourceTable.NonPrimaryKeyColumns[i].Name %><% if (i < SourceTable.NonPrimaryKeyColumns.Count - 1) { %>,<% } %>
          <% } %>
          Where
          <% for (int i = 0; i < SourceTable.PrimaryKey.MemberColumns.Count; i++) { %>
              <% if (i > 0) { %> AND <% } %>[<%= SourceTable.PrimaryKey.MemberColumns[i].Name %>] = @<%= SourceTable.PrimaryKey.MemberColumns[i].Name %>
          <% } %>
          Return @@ROWCOUNT
      GO
      <% } %>

      <script runat="template">
      // My methods here.

      public string GetTableOwner()
      {
          return GetTableOwner(true);
      }

      public string GetTableOwner(bool includeDot)
      {
          if (SourceTable.Owner.Length > 0)
          {
              return "[" + SourceTable.Owner + "].";
          }
          else
          {
              return "";
          }
      }
      </script>

       

      posted on 2009-12-09 13:26  kuibono  閱讀(308)  評論(0)    收藏  舉報

      愛造人 | 快播影視
      主站蜘蛛池模板: 欧美成人aaa片一区国产精品| 欧美性群另类交| 少妇私密会所按摩到高潮呻吟| 国产精品久久久久鬼色| 日本熟妇hdsex视频| 国产精品一区二区久久毛片| 国产欧美日韩免费看AⅤ视频| 成年午夜免费韩国做受视频| 无码少妇一区二区三区免费| 国产原创自拍三级在线观看| 亚洲一区二区中文字幕| 亚洲一区二区精品另类| 国产欧美日韩亚洲一区二区三区| 国产精品午夜福利91| 国产综合色在线精品| 毛多水多高潮高清视频| 亚洲国产成人av国产自| 97人妻天天摸天天爽天天| 99精品国产在热久久无| 亚洲鸥美日韩精品久久| 国产成人亚洲日韩欧美| 成人无号精品一区二区三区| 玉溪市| 久久精品女人的天堂av| 国产精品美女一区二三区| 日韩精品无码人妻一区二区三区| 日韩精品福利一区二区三区| 国产成人高清精品亚洲| 人妻日韩人妻中文字幕| 国产在线精品中文字幕| 奇米网777狠狠狠俺| 中国极品少妇videossexhd| 亚洲日韩国产中文其他| 高清中文字幕国产精品| 久久精品A一国产成人免费网站| 我国产码在线观看av哈哈哈网站| 99riav精品免费视频观看| 亚洲欧美国产日韩天堂区| 久久亚洲精品11p| 国产一区二区三区在线观看免费 | 亚洲熟妇久久精品|