97 lines
7.0 KiB
C#
97 lines
7.0 KiB
C#
using System.Collections.Generic;
|
|
using AyaNova.Biz;
|
|
namespace AyaNova.DataList
|
|
{
|
|
internal class WorkOrderDataList : DataListProcessingBase
|
|
{
|
|
public WorkOrderDataList()
|
|
{
|
|
DefaultListAType = AyaType.WorkOrder;
|
|
SQLFrom = "from aworkorder";
|
|
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
|
DefaultColumns = new List<string>() { "WorkOrderSerialNumber" };
|
|
DefaultSortBy = new Dictionary<string, string>() { { "WorkOrderSerialNumber", "-" } };
|
|
FieldDefinitions = new List<DataListFieldDefinition>();
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "WorkOrderSerialNumber",
|
|
FieldKey = "WorkOrderSerialNumber",
|
|
AType = (int)AyaType.WorkOrder,
|
|
UiFieldDataType = (int)UiFieldDataType.Integer,
|
|
SqlIdColumnName = "aworkorder.id",
|
|
SqlValueColumnName = "aworkorder.serial",
|
|
IsRowId = true
|
|
});
|
|
|
|
// FieldDefinitions.Add(new DataListFieldDefinition
|
|
// {
|
|
// TKey = "WorkOrderNotes",
|
|
// FieldKey = "workordernotes",
|
|
// UiFieldDataType = (int)UiFieldDataType.Text,
|
|
// SqlValueColumnName = "aworkorder.notes"
|
|
// });
|
|
|
|
|
|
// FieldDefinitions.Add(new DataListFieldDefinition
|
|
// {
|
|
// TKey = "Tags",
|
|
// FieldKey = "workordertags",
|
|
// UiFieldDataType = (int)UiFieldDataType.Tags,
|
|
// SqlValueColumnName = "aworkorder.tags"
|
|
// });
|
|
|
|
// FieldDefinitions.Add(new DataListFieldDefinition
|
|
// {
|
|
// TKey = "XXXX",
|
|
// FieldKey = "XXXX",
|
|
// UiFieldDataType = (int)UiFieldDataType.Text,
|
|
// SqlValueColumnName = "aworkorder.internalreferencenumber"
|
|
// });
|
|
|
|
// FieldDefinitions.Add(new DataListFieldDefinition
|
|
// {
|
|
// FieldKey = "WorkOrderWorkOrderOverseerID",
|
|
// TKey = "WorkOrderWorkOrderOverseerID",
|
|
// UiFieldDataType = (int)UiFieldDataType.Text,
|
|
// AType = (int)AyaType.User,
|
|
// SqlIdColumnName = "auser.id",
|
|
// SqlValueColumnName = "auser.name"
|
|
// });
|
|
|
|
// FieldDefinitions.Add(new DataListFieldDefinition
|
|
// {
|
|
// TKey = "WorkOrderDateStarted",
|
|
// FieldKey = "WorkOrderDateStarted",
|
|
// UiFieldDataType = (int)UiFieldDataType.DateTime,
|
|
// SqlValueColumnName = "aworkorder.datestarted"
|
|
// });
|
|
|
|
// FieldDefinitions.Add(new DataListFieldDefinition
|
|
// {
|
|
// TKey = "WorkOrderDateCompleted",
|
|
// FieldKey = "WorkOrderDateCompleted",
|
|
// UiFieldDataType = (int)UiFieldDataType.DateTime,
|
|
// SqlValueColumnName = "aworkorder.datecompleted"
|
|
// });
|
|
|
|
// FieldDefinitions.Add(new DataListFieldDefinition { TKey = "WorkOrderCustom1", FieldKey = "workordercustom1", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aworkorder.customfields" });
|
|
// FieldDefinitions.Add(new DataListFieldDefinition { TKey = "WorkOrderCustom2", FieldKey = "workordercustom2", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aworkorder.customfields" });
|
|
// FieldDefinitions.Add(new DataListFieldDefinition { TKey = "WorkOrderCustom3", FieldKey = "workordercustom3", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aworkorder.customfields" });
|
|
// FieldDefinitions.Add(new DataListFieldDefinition { TKey = "WorkOrderCustom4", FieldKey = "workordercustom4", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aworkorder.customfields" });
|
|
// FieldDefinitions.Add(new DataListFieldDefinition { TKey = "WorkOrderCustom5", FieldKey = "workordercustom5", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aworkorder.customfields" });
|
|
// FieldDefinitions.Add(new DataListFieldDefinition { TKey = "WorkOrderCustom6", FieldKey = "workordercustom6", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aworkorder.customfields" });
|
|
// FieldDefinitions.Add(new DataListFieldDefinition { TKey = "WorkOrderCustom7", FieldKey = "workordercustom7", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aworkorder.customfields" });
|
|
// FieldDefinitions.Add(new DataListFieldDefinition { TKey = "WorkOrderCustom8", FieldKey = "workordercustom8", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aworkorder.customfields" });
|
|
// FieldDefinitions.Add(new DataListFieldDefinition { TKey = "WorkOrderCustom9", FieldKey = "workordercustom9", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aworkorder.customfields" });
|
|
// FieldDefinitions.Add(new DataListFieldDefinition { TKey = "WorkOrderCustom10", FieldKey = "workordercustom10", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aworkorder.customfields" });
|
|
// FieldDefinitions.Add(new DataListFieldDefinition { TKey = "WorkOrderCustom11", FieldKey = "workordercustom11", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aworkorder.customfields" });
|
|
// FieldDefinitions.Add(new DataListFieldDefinition { TKey = "WorkOrderCustom12", FieldKey = "workordercustom12", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aworkorder.customfields" });
|
|
// FieldDefinitions.Add(new DataListFieldDefinition { TKey = "WorkOrderCustom13", FieldKey = "workordercustom13", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aworkorder.customfields" });
|
|
// FieldDefinitions.Add(new DataListFieldDefinition { TKey = "WorkOrderCustom14", FieldKey = "workordercustom14", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aworkorder.customfields" });
|
|
// FieldDefinitions.Add(new DataListFieldDefinition { TKey = "WorkOrderCustom15", FieldKey = "workordercustom15", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aworkorder.customfields" });
|
|
// FieldDefinitions.Add(new DataListFieldDefinition { TKey = "WorkOrderCustom16", FieldKey = "workordercustom16", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "aworkorder.customfields" });
|
|
}
|
|
}//eoc
|
|
}//eons |