This commit is contained in:
78
server/DataList/GZCaseDataList.cs
Normal file
78
server/DataList/GZCaseDataList.cs
Normal file
@@ -0,0 +1,78 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Sockeye.Biz;
|
||||
using Sockeye.Models;
|
||||
|
||||
namespace Sockeye.DataList
|
||||
{
|
||||
internal class GZCaseDataList : DataListProcessingBase
|
||||
{
|
||||
public GZCaseDataList(long translationId)
|
||||
{
|
||||
DefaultListAType = SockType.GZCase;
|
||||
SQLFrom = @"FROM agzcase ";
|
||||
|
||||
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||
DefaultColumns = new List<string>() { "GZCaseId", "GZCaseName", "Tags" };
|
||||
DefaultSortBy = new Dictionary<string, string>() { { "GZCaseId", "-" } };
|
||||
FieldDefinitions = new List<DataListFieldDefinition>();
|
||||
/*
|
||||
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'GZCase', 'Case' FROM atranslation t where t.baselanguage = 'en'");
|
||||
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'GZCaseList', 'Cases' FROM atranslation t where t.baselanguage = 'en'");
|
||||
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'GZCaseId', 'Case #' FROM atranslation t where t.baselanguage = 'en'");
|
||||
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'GZCaseClosed', 'Closed' FROM atranslation t where t.baselanguage = 'en'");
|
||||
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'GZCaseName', 'Summary' FROM atranslation t where t.baselanguage = 'en'");
|
||||
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'GZCaseNotes', 'Details' FROM atranslation t where t.baselanguage = 'en'");
|
||||
caseid BIGINT GENERATED BY DEFAULT AS IDENTITY NOT NULL, "
|
||||
+ "created TIMESTAMPTZ NOT NULL, closed TIMESTAMPTZ, name TEXT NOT NULL, notes TEXT, "
|
||||
+ "wiki TEXT, tags VARCHAR(255) ARRAY
|
||||
*/
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
{
|
||||
TKey = "GZCaseId",
|
||||
FieldKey = "GZCaseId",
|
||||
SockType = (int)SockType.GZCase,
|
||||
UiFieldDataType = (int)UiFieldDataType.Integer,
|
||||
SqlIdColumnName = "agzcase.id",
|
||||
SqlValueColumnName = "agzcase.caseid",
|
||||
IsRowId = true
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
{
|
||||
TKey = "Created",
|
||||
FieldKey = "Created",
|
||||
UiFieldDataType = (int)UiFieldDataType.DateTime,
|
||||
SqlValueColumnName = "agzcase.created"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
{
|
||||
TKey = "GZCaseClosed",
|
||||
FieldKey = "GZCaseClosed",
|
||||
UiFieldDataType = (int)UiFieldDataType.DateTime,
|
||||
SqlValueColumnName = "agzcase.closed"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
{
|
||||
TKey = "GZCaseName",
|
||||
FieldKey = "GZCaseName",
|
||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||
SqlValueColumnName = "agzcase.name"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
{
|
||||
TKey = "Tags",
|
||||
FieldKey = "gzcasetags",
|
||||
UiFieldDataType = (int)UiFieldDataType.Tags,
|
||||
SqlValueColumnName = "agzcase.tags"
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}//eoc
|
||||
}//eons
|
||||
@@ -45,7 +45,7 @@ namespace Sockeye.DataList
|
||||
TKey = "LicenseSerial",
|
||||
FieldKey = "licenseid",
|
||||
SockType = (int)SockType.License,
|
||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||
UiFieldDataType = (int)UiFieldDataType.Integer,
|
||||
SqlIdColumnName = "alicense.id",
|
||||
SqlValueColumnName = "alicense.id",
|
||||
IsRowId = true
|
||||
|
||||
@@ -41,7 +41,7 @@ await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SE
|
||||
TKey = "ID",
|
||||
FieldKey = "id",
|
||||
SockType = (int)SockType.TrialLicenseRequest,
|
||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||
UiFieldDataType = (int)UiFieldDataType.Integer,
|
||||
SqlIdColumnName = "atriallicenserequest.id",
|
||||
SqlValueColumnName = "atriallicenserequest.id",
|
||||
IsRowId = true
|
||||
|
||||
Reference in New Issue
Block a user