This commit is contained in:
@@ -4,7 +4,7 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
internal class AttachmentDataList : DataListProcessingBase
|
internal class AttachmentDataList : DataListProcessingBase
|
||||||
{
|
{
|
||||||
public AttachmentDataList()
|
public AttachmentDataList(long translationId)
|
||||||
{
|
{
|
||||||
DefaultListAType = AyaType.FileAttachment;
|
DefaultListAType = AyaType.FileAttachment;
|
||||||
SQLFrom = "from afileattachment";
|
SQLFrom = "from afileattachment";
|
||||||
@@ -41,7 +41,7 @@ namespace AyaNova.DataList
|
|||||||
FieldKey = "object",
|
FieldKey = "object",
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "afileattachment.AttachToObjectid",
|
SqlIdColumnName = "afileattachment.AttachToObjectid",
|
||||||
SqlValueColumnName = $"AYGETNAME(afileattachment.AttachToObjectid, afileattachment.attachtoatype,{CurrentUserTranslationId})",
|
SqlValueColumnName = $"AYGETNAME(afileattachment.AttachToObjectid, afileattachment.attachtoatype,{translationId})",
|
||||||
SqlATypeColumnName = "afileattachment.attachtoatype",
|
SqlATypeColumnName = "afileattachment.attachtoatype",
|
||||||
Translate=true
|
Translate=true
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
internal class CustomerDataList : DataListProcessingBase, IDataListInternalCriteria
|
internal class CustomerDataList : DataListProcessingBase, IDataListInternalCriteria
|
||||||
{
|
{
|
||||||
public CustomerDataList()
|
public CustomerDataList(long translationId)
|
||||||
{
|
{
|
||||||
DefaultListAType = AyaType.Customer;
|
DefaultListAType = AyaType.Customer;
|
||||||
SQLFrom = @"FROM ACUSTOMER
|
SQLFrom = @"FROM ACUSTOMER
|
||||||
|
|||||||
@@ -12,9 +12,8 @@ namespace AyaNova.DataList
|
|||||||
internal static IDataListProcessing GetAyaDataList(string ListKey, long translationId)
|
internal static IDataListProcessing GetAyaDataList(string ListKey, long translationId)
|
||||||
{
|
{
|
||||||
System.Reflection.Assembly ass = System.Reflection.Assembly.GetEntryAssembly();
|
System.Reflection.Assembly ass = System.Reflection.Assembly.GetEntryAssembly();
|
||||||
var v= ass.CreateInstance($"AyaNova.DataList.{ListKey}") as IDataListProcessing;
|
return ass.CreateInstance($"AyaNova.DataList.{ListKey}", false, System.Reflection.BindingFlags.Default, null, new object[] { translationId }, null, null) as IDataListProcessing;
|
||||||
v.CurrentUserTranslationId=translationId;
|
|
||||||
return v;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//List all the datalist types available
|
//List all the datalist types available
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ namespace AyaNova.DataList
|
|||||||
public AuthorizationRoles AllowedRoles { get; set; }
|
public AuthorizationRoles AllowedRoles { get; set; }
|
||||||
public AyaType DefaultListAType { get; set; }
|
public AyaType DefaultListAType { get; set; }
|
||||||
//public long CurrentUserId { get; set; }
|
//public long CurrentUserId { get; set; }
|
||||||
public long CurrentUserTranslationId { get; set; }
|
//public long CurrentUserTranslationId { get; set; }
|
||||||
public List<string> DefaultColumns { get; set; }
|
public List<string> DefaultColumns { get; set; }
|
||||||
public Dictionary<string, string> DefaultSortBy { get; set; }
|
public Dictionary<string, string> DefaultSortBy { get; set; }
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
internal class EventDataList : DataListProcessingBase
|
internal class EventDataList : DataListProcessingBase
|
||||||
{
|
{
|
||||||
public EventDataList()
|
public EventDataList(long translationId)
|
||||||
{
|
{
|
||||||
//NOTE: used this type because it's full BizFull and read only Bizrestricted only which is appropriate and there is no event type
|
//NOTE: used this type because it's full BizFull and read only Bizrestricted only which is appropriate and there is no event type
|
||||||
DefaultListAType = AyaType.Global;
|
DefaultListAType = AyaType.Global;
|
||||||
@@ -13,6 +13,7 @@ namespace AyaNova.DataList
|
|||||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||||
DefaultColumns = new List<string>() { "eventcreated", "event", "object", "AyaType", "username", "textra" };
|
DefaultColumns = new List<string>() { "eventcreated", "event", "object", "AyaType", "username", "textra" };
|
||||||
DefaultSortBy = new Dictionary<string, string>() { { "eventcreated", "-" } };
|
DefaultSortBy = new Dictionary<string, string>() { { "eventcreated", "-" } };
|
||||||
|
|
||||||
|
|
||||||
FieldDefinitions = new List<DataListFieldDefinition>();
|
FieldDefinitions = new List<DataListFieldDefinition>();
|
||||||
|
|
||||||
@@ -48,7 +49,7 @@ namespace AyaNova.DataList
|
|||||||
FieldKey = "object",
|
FieldKey = "object",
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "aevent.ayid",
|
SqlIdColumnName = "aevent.ayid",
|
||||||
SqlValueColumnName = $"AYGETNAME(aevent.ayid, aevent.ayatype,{CurrentUserTranslationId})",
|
SqlValueColumnName = $"AYGETNAME(aevent.ayid, aevent.ayatype,{translationId})",
|
||||||
SqlATypeColumnName = "aevent.ayatype"
|
SqlATypeColumnName = "aevent.ayatype"
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,6 @@ namespace AyaNova.DataList
|
|||||||
void SetListOptionDefaultsIfNecessary(Models.DataListProcessingBase listOptions);
|
void SetListOptionDefaultsIfNecessary(Models.DataListProcessingBase listOptions);
|
||||||
Newtonsoft.Json.Linq.JArray GenerateReturnListColumns(List<string> columns);
|
Newtonsoft.Json.Linq.JArray GenerateReturnListColumns(List<string> columns);
|
||||||
|
|
||||||
long CurrentUserTranslationId { get; set; }
|
//long CurrentUserTranslationId { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7,7 +7,7 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
internal class PartInventoryTransactionsDataList : DataListProcessingBase, IDataListInternalCriteria
|
internal class PartInventoryTransactionsDataList : DataListProcessingBase, IDataListInternalCriteria
|
||||||
{
|
{
|
||||||
public PartInventoryTransactionsDataList()
|
public PartInventoryTransactionsDataList(long translationId)
|
||||||
{
|
{
|
||||||
DefaultListAType = AyaType.PartInventory;
|
DefaultListAType = AyaType.PartInventory;
|
||||||
SQLFrom = "from apartinventory "
|
SQLFrom = "from apartinventory "
|
||||||
@@ -28,7 +28,7 @@ namespace AyaNova.DataList
|
|||||||
FieldKey = "PartInventoryTransactionSource",
|
FieldKey = "PartInventoryTransactionSource",
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "apartinventory.sourceid",
|
SqlIdColumnName = "apartinventory.sourceid",
|
||||||
SqlValueColumnName = $"AYGETNAME(apartinventory.sourceid, apartinventory.sourcetype,{CurrentUserTranslationId})",
|
SqlValueColumnName = $"AYGETNAME(apartinventory.sourceid, apartinventory.sourcetype,{translationId})",
|
||||||
SqlATypeColumnName = "apartinventory.sourcetype",
|
SqlATypeColumnName = "apartinventory.sourcetype",
|
||||||
Translate=true
|
Translate=true
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
internal class ReviewDataList : DataListProcessingBase, IDataListInternalCriteria
|
internal class ReviewDataList : DataListProcessingBase, IDataListInternalCriteria
|
||||||
{
|
{
|
||||||
public ReviewDataList()
|
public ReviewDataList(long translationId)
|
||||||
{
|
{
|
||||||
|
|
||||||
DefaultListAType = AyaType.Review;
|
DefaultListAType = AyaType.Review;
|
||||||
@@ -25,7 +25,7 @@ namespace AyaNova.DataList
|
|||||||
FieldKey = "Object",
|
FieldKey = "Object",
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "areview.objectid",
|
SqlIdColumnName = "areview.objectid",
|
||||||
SqlValueColumnName = $"AYGETNAME(areview.objectid, areview.aType,{CurrentUserTranslationId})",
|
SqlValueColumnName = $"AYGETNAME(areview.objectid, areview.aType,{translationId})",
|
||||||
SqlATypeColumnName = "areview.aType",
|
SqlATypeColumnName = "areview.aType",
|
||||||
Translate=true
|
Translate=true
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ namespace AyaNova.Biz
|
|||||||
throw new System.ArgumentOutOfRangeException($"ListKey '{listKey}' is not a valid DataListKey");
|
throw new System.ArgumentOutOfRangeException($"ListKey '{listKey}' is not a valid DataListKey");
|
||||||
}
|
}
|
||||||
|
|
||||||
var dataList = DataListFactory.GetAyaDataList(listKey,0);
|
//var dataList = DataListFactory.GetAyaDataList(listKey,0);
|
||||||
|
|
||||||
DataListSavedFilter d = new DataListSavedFilter();
|
DataListSavedFilter d = new DataListSavedFilter();
|
||||||
d.ListKey = listKey;
|
d.ListKey = listKey;
|
||||||
|
|||||||
Reference in New Issue
Block a user