64 lines
2.5 KiB
C#
64 lines
2.5 KiB
C#
using System.Collections.Generic;
|
|
using AyaNova.Biz;
|
|
namespace AyaNova.DataList
|
|
{
|
|
internal class WorkOrderStatusDataList : DataListProcessingBase
|
|
{
|
|
public WorkOrderStatusDataList()
|
|
{
|
|
DefaultListAType = AyaType.WorkOrderStatus;
|
|
SQLFrom = "from aworkorderstatus";
|
|
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
|
DefaultColumns = new List<string>() { "WorkOrderStatusName", "WorkOrderStatusNotes", "Active" };
|
|
DefaultSortBy = new Dictionary<string, string>() { { "WorkOrderStatusName", "+" } };
|
|
FieldDefinitions = new List<DataListFieldDefinition>();
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "WorkOrderStatusName",
|
|
FieldKey = "WorkOrderStatusName",
|
|
AType = (int)AyaType.WorkOrderStatus,
|
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
|
SqlIdColumnName = "aworkorderstatus.id",
|
|
SqlValueColumnName = "aworkorderstatus.name",
|
|
SqlColorColumnName = "aworkorderstatus.color",
|
|
IsRowId = true
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "WorkOrderStatusNotes",
|
|
FieldKey = "WorkOrderStatusNotes",
|
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
|
SqlValueColumnName = "aworkorderstatus.notes"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "Active",
|
|
FieldKey = "Active",
|
|
UiFieldDataType = (int)UiFieldDataType.Bool,
|
|
SqlValueColumnName = "aworkorderstatus.active"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "WorkOrderStatusCompleted",
|
|
FieldKey = "WorkOrderStatusCompleted",
|
|
UiFieldDataType = (int)UiFieldDataType.Bool,
|
|
SqlValueColumnName = "aworkorderstatus.completed"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "WorkOrderStatusLocked",
|
|
FieldKey = "WorkOrderStatusLocked",
|
|
UiFieldDataType = (int)UiFieldDataType.Bool,
|
|
SqlValueColumnName = "aworkorderstatus.locked"
|
|
});
|
|
|
|
|
|
}
|
|
}//eoc
|
|
}//eons |