zoukankan      html  css  js  c++  java
  • 公司框架DAO模板

    <%@ CodeTemplate Language="C#" TargetLanguage="T-SQL" Debug="true" CompilerVersion="v3.5" Description="" %>
    <%@ Assembly Name="SchemaExplorer" %>
    <%@ Property Name="SourceTable" Type="SchemaExplorer.TableSchema" Optional="False" Category="Required" %>
    <%@ Property Name="NameSpace" Optional="False" Type="System.String" Default="Beyondbit.App.Entity" Category="Style" Description="Object Namespace." %>
    //----------------------------------------------------------------
    // Copyright (C) 2012 上海互联网软件有限公司
    // 版权所有.
    // All rights reserved.
    //
    // 文件名: DAO<%= SourceTable %>.cs
    // 文件功能描述:
    //
    // 创建标识: <%= DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss") %>
    //
    // 修改标识:
    // 修改描述:
    //----------------------------------------------------------------
    using System;
    using System.Collections.Generic;
    using System.Text;
    using Beyondbit.Framework.DataAccess.ObjectDAO;
    using Beyondbit.DocumentSpare.Entity;
    using System.Data;
    using Beyondbit.Core.Common.Tools;

    namespace Beyondbit.DocumentSpare.DAO
    <%--
    SourceTable.Columns[i].ExtendedProperties[]
    ==CS_IsRowGuidCol
    ==CS_IsIdentity
    ==CS_IsComputed
    ==CS_IsDeterministic
    ==CS_IdentitySeed
    ==CS_IdentityIncrement
    ==CS_Default
    ==CS_ComputedDefinition
    ==CS_Collation
    ==CS_ObjectID
    ==CS_SystemType
    ==CS_UserType
    ==MS_Description
    ==CS_Description
    --%>

    namespace <%=NameSpace%> {

    public class DAO<%=SourceTable.Name%> : ObjectDAO<<%=SourceTable.Name%>> {
    public SplitPageResult<<%=SourceTable.Name%>> Query<%=SourceTable.Name%>Info(PageSearch pSearch,string Condition)
    {
    string strSql = "Select * From <%=SourceTable.Name%> Where 1=1 ";

    if (Condition != null && Condition != "")
    {
    strSql += Condition;
    }

    if (pSearch.SortFields == string.Empty)
    pSearch.SortFields = "CreateTime";


    return base.QuerySplitPage(strSql, "*", pSearch.SortFields, pSearch.PageSize,
    pSearch.PageIndex, null);
    }
    }
    }

  • 相关阅读:
    2017面试记录
    Bzoj1079:[SCOI2008]着色方案
    Bzoj1046: [HAOI2007]上升序列
    Luogu1121:环状最大两段子段和
    BZOJ 4698: [SDOI2008]Sandy的卡片
    [SPOJ]DISUBSTR:Distinct Substrings&[SPOJ]SUBST1:New Distinct Substrings
    HiHocoder1419 : 后缀数组四·重复旋律4&[SPOJ]REPEATS:Repeats
    Bzoj2946:[POI2000] 最长公共子串
    HiHocoder1415 : 后缀数组三·重复旋律3 & Poj2774:Long Long Message
    POJ3261:Milk Patterns
  • 原文地址:https://www.cnblogs.com/yuanxiaoping_21cn_com/p/2803935.html
Copyright © 2011-2022 走看看