This commit is contained in:
2021-01-28 18:36:51 +00:00
parent 0b631228b9
commit 32b3e89b91
4 changed files with 8 additions and 7 deletions

View File

@@ -135,7 +135,8 @@ namespace AyaNova.DataList
List<DataListFilterOption> ret = new List<DataListFilterOption>();
//ClientCriteria is optional for this list
//Format for this list is "PARTID,WAREHOUSEID" where the id is 0 if not filtered or the id to filter
//Format for this list is "PARTID,WAREHOUSENAME" where the id is 0 if not filtered or the id to filter
//and bizarrely the warehousename is text or empty if not filtered
var crit = (dataListBase.ClientCriteria ?? "").Split(',').Select(z => z.Trim()).ToArray();
if (crit.Length > 1)
{
@@ -148,7 +149,7 @@ namespace AyaNova.DataList
}
//Warehouse criteria
if (crit[1] != "0")
if (!string.IsNullOrWhiteSpace(crit[1]))
{
DataListFilterOption FilterOption = new DataListFilterOption() { Column = "PartWarehouseName" };
FilterOption.Items.Add(new DataListColumnFilter() { value = crit[1], op = DataListFilterComparisonOperator.Equality });