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

@@ -46,8 +46,8 @@ Notes:
CustomerNoteDataList - ClientCriteria MUST be provided with CustomerId value
PartInventoryDataList - 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
PartInventoryTransactionsDataList - 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
PartInventoryDataList - ClientCriteria is optional, Format is "PARTID,WAREHOUSENAME" where the partid is 0 if not filtered or the id to filter and warehousename is the name or empty.
PartInventoryTransactionsDataList - ClientCriteria is optional, Format is "PARTID,WAREHOUSENAME" where the partid is 0 if not filtered or the id to filter and warehousename is the name or empty.
TODO: Replace this section with updated sort / filter and column selection

View File

@@ -2,7 +2,6 @@ using System.Collections.Generic;
using System.Linq;
using AyaNova.Biz;
using Newtonsoft.Json.Linq;
using AyaNova.Api.ControllerHelpers;
using Microsoft.Extensions.Logging;
using AyaNova.Models;
using System.Threading.Tasks;

View File

@@ -121,7 +121,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)
{
@@ -134,7 +135,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 });

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