Example #1
0
 public static string GetColumnSqlValue(ViewColumnSchema column,
                                        SchemaExplorer.ExtendedPropertyCollection extendedProperties)
 {
     if (extendedProperties["enum"] != null)
     {
         string retEnum = GetEnumFromEp(extendedProperties["enum"].Value.ToString(), column.Name);
         if (retEnum != null)
         {
             return(string.Format("((long){0}).ToString()", GetFiledName(column)));
         }
     }
     return(string.Format("{0}.ToString()", GetFiledName(column)));
 }
Example #2
0
    public static string GetCType(ParameterSchema para,
                                  SchemaExplorer.ExtendedPropertyCollection extendedProperties)
    {
        if (extendedProperties["enum"] != null)
        {
            string retEnum = GetEnumFromEp(extendedProperties["enum"].Value.ToString(), para.Name);
            if (retEnum != null)
            {
                return(retEnum);
            }
        }

        return(GetCType(para.DataType, false));
    }
Example #3
0
    public static string GetCType(ViewColumnSchema column,
                                  SchemaExplorer.ExtendedPropertyCollection extendedProperties)
    {
        if (extendedProperties["enum"] != null)
        {
            string retEnum = GetEnumFromEp(extendedProperties["enum"].Value.ToString(), column.Name);
            if (retEnum != null)
            {
                return(column.AllowDBNull ? retEnum : retEnum);
            }
        }

        return(GetCType(column.DataType, column.AllowDBNull));
    }
Example #4
0
    public string GetPopulateType(ViewColumnSchema column,
                                  SchemaExplorer.ExtendedPropertyCollection viewExtendedProperties)
    {
        if (viewExtendedProperties["enum"] != null)
        {
            string ret = GetEnumFromEp(viewExtendedProperties["enum"].Value.ToString(), column.Name);
            if (ret != null)
            {
                ret = string.Format("({0})({1})", ret, GetCType(column.DataType, false));
                return(ret);
            }
        }

        return(string.Format("({0})", GetCType(column.DataType, false)));
    }