change picklist preselect from a single long to a array of long
This commit is contained in:
@@ -97,10 +97,11 @@ namespace AyaNova.PickList
|
|||||||
//if there is an override to see inactive too then we just don't set the filter on active
|
//if there is an override to see inactive too then we just don't set the filter on active
|
||||||
if (!IncludeInactive)
|
if (!IncludeInactive)
|
||||||
{
|
{
|
||||||
if (preId != 0)
|
if (preIds.Length>0)
|
||||||
{
|
{
|
||||||
//pre-selected need to always appear regardless of active status
|
//pre-selected need to always appear regardless of active status
|
||||||
ActiveWhereFragment = $"({rowIdColumn.SqlIdColumnName} = {preId}) or ({activeColumn.SqlValueColumnName} = true)";
|
//ActiveWhereFragment = $"({rowIdColumn.SqlIdColumnName} = {preId}) or ({activeColumn.SqlValueColumnName} = true)";
|
||||||
|
ActiveWhereFragment = $"({rowIdColumn.SqlIdColumnName} in ({string.Join(",", preIds)})) or ({activeColumn.SqlValueColumnName} = true)";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -241,7 +242,7 @@ namespace AyaNova.PickList
|
|||||||
|
|
||||||
//WHERE
|
//WHERE
|
||||||
//there is a condition where there is no where (inactive=true and no query of any kind)
|
//there is a condition where there is no where (inactive=true and no query of any kind)
|
||||||
if (preId > 0 || lWhere.Count > 0 || HasTagSpecificQuery || HasVariantWhereFragment || IncludeInactive == false)
|
if (preIds.Length > 0 || lWhere.Count > 0 || HasTagSpecificQuery || HasVariantWhereFragment || IncludeInactive == false)
|
||||||
{
|
{
|
||||||
sb.Append(" where ");
|
sb.Append(" where ");
|
||||||
|
|
||||||
@@ -262,7 +263,7 @@ namespace AyaNova.PickList
|
|||||||
sb.Append(" and ");
|
sb.Append(" and ");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (preId > 0)
|
if (preIds.Length > 0)
|
||||||
{
|
{
|
||||||
sb.Append(PredefinedOnlyWhereFragment);
|
sb.Append(PredefinedOnlyWhereFragment);
|
||||||
sb.Append(" and ");
|
sb.Append(" and ");
|
||||||
|
|||||||
Reference in New Issue
Block a user