45 lines
1.7 KiB
C#
45 lines
1.7 KiB
C#
using System.Collections.Generic;
|
|
using AyaNova.Biz;
|
|
namespace AyaNova.DataList
|
|
{
|
|
internal class TranslationDataList : DataListProcessingBase
|
|
{
|
|
public TranslationDataList()
|
|
{
|
|
DefaultListAType = AyaType.Translation;
|
|
SQLFrom = "from atranslation";
|
|
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
|
DefaultColumns = new List<string>() { "name", "stock", "cjkindex" };
|
|
DefaultSortBy = new Dictionary<string, string>() { { "name", "+" } };
|
|
FieldDefinitions = new List<DataListFieldDefinition>();
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "Translation",
|
|
FieldKey = "name",
|
|
AType = (int)AyaType.Translation,
|
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
|
SqlIdColumnName = "atranslation.id",
|
|
SqlValueColumnName = "atranslation.name",
|
|
IsRowId = true
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "GlobalCJKIndex",
|
|
FieldKey = "cjkindex",
|
|
UiFieldDataType = (int)UiFieldDataType.Bool,
|
|
SqlValueColumnName = "atranslation.cjkindex"
|
|
});
|
|
|
|
FieldDefinitions.Add(new DataListFieldDefinition
|
|
{
|
|
TKey = "ReadOnly",
|
|
FieldKey = "stock",
|
|
UiFieldDataType = (int)UiFieldDataType.Bool,
|
|
SqlValueColumnName = "atranslation.stock"
|
|
});
|
|
}
|
|
}//eoc
|
|
}//eons |