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))); }
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)); }
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)); }
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))); }