This commit is contained in:
@@ -190,6 +190,13 @@ namespace AyaNova.DataList
|
||||
AyaField.ot = dr.GetInt32(ordinal);
|
||||
}
|
||||
|
||||
if (f.SqlColorColumnName != null)
|
||||
{
|
||||
var ordinal = SelectBuild.map[f.SqlColorColumnName];
|
||||
if (!await dr.IsDBNullAsync(ordinal))
|
||||
AyaField.clr = dr.GetInt32(ordinal);
|
||||
}
|
||||
|
||||
row.Add(AyaField);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,6 +90,20 @@ namespace AyaNova.DataList
|
||||
map.Add(ayaTypeColumnName, nOrdinal++);
|
||||
}
|
||||
}
|
||||
|
||||
//does it also have a Color column?
|
||||
var ayaColorColumnName = o.SqlColorColumnName;
|
||||
if (!string.IsNullOrWhiteSpace(ayaColorColumnName))
|
||||
{
|
||||
if (!map.ContainsKey(ayaColorColumnName))
|
||||
{
|
||||
if (firstColumnAdded)
|
||||
sb.Append(", ");
|
||||
sb.Append(ayaColorColumnName);
|
||||
firstColumnAdded = true;
|
||||
map.Add(ayaColorColumnName, nOrdinal++);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,6 +79,7 @@ namespace AyaNova.DataList
|
||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||
SqlIdColumnName = "areminder.id",
|
||||
SqlValueColumnName = "areminder.name",
|
||||
SqlColorColumnName = "areminder.color",
|
||||
IsRowId = true
|
||||
});
|
||||
|
||||
@@ -107,7 +108,7 @@ namespace AyaNova.DataList
|
||||
SqlValueColumnName = "areminder.stopdate"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
{
|
||||
TKey = "ReminderColor",
|
||||
FieldKey = "ReminderColor",
|
||||
|
||||
@@ -8,12 +8,14 @@ namespace AyaNova.Biz
|
||||
{
|
||||
public class AyaFieldData
|
||||
{
|
||||
public object v { get; set; }
|
||||
public object v { get; set; }//v for vvvvvvvv?
|
||||
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)] //https://www.newtonsoft.com/json/help/html/JsonPropertyPropertyLevelSetting.htm
|
||||
public long? i { get; set; }
|
||||
public long? i { get; set; }//id value
|
||||
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)] //https://www.newtonsoft.com/json/help/html/JsonPropertyPropertyLevelSetting.htm
|
||||
public bool? rid { get; set; }
|
||||
public bool? rid { get; set; } //row id for opening entire row by one field id
|
||||
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)] //https://www.newtonsoft.com/json/help/html/JsonPropertyPropertyLevelSetting.htm
|
||||
public int? ot { get; set; }
|
||||
public int? ot { get; set; }//openable type
|
||||
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)] //https://www.newtonsoft.com/json/help/html/JsonPropertyPropertyLevelSetting.htm
|
||||
public int? clr { get; set; }//color
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user