This commit is contained in:
2021-02-08 21:37:16 +00:00
parent 658b345378
commit 27a232c888
10 changed files with 15 additions and 273 deletions

View File

@@ -4,40 +4,16 @@ namespace AyaNova.DataList
{
internal class TranslationDataList : DataListProcessingBase
{
public TranslationDataList()
{
DefaultListObjectType = AyaType.Translation;
SQLFrom = "from atranslation";
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
// //Default ListView
// dynamic dlistView = new JArray();
// dynamic cm = new JObject();
// cm.fld = "name";
// cm.sort = "+";
// dlistView.Add(cm);
// cm = new JObject();
// cm.fld = "stock";
// dlistView.Add(cm);
// cm = new JObject();
// cm.fld = "cjkindex";
// dlistView.Add(cm);
// DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None);
DefaultColumns = new List<string>() { "name", "stock", "cjkindex" };
DefaultColumns = new List<string>() { "name", "stock", "cjkindex" };
DefaultSortBy = new Dictionary<string, string>() { { "name", "+" } };
//NOTE: Due to the join, all the sql id and name fields that can conflict with the joined (in this case User) table need to be specified completely
FieldDefinitions = new List<DataListFieldDefinition>();
//DPRECATED FieldDefinitions.Add(new AyaDataListFieldDefinition { FieldKey = "df", AyaObjectType = (int)AyaType.User, SqlIdColumnName = "auser.id" });
FieldDefinitions.Add(new DataListFieldDefinition
{
TKey = "Translation",
@@ -57,8 +33,6 @@ namespace AyaNova.DataList
SqlValueColumnName = "atranslation.cjkindex"
});
FieldDefinitions.Add(new DataListFieldDefinition
{
TKey = "ReadOnly",
@@ -66,9 +40,6 @@ namespace AyaNova.DataList
UiFieldDataType = (int)UiFieldDataType.Bool,
SqlValueColumnName = "atranslation.stock"
});
}
}//eoc
}//eons