• 大小: 56.53MB
    文件类型: .zip
    金币: 2
    下载: 1 次
    发布日期: 2023-05-05
  • 语言: 其他
  • 标签: Egret  源码  三公  

资源简介

Egret三公前后端源码与素材 初学者学习用的 可以二次开发

资源截图

代码片段和文件信息

using System;
using System.Text;
using CodeSmith.Engine;
using SchemaExplorer;
using System.ComponentModel;
using System.Data;
namespace Common.Data
{
    //// 
    /// CodeSmith生成SQL Server视图的实体类脚本
    /// 

    public class ViewUtility
    {
        //get Columns info by TableName
        public ViewColumnSchemaCollection GetColumnCollectionByTable(ViewSchema table)
        {
            ViewColumnSchemaCollection columns = new ViewColumnSchemaCollection(table.Columns);
            return columns;
        }
        //Get camelcase namesuch as Customer
        public string GetCamelCaseName(string str)
        {
            return str.Substring(0 1).ToUpper() + str.Substring(1);
        }
        //Get userprivate const String USER_FIELD = “User“
        public string GetMemberConstantDeclarationStatement(ColumnSchema column)
        {
            return GetMemberConstantDeclarationStatement(“public const String “ column);
        }
        //such as public const String USER_TABLE = “User“
        public string GetTableConstantDeclarationStatement(ViewSchema table)
        {
            return GetMemberConstantDeclarationStatement(“public const String “ table);
        }
        //suck as USER_TABLE
        public string GetUpperStatement(ViewSchema table)
        {
            return table.Name.ToUpper() + “_TABLE“;
        }
        //suck as USER_FIELD
        public string GetUpperStatement(ColumnSchema column)
        {
            return column.Name.ToUpper() + “_FIELD“;
        }
        // such as USER_TABLE = “User“
        public string GetMemberConstantDeclarationStatement(string protectionLevel ViewSchema table)
        {
            return protectionLevel + GetUpperStatement(table) + “ = “ + GetCamelCaseName(table.Name) + ““;
        }
        //such as USERID_FIELD = “Userid“
        public string GetMemberConstantDeclarationStatement(string protectionLevel ColumnSchema column)
        {
            return protectionLevel + GetUpperStatement(column) + “ = “ + GetCamelCaseName(column.Name) + ““;
        }
        public string GetCSharpVariableType(ViewColumnSchema column)
        {
            switch (column.DataType)
            {
                case DbType.AnsiString: return “string“;
                case DbType.AnsiStringFixedLength: return “string“;
                case DbType.Binary: return “byte[]“;
                case DbType.Boolean: return “bool“;
                case DbType.Byte: return “int“;
                case DbType.Currency: return “decimal“;
                case DbType.Date: return “DataTime“;
                case DbType.DateTime: return “DateTime“;
                case DbType.Decimal: return “decimal“;
                case DbType.Double: return “double“;
                case DbType.Guid: return “Guid“;
                case DbType.Int16: return “short“;
                case DbType.Int32: return “int“;
                

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2019-10-21 23:08  Egert_SanGong\
     目录           0  2019-08-26 23:31  Egert_SanGong\Egert_SanGong\
     目录           0  2019-08-26 23:31  Egert_SanGong\Egert_SanGong\.idea\
     文件         469  2019-08-26 23:31  Egert_SanGong\Egert_SanGong\.idea\Egert_SanGong.iml
     文件         179  2019-08-26 23:31  Egert_SanGong\Egert_SanGong\.idea\misc.xml
     文件         285  2019-08-26 23:31  Egert_SanGong\Egert_SanGong\.idea\modules.xml
     文件        2204  2019-09-19 23:19  Egert_SanGong\Egert_SanGong\.idea\workspace.xml
     目录           0  2018-11-22 23:22  Egert_SanGong\Egert_SanGong\.wing\
     文件         169  2018-11-22 16:52  Egert_SanGong\Egert_SanGong\.wing\exml.json
     文件         672  2018-11-22 23:22  Egert_SanGong\Egert_SanGong\.wing\launch.json
     文件          76  2018-11-18 23:06  Egert_SanGong\Egert_SanGong\.wing\settings.json
     文件         637  2018-11-22 23:22  Egert_SanGong\Egert_SanGong\.wing\tasks.json
     目录           0  2018-11-23 08:33  Egert_SanGong\Egert_SanGong\bin-debug\
     文件        2998  2018-11-23 08:33  Egert_SanGong\Egert_SanGong\bin-debug\AssetAdapter.js
     文件        1144  2018-11-23 08:33  Egert_SanGong\Egert_SanGong\bin-debug\AssetAdapter.js.map
     目录           0  2018-11-23 08:33  Egert_SanGong\Egert_SanGong\bin-debug\comClass\
     文件        1441  2018-11-23 08:33  Egert_SanGong\Egert_SanGong\bin-debug\comClass\AlertVerTsFromc.js
     文件         790  2018-11-23 08:33  Egert_SanGong\Egert_SanGong\bin-debug\comClass\AlertVerTsFromc.js.map
     文件         545  2018-11-23 08:33  Egert_SanGong\Egert_SanGong\bin-debug\comClass\base64.js
     文件         351  2018-11-23 08:33  Egert_SanGong\Egert_SanGong\bin-debug\comClass\base64.js.map
     文件         989  2018-11-23 08:33  Egert_SanGong\Egert_SanGong\bin-debug\comClass\ByteArrayReader.js
     文件         916  2018-11-23 08:33  Egert_SanGong\Egert_SanGong\bin-debug\comClass\ByteArrayReader.js.map
     文件        1039  2018-11-23 08:33  Egert_SanGong\Egert_SanGong\bin-debug\comClass\CookieOperation.js
     文件         540  2018-11-23 08:33  Egert_SanGong\Egert_SanGong\bin-debug\comClass\CookieOperation.js.map
     文件        1231  2018-11-23 08:33  Egert_SanGong\Egert_SanGong\bin-debug\comClass\Dictionary.js
     文件        1084  2018-11-23 08:33  Egert_SanGong\Egert_SanGong\bin-debug\comClass\Dictionary.js.map
     文件        1015  2018-11-23 08:33  Egert_SanGong\Egert_SanGong\bin-debug\comClass\Dl_hallplayerinfo.js
     文件         582  2018-11-23 08:33  Egert_SanGong\Egert_SanGong\bin-debug\comClass\Dl_hallplayerinfo.js.map
     文件         514  2018-11-23 08:33  Egert_SanGong\Egert_SanGong\bin-debug\comClass\GErrorInfo.js
     文件         324  2018-11-23 08:33  Egert_SanGong\Egert_SanGong\bin-debug\comClass\GErrorInfo.js.map
     文件         416  2018-11-23 08:33  Egert_SanGong\Egert_SanGong\bin-debug\comClass\GMessage.js
............此处省略1939个文件信息

评论

共有 条评论