This commit is contained in:
@@ -1,8 +1,10 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using AyaNova.Biz;
|
using AyaNova.Biz;
|
||||||
|
using AyaNova.Models;
|
||||||
|
|
||||||
namespace AyaNova.DataList
|
namespace AyaNova.DataList
|
||||||
{
|
{
|
||||||
internal class PartInventoryDataList : AyaDataList
|
internal class PartInventoryDataList : AyaDataList, IAyaDataListServerCriteria
|
||||||
{
|
{
|
||||||
public PartInventoryDataList()
|
public PartInventoryDataList()
|
||||||
{
|
{
|
||||||
@@ -112,7 +114,38 @@ namespace AyaNova.DataList
|
|||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
//"clientCriteria":"p:102074,w:*"
|
||||||
|
public List<DataListFilterOption> DataListServerCriteria(long currentUserId, AuthorizationRoles userRoles, DataListBase dataListBase)
|
||||||
|
{
|
||||||
|
List<DataListFilterOption> ret = new List<DataListFilterOption>();
|
||||||
|
//ClientCriteria MUST be CustomerId
|
||||||
|
if (string.IsNullOrWhiteSpace(dataListBase.ClientCriteria))
|
||||||
|
throw new System.ArgumentNullException("CustomerNoteDataList - ClientCriteria is empty, should be Customer ID");
|
||||||
|
|
||||||
|
DataListFilterOption FilterOption = new DataListFilterOption() { Column = "metacustomer" };
|
||||||
|
FilterOption.Items.Add(new DataListColumnFilter() { value = dataListBase.ClientCriteria, op = DataListFilterComparisonOperator.Equality });
|
||||||
|
|
||||||
|
ret.Add(FilterOption);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
metaFilter.push({
|
||||||
|
// fld: "PartPartNumber",
|
||||||
|
// filter: {
|
||||||
|
// items: [{ op: "=", value: vm.$route.params.filter.PartPartNumber }]
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if (vm.$route.params.filter.PartWarehouseName != null) {
|
||||||
|
// metaFilter.push({
|
||||||
|
// fld: "PartWarehouseName",
|
||||||
|
// filter: {
|
||||||
|
// items: [
|
||||||
|
// { op: "=", value: vm.$route.params.filter.PartWarehouseName }
|
||||||
|
// ]
|
||||||
|
*/
|
||||||
|
|
||||||
}//eoc
|
}//eoc
|
||||||
}//eons
|
}//eons
|
||||||
@@ -74,7 +74,7 @@ namespace AyaNova.Biz
|
|||||||
//
|
//
|
||||||
internal async Task<CustomerNote> PutAsync(CustomerNote putObject)
|
internal async Task<CustomerNote> PutAsync(CustomerNote putObject)
|
||||||
{
|
{
|
||||||
CustomerNote dbObject = await ct.CustomerNote.SingleOrDefaultAsync(m => m.Id == putObject.Id);
|
CustomerNote dbObject = await GetAsync(putObject.Id,false);
|
||||||
if (dbObject == null)
|
if (dbObject == null)
|
||||||
{
|
{
|
||||||
AddError(ApiErrorCode.NOT_FOUND, "id");
|
AddError(ApiErrorCode.NOT_FOUND, "id");
|
||||||
|
|||||||
Reference in New Issue
Block a user