This commit is contained in:
84
server/AyaNova/DataList/QuoteStatusDataList.cs
Normal file
84
server/AyaNova/DataList/QuoteStatusDataList.cs
Normal file
@@ -0,0 +1,84 @@
|
||||
using System.Collections.Generic;
|
||||
using AyaNova.Biz;
|
||||
namespace AyaNova.DataList
|
||||
{
|
||||
internal class QuoteStatusDataList : DataListProcessingBase
|
||||
{
|
||||
public QuoteStatusDataList()
|
||||
{
|
||||
DefaultListAType = AyaType.QuoteStatus;
|
||||
SQLFrom = "from aquotestatus";
|
||||
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||
DefaultColumns = new List<string>() { "QuoteStatusName", "SelectRoles", "RemoveRoles", "Active" };
|
||||
DefaultSortBy = new Dictionary<string, string>() { { "QuoteStatusName", "+" } };
|
||||
FieldDefinitions = new List<DataListFieldDefinition>();
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
{
|
||||
TKey = "QuoteStatusName",
|
||||
FieldKey = "QuoteStatusName",
|
||||
AType = (int)AyaType.QuoteStatus,
|
||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||
SqlIdColumnName = "aquotestatus.id",
|
||||
SqlValueColumnName = "aquotestatus.name",
|
||||
SqlColorColumnName = "aquotestatus.color",
|
||||
IsRowId = true
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
{
|
||||
TKey = "QuoteStatusNotes",
|
||||
FieldKey = "QuoteStatusNotes",
|
||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||
SqlValueColumnName = "aquotestatus.notes"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
{
|
||||
TKey = "Active",
|
||||
FieldKey = "Active",
|
||||
UiFieldDataType = (int)UiFieldDataType.Bool,
|
||||
SqlValueColumnName = "aquotestatus.active"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
{
|
||||
TKey = "QuoteStatusCompleted",
|
||||
FieldKey = "QuoteStatusCompleted",
|
||||
UiFieldDataType = (int)UiFieldDataType.Bool,
|
||||
SqlValueColumnName = "aquotestatus.completed"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
{
|
||||
TKey = "QuoteStatusLocked",
|
||||
FieldKey = "QuoteStatusLocked",
|
||||
UiFieldDataType = (int)UiFieldDataType.Bool,
|
||||
SqlValueColumnName = "aquotestatus.locked"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
{
|
||||
TKey = "SelectRoles",
|
||||
FieldKey = "SelectRoles",
|
||||
UiFieldDataType = (int)UiFieldDataType.Roles,
|
||||
//NOTE: not technically an enum list but this will trigger datagrid at client to fetch roles for special handling
|
||||
EnumType = AyaNova.Util.StringUtil.TrimTypeName(typeof(AuthorizationRoles).ToString()),
|
||||
SqlValueColumnName = "aquotestatus.selectroles"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
{
|
||||
TKey = "RemoveRoles",
|
||||
FieldKey = "RemoveRoles",
|
||||
UiFieldDataType = (int)UiFieldDataType.Roles,
|
||||
//NOTE: not technically an enum list but this will trigger datagrid at client to fetch roles for special handling
|
||||
EnumType = AyaNova.Util.StringUtil.TrimTypeName(typeof(AuthorizationRoles).ToString()),
|
||||
SqlValueColumnName = "aquotestatus.removeroles"
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
}//eoc
|
||||
}//eons
|
||||
Reference in New Issue
Block a user