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 WorkOrderItemDataList : DataListProcessingBase
|
internal class WorkOrderItemDataList : DataListProcessingBase, IDataListInternalCriteria
|
||||||
{
|
{
|
||||||
public WorkOrderItemDataList()
|
public WorkOrderItemDataList()
|
||||||
{
|
{
|
||||||
@@ -132,7 +134,15 @@ namespace AyaNova.DataList
|
|||||||
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "WorkOrderItemCustom16", FieldKey = "workorderitemcustom16", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aworkorderitem.customfields", TKeySection = "WorkOrderItem" });
|
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "WorkOrderItemCustom16", FieldKey = "workorderitemcustom16", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aworkorderitem.customfields", TKeySection = "WorkOrderItem" });
|
||||||
|
|
||||||
|
|
||||||
|
//META column
|
||||||
|
FieldDefinitions.Add(new DataListFieldDefinition
|
||||||
|
{
|
||||||
|
FieldKey = "metawoitemid",
|
||||||
|
UiFieldDataType = (int)UiFieldDataType.InternalId,
|
||||||
|
SqlIdColumnName = "aworkorderitem.id",
|
||||||
|
SqlValueColumnName = "aworkorderitem.id",
|
||||||
|
IsMeta = true
|
||||||
|
});
|
||||||
|
|
||||||
#endregion workorderitem fields
|
#endregion workorderitem fields
|
||||||
|
|
||||||
@@ -412,5 +422,15 @@ namespace AyaNova.DataList
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<DataListFilterOption> DataListInternalCriteria(long currentUserId, AuthorizationRoles userRoles, string clientCriteria)
|
||||||
|
{
|
||||||
|
//This is required to filter out rows where there are no matching scheduled user otherwise we'd get all workorders and items regardless
|
||||||
|
List<DataListFilterOption> ret = new List<DataListFilterOption>();
|
||||||
|
DataListFilterOption FilterOption = new DataListFilterOption() { Column = "metawoitemid" };
|
||||||
|
FilterOption.Items.Add(new DataListColumnFilter() { value = "*NULL*", op = DataListFilterComparisonOperator.NotEqual });
|
||||||
|
ret.Add(FilterOption);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
}//eoc
|
}//eoc
|
||||||
}//eons
|
}//eons
|
||||||
@@ -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 WorkOrderItemScheduledUserDataList : DataListProcessingBase
|
internal class WorkOrderItemScheduledUserDataList : DataListProcessingBase, IDataListInternalCriteria
|
||||||
{
|
{
|
||||||
public WorkOrderItemScheduledUserDataList()
|
public WorkOrderItemScheduledUserDataList()
|
||||||
{
|
{
|
||||||
@@ -117,6 +119,16 @@ namespace AyaNova.DataList
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
//META column
|
||||||
|
FieldDefinitions.Add(new DataListFieldDefinition
|
||||||
|
{
|
||||||
|
FieldKey = "metawoitemscheduserid",
|
||||||
|
UiFieldDataType = (int)UiFieldDataType.InternalId,
|
||||||
|
SqlIdColumnName = "aworkorderitemscheduleduser.id",
|
||||||
|
SqlValueColumnName = "aworkorderitemscheduleduser.id",
|
||||||
|
IsMeta = true
|
||||||
|
});
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
@@ -506,5 +518,16 @@ namespace AyaNova.DataList
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public List<DataListFilterOption> DataListInternalCriteria(long currentUserId, AuthorizationRoles userRoles, string clientCriteria)
|
||||||
|
{
|
||||||
|
//This is required to filter out rows where there are no matching scheduled user otherwise we'd get all workorders and items regardless
|
||||||
|
List<DataListFilterOption> ret = new List<DataListFilterOption>();
|
||||||
|
DataListFilterOption FilterOption = new DataListFilterOption() { Column = "metawoitemscheduserid" };
|
||||||
|
FilterOption.Items.Add(new DataListColumnFilter() { value = "*NULL*", op = DataListFilterComparisonOperator.NotEqual });
|
||||||
|
ret.Add(FilterOption);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
}//eoc
|
}//eoc
|
||||||
}//eons
|
}//eons
|
||||||
Reference in New Issue
Block a user