This commit is contained in:
@@ -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 });
|
||||
|
||||
Reference in New Issue
Block a user