示例#1
0
        private string GetColumnType(string typeNum)
        {
            string result = typeNum;

            if (File.Exists(this.datatypefile))
            {
                result = DatatypeMap.GetValueFromCfg(this.datatypefile, "AccessTypeMap", typeNum);
            }
            return(result);
        }
示例#2
0
        public static bool isValueType(string cstype)
        {
            bool result = false;

            if (File.Exists(CodeCommon.datatypefile))
            {
                string valueFromCfg = DatatypeMap.GetValueFromCfg(CodeCommon.datatypefile, "ValueType", cstype.Trim());
                if (valueFromCfg == "true" || valueFromCfg == "是")
                {
                    result = true;
                }
            }
            return(result);
        }
示例#3
0
        public static bool IsAddMark(string columnType)
        {
            bool result = false;

            if (File.Exists(CodeCommon.datatypefile))
            {
                string valueFromCfg = DatatypeMap.GetValueFromCfg(CodeCommon.datatypefile, "AddMark", columnType.ToLower().Trim());
                if (valueFromCfg == "true" || valueFromCfg == "是")
                {
                    result = true;
                }
            }
            return(result);
        }
示例#4
0
        public static string preParameter(string DbType)
        {
            string result = "@";

            if (File.Exists(CodeCommon.datatypefile))
            {
                string valueFromCfg = DatatypeMap.GetValueFromCfg(CodeCommon.datatypefile, "ParamePrefix", DbType.ToUpper().Trim());
                if (valueFromCfg == "")
                {
                    result = DbType.ToUpper().Trim();
                }
                else
                {
                    result = valueFromCfg;
                }
            }
            return(result);
        }
示例#5
0
        private static string CSToProcTypeSQLite(string cstype)
        {
            string result = cstype;

            if (File.Exists(CodeCommon.datatypefile))
            {
                string valueFromCfg = DatatypeMap.GetValueFromCfg(CodeCommon.datatypefile, "SQLiteType", cstype.ToLower().Trim());
                if (valueFromCfg == "")
                {
                    result = cstype.ToLower().Trim();
                }
                else
                {
                    result = valueFromCfg;
                }
            }
            return(result);
        }
示例#6
0
        public static string DbTypeToCS(string dbtype)
        {
            string result = "string";

            if (File.Exists(CodeCommon.datatypefile))
            {
                string valueFromCfg = DatatypeMap.GetValueFromCfg(CodeCommon.datatypefile, "DbToCS", dbtype.ToLower().Trim());
                if (valueFromCfg == "")
                {
                    result = dbtype.ToLower().Trim();
                }
                else
                {
                    result = valueFromCfg;
                }
            }
            return(result);
        }