rename all variants of naming that hold an AyaType value to "aType" (parameter) / "AType" (not parameter) everywhere front and back; "ayType", "objectType", "oType" all are used in various areas
This commit is contained in:
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@@ -53,7 +53,7 @@
|
|||||||
"AYANOVA_FOLDER_USER_FILES": "c:\\temp\\RavenTestData\\userfiles",
|
"AYANOVA_FOLDER_USER_FILES": "c:\\temp\\RavenTestData\\userfiles",
|
||||||
"AYANOVA_FOLDER_BACKUP_FILES": "c:\\temp\\RavenTestData\\backupfiles",
|
"AYANOVA_FOLDER_BACKUP_FILES": "c:\\temp\\RavenTestData\\backupfiles",
|
||||||
"AYANOVA_FOLDER_TEMPORARY_SERVER_FILES": "c:\\temp\\RavenTestData\\tempfiles",
|
"AYANOVA_FOLDER_TEMPORARY_SERVER_FILES": "c:\\temp\\RavenTestData\\tempfiles",
|
||||||
"AYANOVA_SERVER_TEST_MODE": "false",
|
"AYANOVA_SERVER_TEST_MODE": "true",
|
||||||
"AYANOVA_SERVER_TEST_MODE_SEEDLEVEL": "small",
|
"AYANOVA_SERVER_TEST_MODE_SEEDLEVEL": "small",
|
||||||
"AYANOVA_SERVER_TEST_MODE_TZ_OFFSET": "-7",
|
"AYANOVA_SERVER_TEST_MODE_TZ_OFFSET": "-7",
|
||||||
"AYANOVA_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\postgres_13\\bin\\"
|
"AYANOVA_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\postgres_13\\bin\\"
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ SCHEMA
|
|||||||
- It would be helpful to have a importmap table that is used temporarily during import to store a map of v7Guid's with their imported RAVEN type and id
|
- It would be helpful to have a importmap table that is used temporarily during import to store a map of v7Guid's with their imported RAVEN type and id
|
||||||
- This way it can be a lookup table to quickly set other imported data, i.e. client id's to match to units being imported.
|
- This way it can be a lookup table to quickly set other imported data, i.e. client id's to match to units being imported.
|
||||||
IMPORTMAP
|
IMPORTMAP
|
||||||
- ObjectType
|
- AType
|
||||||
- ObjectId
|
- ObjectId
|
||||||
- v7Guid
|
- v7Guid
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ AOPSJOB
|
|||||||
- StartAfter NOT NULL INDEXED (datetime to start the job, in cases of start now jobs the date will be minvalue)
|
- StartAfter NOT NULL INDEXED (datetime to start the job, in cases of start now jobs the date will be minvalue)
|
||||||
- jobtype enum int NOT NULL of the jobtype which is an enum of all possible job types (i.e. NotifyClosed)
|
- jobtype enum int NOT NULL of the jobtype which is an enum of all possible job types (i.e. NotifyClosed)
|
||||||
- ObjectId NULL source of job object id (i.e. workorder id)
|
- ObjectId NULL source of job object id (i.e. workorder id)
|
||||||
- ObjectType NULL source of job object type (i.e. workorder)
|
- AType NULL source of job object type (i.e. workorder)
|
||||||
- descriptive name text NOT NULL for display in UI only, isn't filtered
|
- descriptive name text NOT NULL for display in UI only, isn't filtered
|
||||||
- jobstatus enum int NOT NULL type (one of "sleeping | notstarted | running | succeeded | failed")
|
- jobstatus enum int NOT NULL type (one of "sleeping | notstarted | running | succeeded | failed")
|
||||||
- jobinfo text NULL (json string of extra info required for job, maybe the name of an import file or who knows what, anything really can be put in here as long as it's shortish)
|
- jobinfo text NULL (json string of extra info required for job, maybe the name of an import file or who knows what, anything really can be put in here as long as it's shortish)
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ asearchkey
|
|||||||
- id (long)
|
- id (long)
|
||||||
- wordid (fk on asearchdictionary.id)
|
- wordid (fk on asearchdictionary.id)
|
||||||
- objectid (long id of source object)
|
- objectid (long id of source object)
|
||||||
- objecttype (AyaType as int of source object)
|
- aType (AyaType as int of source object)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ RETRIEVAL
|
|||||||
|
|
||||||
Will need to query tags as follows:
|
Will need to query tags as follows:
|
||||||
|
|
||||||
ObjectType and Id list of tags (most common)
|
AType and Id list of tags (most common)
|
||||||
Objects with one or more tags
|
Objects with one or more tags
|
||||||
Objects that have a set of tags but do not have another set of tags
|
Objects that have a set of tags but do not have another set of tags
|
||||||
Objects of a certain type but any id that have a certain tag
|
Objects of a certain type but any id that have a certain tag
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ for (var i = 0; i < files.length; i++) {
|
|||||||
|
|
||||||
//Attachment upload route requires further form data to designate
|
//Attachment upload route requires further form data to designate
|
||||||
//the object being attached to by it's type and id:
|
//the object being attached to by it's type and id:
|
||||||
//data.append('AttachToObjectType','2');
|
//data.append('AttachToAType','2');
|
||||||
//data.append('AttachToObjectId','200');
|
//data.append('AttachToObjectId','200');
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
|||||||
@@ -41,23 +41,23 @@ namespace AyaNova.Api.ControllerHelpers
|
|||||||
/// any access at all?
|
/// any access at all?
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="HttpContextItems"></param>
|
/// <param name="HttpContextItems"></param>
|
||||||
/// <param name="objectType"></param>
|
/// <param name="aType"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
internal static bool HasAnyRole(IDictionary<object, object> HttpContextItems, AyaType objectType)
|
internal static bool HasAnyRole(IDictionary<object, object> HttpContextItems, AyaType aType)
|
||||||
{
|
{
|
||||||
AuthorizationRoles currentUserRoles = UserRolesFromContext.Roles(HttpContextItems);
|
AuthorizationRoles currentUserRoles = UserRolesFromContext.Roles(HttpContextItems);
|
||||||
return HasAnyRole(currentUserRoles, objectType);
|
return HasAnyRole(currentUserRoles, aType);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// User has any access at all to this object?
|
/// User has any access at all to this object?
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="currentUserRoles"></param>
|
/// <param name="currentUserRoles"></param>
|
||||||
/// <param name="objectType"></param>
|
/// <param name="aType"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
internal static bool HasAnyRole(AuthorizationRoles currentUserRoles, AyaType objectType)
|
internal static bool HasAnyRole(AuthorizationRoles currentUserRoles, AyaType aType)
|
||||||
{
|
{
|
||||||
var RoleSet = BizRoles.GetRoleSet(objectType);
|
var RoleSet = BizRoles.GetRoleSet(aType);
|
||||||
if (RoleSet == null) return false;
|
if (RoleSet == null) return false;
|
||||||
var AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change | RoleSet.Select;
|
var AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change | RoleSet.Select;
|
||||||
return currentUserRoles.HasAnyFlags(AllowedRoles);
|
return currentUserRoles.HasAnyFlags(AllowedRoles);
|
||||||
@@ -67,23 +67,23 @@ namespace AyaNova.Api.ControllerHelpers
|
|||||||
/// READ FULL RECORD (not just name and id)
|
/// READ FULL RECORD (not just name and id)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="HttpContextItems"></param>
|
/// <param name="HttpContextItems"></param>
|
||||||
/// <param name="objectType"></param>
|
/// <param name="aType"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
internal static bool HasSelectRole(IDictionary<object, object> HttpContextItems, AyaType objectType)
|
internal static bool HasSelectRole(IDictionary<object, object> HttpContextItems, AyaType aType)
|
||||||
{
|
{
|
||||||
AuthorizationRoles currentUserRoles = UserRolesFromContext.Roles(HttpContextItems);
|
AuthorizationRoles currentUserRoles = UserRolesFromContext.Roles(HttpContextItems);
|
||||||
return HasSelectRole(currentUserRoles, objectType);
|
return HasSelectRole(currentUserRoles, aType);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// SELECT BY NAME
|
/// SELECT BY NAME
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="currentUserRoles"></param>
|
/// <param name="currentUserRoles"></param>
|
||||||
/// <param name="objectType"></param>
|
/// <param name="aType"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
internal static bool HasSelectRole(AuthorizationRoles currentUserRoles, AyaType objectType)
|
internal static bool HasSelectRole(AuthorizationRoles currentUserRoles, AyaType aType)
|
||||||
{
|
{
|
||||||
var RoleSet = BizRoles.GetRoleSet(objectType);
|
var RoleSet = BizRoles.GetRoleSet(aType);
|
||||||
if (RoleSet == null) return false;
|
if (RoleSet == null) return false;
|
||||||
|
|
||||||
//NOTE: this assumes that if you can change you can read
|
//NOTE: this assumes that if you can change you can read
|
||||||
@@ -104,24 +104,24 @@ namespace AyaNova.Api.ControllerHelpers
|
|||||||
/// READ FULL RECORD (not just name and id)
|
/// READ FULL RECORD (not just name and id)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="HttpContextItems"></param>
|
/// <param name="HttpContextItems"></param>
|
||||||
/// <param name="objectType"></param>
|
/// <param name="aType"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
internal static bool HasReadFullRole(IDictionary<object, object> HttpContextItems, AyaType objectType)
|
internal static bool HasReadFullRole(IDictionary<object, object> HttpContextItems, AyaType aType)
|
||||||
{
|
{
|
||||||
AuthorizationRoles currentUserRoles = UserRolesFromContext.Roles(HttpContextItems);
|
AuthorizationRoles currentUserRoles = UserRolesFromContext.Roles(HttpContextItems);
|
||||||
return HasReadFullRole(currentUserRoles, objectType);
|
return HasReadFullRole(currentUserRoles, aType);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// READ FULL RECORD (not just name and id)
|
/// READ FULL RECORD (not just name and id)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="currentUserRoles"></param>
|
/// <param name="currentUserRoles"></param>
|
||||||
/// <param name="objectType"></param>
|
/// <param name="aType"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
internal static bool HasReadFullRole(AuthorizationRoles currentUserRoles, AyaType objectType)
|
internal static bool HasReadFullRole(AuthorizationRoles currentUserRoles, AyaType aType)
|
||||||
{
|
{
|
||||||
//NOTE: this assumes that if you can change you can read
|
//NOTE: this assumes that if you can change you can read
|
||||||
var RoleSet = BizRoles.GetRoleSet(objectType);
|
var RoleSet = BizRoles.GetRoleSet(aType);
|
||||||
if (RoleSet == null) return false;
|
if (RoleSet == null) return false;
|
||||||
var AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
var AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||||
return currentUserRoles.HasAnyFlags(AllowedRoles);
|
return currentUserRoles.HasAnyFlags(AllowedRoles);
|
||||||
@@ -133,23 +133,23 @@ namespace AyaNova.Api.ControllerHelpers
|
|||||||
/// CREATE
|
/// CREATE
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="HttpContextItems"></param>
|
/// <param name="HttpContextItems"></param>
|
||||||
/// <param name="objectType"></param>
|
/// <param name="aType"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
internal static bool HasCreateRole(IDictionary<object, object> HttpContextItems, AyaType objectType)
|
internal static bool HasCreateRole(IDictionary<object, object> HttpContextItems, AyaType aType)
|
||||||
{
|
{
|
||||||
AuthorizationRoles currentUserRoles = UserRolesFromContext.Roles(HttpContextItems);
|
AuthorizationRoles currentUserRoles = UserRolesFromContext.Roles(HttpContextItems);
|
||||||
return HasCreateRole(currentUserRoles, objectType);
|
return HasCreateRole(currentUserRoles, aType);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// CREATE
|
/// CREATE
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="currentUserRoles"></param>
|
/// <param name="currentUserRoles"></param>
|
||||||
/// <param name="objectType"></param>
|
/// <param name="aType"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
internal static bool HasCreateRole(AuthorizationRoles currentUserRoles, AyaType objectType)
|
internal static bool HasCreateRole(AuthorizationRoles currentUserRoles, AyaType aType)
|
||||||
{
|
{
|
||||||
var RoleSet = BizRoles.GetRoleSet(objectType);
|
var RoleSet = BizRoles.GetRoleSet(aType);
|
||||||
if (RoleSet == null) return false;
|
if (RoleSet == null) return false;
|
||||||
if (currentUserRoles.HasAnyFlags(RoleSet.Change))
|
if (currentUserRoles.HasAnyFlags(RoleSet.Change))
|
||||||
return true;
|
return true;
|
||||||
@@ -161,13 +161,13 @@ namespace AyaNova.Api.ControllerHelpers
|
|||||||
/// MODIFY
|
/// MODIFY
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="HttpContextItems"></param>
|
/// <param name="HttpContextItems"></param>
|
||||||
/// <param name="objectType"></param>
|
/// <param name="aType"></param>
|
||||||
|
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
internal static bool HasModifyRole(IDictionary<object, object> HttpContextItems, AyaType objectType)
|
internal static bool HasModifyRole(IDictionary<object, object> HttpContextItems, AyaType aType)
|
||||||
{
|
{
|
||||||
AuthorizationRoles currentUserRoles = UserRolesFromContext.Roles(HttpContextItems);
|
AuthorizationRoles currentUserRoles = UserRolesFromContext.Roles(HttpContextItems);
|
||||||
return HasModifyRole(currentUserRoles, objectType);
|
return HasModifyRole(currentUserRoles, aType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -175,11 +175,11 @@ namespace AyaNova.Api.ControllerHelpers
|
|||||||
/// MODIFY
|
/// MODIFY
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="currentUserRoles"></param>
|
/// <param name="currentUserRoles"></param>
|
||||||
/// <param name="objectType"></param>
|
/// <param name="aType"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
internal static bool HasModifyRole(AuthorizationRoles currentUserRoles, AyaType objectType)
|
internal static bool HasModifyRole(AuthorizationRoles currentUserRoles, AyaType aType)
|
||||||
{
|
{
|
||||||
var RoleSet = BizRoles.GetRoleSet(objectType);
|
var RoleSet = BizRoles.GetRoleSet(aType);
|
||||||
if (RoleSet == null) return false;
|
if (RoleSet == null) return false;
|
||||||
if (currentUserRoles.HasAnyFlags(RoleSet.Change))
|
if (currentUserRoles.HasAnyFlags(RoleSet.Change))
|
||||||
return true;
|
return true;
|
||||||
@@ -193,14 +193,14 @@ namespace AyaNova.Api.ControllerHelpers
|
|||||||
/// DELETE
|
/// DELETE
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="HttpContextItems"></param>
|
/// <param name="HttpContextItems"></param>
|
||||||
/// <param name="objectType"></param>
|
/// <param name="aType"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
//For now just going to treat as a modify, but for maximum flexibility keeping this as a separate method in case we change our minds in future
|
//For now just going to treat as a modify, but for maximum flexibility keeping this as a separate method in case we change our minds in future
|
||||||
internal static bool HasDeleteRole(IDictionary<object, object> HttpContextItems, AyaType objectType)
|
internal static bool HasDeleteRole(IDictionary<object, object> HttpContextItems, AyaType aType)
|
||||||
{
|
{
|
||||||
AuthorizationRoles currentUserRoles = UserRolesFromContext.Roles(HttpContextItems);
|
AuthorizationRoles currentUserRoles = UserRolesFromContext.Roles(HttpContextItems);
|
||||||
long currentUserId = UserIdFromContext.Id(HttpContextItems);
|
long currentUserId = UserIdFromContext.Id(HttpContextItems);
|
||||||
return HasDeleteRole(currentUserRoles, objectType);
|
return HasDeleteRole(currentUserRoles, aType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -208,12 +208,12 @@ namespace AyaNova.Api.ControllerHelpers
|
|||||||
/// DELETE
|
/// DELETE
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="currentUserRoles"></param>
|
/// <param name="currentUserRoles"></param>
|
||||||
/// <param name="objectType"></param>
|
/// <param name="aType"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
//For now just going to treat as a modify, but for maximum flexibility keeping this as a separate method in case we change our minds in future
|
//For now just going to treat as a modify, but for maximum flexibility keeping this as a separate method in case we change our minds in future
|
||||||
internal static bool HasDeleteRole(AuthorizationRoles currentUserRoles, AyaType objectType)
|
internal static bool HasDeleteRole(AuthorizationRoles currentUserRoles, AyaType aType)
|
||||||
{
|
{
|
||||||
var RoleSet = BizRoles.GetRoleSet(objectType);
|
var RoleSet = BizRoles.GetRoleSet(aType);
|
||||||
if (RoleSet == null) return false;
|
if (RoleSet == null) return false;
|
||||||
if (currentUserRoles.HasAnyFlags(RoleSet.Change))
|
if (currentUserRoles.HasAnyFlags(RoleSet.Change))
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
|
|
||||||
long UserId = UserIdFromContext.Id(HttpContext.Items);
|
long UserId = UserIdFromContext.Id(HttpContext.Items);
|
||||||
|
|
||||||
if (!Authorized.HasModifyRole(HttpContext.Items, dbObject.AttachToObjectType))
|
if (!Authorized.HasModifyRole(HttpContext.Items, dbObject.AttachToAType))
|
||||||
{
|
{
|
||||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||||
}
|
}
|
||||||
@@ -115,7 +115,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
ct.Entry(dbObject).OriginalValues["Concurrency"] = inObj.Concurrency;
|
ct.Entry(dbObject).OriginalValues["Concurrency"] = inObj.Concurrency;
|
||||||
|
|
||||||
//Log event and save context
|
//Log event and save context
|
||||||
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, dbObject.AttachToObjectId, dbObject.AttachToObjectType, AyaEvent.AttachmentModified, ChangeTextra), ct);
|
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, dbObject.AttachToObjectId, dbObject.AttachToAType, AyaEvent.AttachmentModified, ChangeTextra), ct);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -133,7 +133,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Normallyh wouldn't return a whole list but in this case the UI demands it because of reactivity issues
|
//Normallyh wouldn't return a whole list but in this case the UI demands it because of reactivity issues
|
||||||
var ret = await GetFileListForObjectAsync(dbObject.AttachToObjectType, dbObject.AttachToObjectId);
|
var ret = await GetFileListForObjectAsync(dbObject.AttachToAType, dbObject.AttachToObjectId);
|
||||||
return Ok(ApiOkResponse.Response(ret));
|
return Ok(ApiOkResponse.Response(ret));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -189,7 +189,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
return NotFound();
|
return NotFound();
|
||||||
|
|
||||||
|
|
||||||
return Ok(ApiOkResponse.Response(new { id = at.AttachToObjectId, type = at.AttachToObjectType }));
|
return Ok(ApiOkResponse.Response(new { id = at.AttachToObjectId, type = at.AttachToAType }));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -224,7 +224,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
|
|
||||||
|
|
||||||
bool badRequest = false;
|
bool badRequest = false;
|
||||||
string AttachToObjectType = string.Empty;
|
string AttachToAType = string.Empty;
|
||||||
string AttachToObjectId = string.Empty;
|
string AttachToObjectId = string.Empty;
|
||||||
string errorMessage = string.Empty;
|
string errorMessage = string.Empty;
|
||||||
string Notes = string.Empty;
|
string Notes = string.Empty;
|
||||||
@@ -239,15 +239,15 @@ namespace AyaNova.Api.Controllers
|
|||||||
|
|
||||||
if (!badRequest
|
if (!badRequest
|
||||||
&& (!uploadFormData.FormFieldData.ContainsKey("FileData")
|
&& (!uploadFormData.FormFieldData.ContainsKey("FileData")
|
||||||
|| !uploadFormData.FormFieldData.ContainsKey("AttachToObjectType")
|
|| !uploadFormData.FormFieldData.ContainsKey("AttachToAType")
|
||||||
|| !uploadFormData.FormFieldData.ContainsKey("AttachToObjectId")))
|
|| !uploadFormData.FormFieldData.ContainsKey("AttachToObjectId")))
|
||||||
{
|
{
|
||||||
badRequest = true;
|
badRequest = true;
|
||||||
errorMessage = "Missing one or more required FormFieldData values: AttachToObjectType, AttachToObjectId, FileData";
|
errorMessage = "Missing one or more required FormFieldData values: AttachToAType, AttachToObjectId, FileData";
|
||||||
}
|
}
|
||||||
if (!badRequest)
|
if (!badRequest)
|
||||||
{
|
{
|
||||||
AttachToObjectType = uploadFormData.FormFieldData["AttachToObjectType"].ToString();
|
AttachToAType = uploadFormData.FormFieldData["AttachToAType"].ToString();
|
||||||
AttachToObjectId = uploadFormData.FormFieldData["AttachToObjectId"].ToString();
|
AttachToObjectId = uploadFormData.FormFieldData["AttachToObjectId"].ToString();
|
||||||
if (uploadFormData.FormFieldData.ContainsKey("Notes"))
|
if (uploadFormData.FormFieldData.ContainsKey("Notes"))
|
||||||
Notes = uploadFormData.FormFieldData["Notes"].ToString();
|
Notes = uploadFormData.FormFieldData["Notes"].ToString();
|
||||||
@@ -255,10 +255,10 @@ namespace AyaNova.Api.Controllers
|
|||||||
//"[{\"name\":\"Client.csv\",\"lastModified\":1582822079618},{\"name\":\"wmi4fu06nrs41.jpg\",\"lastModified\":1586900220990}]"
|
//"[{\"name\":\"Client.csv\",\"lastModified\":1582822079618},{\"name\":\"wmi4fu06nrs41.jpg\",\"lastModified\":1586900220990}]"
|
||||||
FileData = Newtonsoft.Json.JsonConvert.DeserializeObject<List<UploadFileData>>(uploadFormData.FormFieldData["FileData"].ToString());
|
FileData = Newtonsoft.Json.JsonConvert.DeserializeObject<List<UploadFileData>>(uploadFormData.FormFieldData["FileData"].ToString());
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(AttachToObjectType) || string.IsNullOrWhiteSpace(AttachToObjectId))
|
if (string.IsNullOrWhiteSpace(AttachToAType) || string.IsNullOrWhiteSpace(AttachToObjectId))
|
||||||
{
|
{
|
||||||
badRequest = true;
|
badRequest = true;
|
||||||
errorMessage = "AttachToObjectType and / or AttachToObjectId are empty and are required";
|
errorMessage = "AttachToAType and / or AttachToObjectId are empty and are required";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -267,11 +267,11 @@ namespace AyaNova.Api.Controllers
|
|||||||
|
|
||||||
if (!badRequest)
|
if (!badRequest)
|
||||||
{
|
{
|
||||||
attachToObject = new AyaTypeId(AttachToObjectType, AttachToObjectId);
|
attachToObject = new AyaTypeId(AttachToAType, AttachToObjectId);
|
||||||
if (attachToObject.IsEmpty)
|
if (attachToObject.IsEmpty)
|
||||||
{
|
{
|
||||||
badRequest = true;
|
badRequest = true;
|
||||||
errorMessage = "AttachToObjectType and / or AttachToObjectId are not valid and are required";
|
errorMessage = "AttachToAType and / or AttachToObjectId are not valid and are required";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -281,7 +281,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
if (!attachToObject.IsCoreBizObject)
|
if (!attachToObject.IsCoreBizObject)
|
||||||
{
|
{
|
||||||
badRequest = true;
|
badRequest = true;
|
||||||
errorMessage = attachToObject.ObjectType.ToString() + " - AttachToObjectType does not support attachments";
|
errorMessage = attachToObject.AType.ToString() + " - AttachToAType does not support attachments";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -290,7 +290,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
if (!badRequest)
|
if (!badRequest)
|
||||||
{
|
{
|
||||||
//check if object exists
|
//check if object exists
|
||||||
if (!await BizObjectExistsInDatabase.ExistsAsync(attachToObject.ObjectType, attachToObject.ObjectId, ct))
|
if (!await BizObjectExistsInDatabase.ExistsAsync(attachToObject.AType, attachToObject.ObjectId, ct))
|
||||||
{
|
{
|
||||||
badRequest = true;
|
badRequest = true;
|
||||||
errorMessage = "Invalid attach object";
|
errorMessage = "Invalid attach object";
|
||||||
@@ -298,7 +298,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// User needs modify rights to the object type in question
|
// User needs modify rights to the object type in question
|
||||||
if (!Authorized.HasModifyRole(HttpContext.Items, attachToObject.ObjectType))
|
if (!Authorized.HasModifyRole(HttpContext.Items, attachToObject.AType))
|
||||||
{
|
{
|
||||||
//delete temp files
|
//delete temp files
|
||||||
ApiUploadProcessor.DeleteTempUploadFile(uploadFormData);
|
ApiUploadProcessor.DeleteTempUploadFile(uploadFormData);
|
||||||
@@ -354,7 +354,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
var v = await FileUtil.StoreFileAttachmentAsync(a.InitialUploadedPathName, a.MimeType, a.OriginalFileName, theDate, attachToObject, Notes, ct);
|
var v = await FileUtil.StoreFileAttachmentAsync(a.InitialUploadedPathName, a.MimeType, a.OriginalFileName, theDate, attachToObject, Notes, ct);
|
||||||
|
|
||||||
//EVENT LOG
|
//EVENT LOG
|
||||||
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, attachToObject.ObjectId, attachToObject.ObjectType, AyaEvent.AttachmentCreate, v.DisplayFileName), ct);
|
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, attachToObject.ObjectId, attachToObject.AType, AyaEvent.AttachmentCreate, v.DisplayFileName), ct);
|
||||||
|
|
||||||
//SEARCH INDEXING
|
//SEARCH INDEXING
|
||||||
var SearchParams = new Search.SearchIndexProcessObjectParameters(UserTranslationIdFromContext.Id(HttpContext.Items), v.Id, AyaType.FileAttachment);
|
var SearchParams = new Search.SearchIndexProcessObjectParameters(UserTranslationIdFromContext.Id(HttpContext.Items), v.Id, AyaType.FileAttachment);
|
||||||
@@ -363,7 +363,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ret = await GetFileListForObjectAsync(attachToObject.ObjectType, attachToObject.ObjectId);
|
ret = await GetFileListForObjectAsync(attachToObject.AType, attachToObject.ObjectId);
|
||||||
}
|
}
|
||||||
catch (InvalidDataException ex)
|
catch (InvalidDataException ex)
|
||||||
{
|
{
|
||||||
@@ -415,7 +415,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
|
|
||||||
long UserId = UserIdFromContext.Id(HttpContext.Items);
|
long UserId = UserIdFromContext.Id(HttpContext.Items);
|
||||||
|
|
||||||
if (!Authorized.HasDeleteRole(HttpContext.Items, dbObject.AttachToObjectType))
|
if (!Authorized.HasDeleteRole(HttpContext.Items, dbObject.AttachToAType))
|
||||||
{
|
{
|
||||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||||
}
|
}
|
||||||
@@ -425,7 +425,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
await FileUtil.DeleteFileAttachmentAsync(dbObject, ct);
|
await FileUtil.DeleteFileAttachmentAsync(dbObject, ct);
|
||||||
|
|
||||||
//Event log process delete
|
//Event log process delete
|
||||||
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, dbObject.AttachToObjectId, dbObject.AttachToObjectType, AyaEvent.AttachmentDelete, dbObject.DisplayFileName), ct);
|
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, dbObject.AttachToObjectId, dbObject.AttachToAType, AyaEvent.AttachmentDelete, dbObject.DisplayFileName), ct);
|
||||||
|
|
||||||
//Delete search index
|
//Delete search index
|
||||||
await Search.ProcessDeletedObjectKeywordsAsync(dbObject.Id, AyaType.FileAttachment, ct);
|
await Search.ProcessDeletedObjectKeywordsAsync(dbObject.Id, AyaType.FileAttachment, ct);
|
||||||
@@ -461,7 +461,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
await FileUtil.DeleteFileAttachmentAsync(dbObject, ct);
|
await FileUtil.DeleteFileAttachmentAsync(dbObject, ct);
|
||||||
|
|
||||||
//Event log process delete
|
//Event log process delete
|
||||||
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, dbObject.AttachToObjectId, dbObject.AttachToObjectType, AyaEvent.AttachmentDelete, dbObject.DisplayFileName), ct);
|
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, dbObject.AttachToObjectId, dbObject.AttachToAType, AyaEvent.AttachmentDelete, dbObject.DisplayFileName), ct);
|
||||||
|
|
||||||
//Delete search index
|
//Delete search index
|
||||||
await Search.ProcessDeletedObjectKeywordsAsync(dbObject.Id, AyaType.FileAttachment, ct);
|
await Search.ProcessDeletedObjectKeywordsAsync(dbObject.Id, AyaType.FileAttachment, ct);
|
||||||
@@ -495,13 +495,13 @@ namespace AyaNova.Api.Controllers
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
//do the move
|
//do the move
|
||||||
var msg = $"{dbObject.DisplayFileName} moved from {dbObject.AttachToObjectType}-{dbObject.AttachToObjectId} to {dt.ToType}-{dt.ToId} ";
|
var msg = $"{dbObject.DisplayFileName} moved from {dbObject.AttachToAType}-{dbObject.AttachToObjectId} to {dt.ToType}-{dt.ToId} ";
|
||||||
dbObject.AttachToObjectId = dt.ToId;
|
dbObject.AttachToObjectId = dt.ToId;
|
||||||
dbObject.AttachToObjectType = dt.ToType;
|
dbObject.AttachToAType = dt.ToType;
|
||||||
await ct.SaveChangesAsync();
|
await ct.SaveChangesAsync();
|
||||||
|
|
||||||
//Event log process move
|
//Event log process move
|
||||||
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, dbObject.AttachToObjectId, dbObject.AttachToObjectType, AyaEvent.AttachmentModified, msg), ct);
|
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, dbObject.AttachToObjectId, dbObject.AttachToAType, AyaEvent.AttachmentModified, msg), ct);
|
||||||
|
|
||||||
}
|
}
|
||||||
return NoContent();
|
return NoContent();
|
||||||
@@ -546,7 +546,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
//is this allowed?
|
//is this allowed?
|
||||||
if (!Authorized.HasReadFullRole(DownloadUser.Roles, dbObject.AttachToObjectType))
|
if (!Authorized.HasReadFullRole(DownloadUser.Roles, dbObject.AttachToAType))
|
||||||
{
|
{
|
||||||
await Task.Delay(AyaNova.Util.ServerBootConfig.FAILED_AUTH_DELAY);//DOS protection
|
await Task.Delay(AyaNova.Util.ServerBootConfig.FAILED_AUTH_DELAY);//DOS protection
|
||||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||||
@@ -568,7 +568,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Log
|
//Log
|
||||||
await EventLogProcessor.LogEventToDatabaseAsync(new Event(DownloadUser.Id, dbObject.AttachToObjectId, dbObject.AttachToObjectType, AyaEvent.AttachmentDownload, dbObject.DisplayFileName), ct);
|
await EventLogProcessor.LogEventToDatabaseAsync(new Event(DownloadUser.Id, dbObject.AttachToObjectId, dbObject.AttachToAType, AyaEvent.AttachmentDownload, dbObject.DisplayFileName), ct);
|
||||||
|
|
||||||
return PhysicalFile(filePath, mimetype, dbObject.DisplayFileName);
|
return PhysicalFile(filePath, mimetype, dbObject.DisplayFileName);
|
||||||
|
|
||||||
@@ -579,7 +579,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
|
|
||||||
async private Task<object> GetFileListForObjectAsync(AyaType ayaType, long ayaId)
|
async private Task<object> GetFileListForObjectAsync(AyaType ayaType, long ayaId)
|
||||||
{
|
{
|
||||||
return await ct.FileAttachment.AsNoTracking().Where(z => z.AttachToObjectId == ayaId && z.AttachToObjectType == ayaType).OrderBy(z => z.DisplayFileName)
|
return await ct.FileAttachment.AsNoTracking().Where(z => z.AttachToObjectId == ayaId && z.AttachToAType == ayaType).OrderBy(z => z.DisplayFileName)
|
||||||
.Select(z => new { z.Id, z.Concurrency, z.ContentType, z.DisplayFileName, z.LastModified, z.Notes })
|
.Select(z => new { z.Id, z.Concurrency, z.ContentType, z.DisplayFileName, z.LastModified, z.Notes })
|
||||||
.ToArrayAsync();
|
.ToArrayAsync();
|
||||||
// var v = l.OrderBy(z => z.DisplayFileName);
|
// var v = l.OrderBy(z => z.DisplayFileName);
|
||||||
@@ -604,7 +604,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
var JobName = $"Attachment maintenance (demand) LT:User {UserNameFromContext.Name(HttpContext.Items)}";
|
var JobName = $"Attachment maintenance (demand) LT:User {UserNameFromContext.Name(HttpContext.Items)}";
|
||||||
OpsJob j = new OpsJob();
|
OpsJob j = new OpsJob();
|
||||||
j.Name = JobName;
|
j.Name = JobName;
|
||||||
j.ObjectType = AyaType.FileAttachment;
|
j.AType = AyaType.FileAttachment;
|
||||||
j.JobType = JobType.AttachmentMaintenance;
|
j.JobType = JobType.AttachmentMaintenance;
|
||||||
j.SubType = JobSubType.NotSet;
|
j.SubType = JobSubType.NotSet;
|
||||||
j.Exclusive = true;
|
j.Exclusive = true;
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
var JobName = $"LT:BackupNow LT:User {UserNameFromContext.Name(HttpContext.Items)}";
|
var JobName = $"LT:BackupNow LT:User {UserNameFromContext.Name(HttpContext.Items)}";
|
||||||
OpsJob j = new OpsJob();
|
OpsJob j = new OpsJob();
|
||||||
j.Name = JobName;
|
j.Name = JobName;
|
||||||
j.ObjectType = AyaType.NoType;
|
j.AType = AyaType.NoType;
|
||||||
j.JobType = JobType.Backup;
|
j.JobType = JobType.Backup;
|
||||||
j.SubType = JobSubType.NotSet;
|
j.SubType = JobSubType.NotSet;
|
||||||
j.Exclusive = true;
|
j.Exclusive = true;
|
||||||
|
|||||||
@@ -184,9 +184,9 @@ namespace AyaNova.Api.Controllers
|
|||||||
|
|
||||||
public sealed class UserEventLogItem
|
public sealed class UserEventLogItem
|
||||||
{
|
{
|
||||||
//DateTime, ObjectType, ObjectId, Event, Textra
|
//DateTime, AType, ObjectId, Event, Textra
|
||||||
public DateTime Date { get; set; }
|
public DateTime Date { get; set; }
|
||||||
public AyaType ObjectType { get; set; }
|
public AyaType AType { get; set; }
|
||||||
public long ObjectId { get; set; }
|
public long ObjectId { get; set; }
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public AyaEvent Event { get; set; }
|
public AyaEvent Event { get; set; }
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
if (selectedRequest == null)
|
if (selectedRequest == null)
|
||||||
return BadRequest(new ApiErrorResponse(ApiErrorCode.VALIDATION_REQUIRED, null, "DataListSelectedRequest is required"));
|
return BadRequest(new ApiErrorResponse(ApiErrorCode.VALIDATION_REQUIRED, null, "DataListSelectedRequest is required"));
|
||||||
|
|
||||||
if (!Authorized.HasReadFullRole(HttpContext.Items, selectedRequest.ObjectType))
|
if (!Authorized.HasReadFullRole(HttpContext.Items, selectedRequest.AType))
|
||||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(format))
|
if (string.IsNullOrWhiteSpace(format))
|
||||||
@@ -86,12 +86,12 @@ namespace AyaNova.Api.Controllers
|
|||||||
UserTranslationId);
|
UserTranslationId);
|
||||||
|
|
||||||
|
|
||||||
log.LogDebug($"Instantiating biz object handler for {selectedRequest.ObjectType}");
|
log.LogDebug($"Instantiating biz object handler for {selectedRequest.AType}");
|
||||||
var biz = BizObjectFactory.GetBizObject(selectedRequest.ObjectType, ct, UserId, UserRoles, UserTranslationId);
|
var biz = BizObjectFactory.GetBizObject(selectedRequest.AType, ct, UserId, UserRoles, UserTranslationId);
|
||||||
log.LogDebug($"Fetching data for {selectedRequest.SelectedRowIds.Length} {selectedRequest.ObjectType} items");
|
log.LogDebug($"Fetching data for {selectedRequest.SelectedRowIds.Length} {selectedRequest.AType} items");
|
||||||
// var TheData = await ((IExportAbleObject)biz).GetJSONExportData(dataListSelection.SelectedRowIds);
|
// var TheData = await ((IExportAbleObject)biz).GetJSONExportData(dataListSelection.SelectedRowIds);
|
||||||
|
|
||||||
string baseFileName = FileUtil.StringToSafeFileName($"{selectedRequest.ObjectType.ToString().ToLowerInvariant()}-{format}-{FileUtil.GetSafeDateFileName()}");
|
string baseFileName = FileUtil.StringToSafeFileName($"{selectedRequest.AType.ToString().ToLowerInvariant()}-{format}-{FileUtil.GetSafeDateFileName()}");
|
||||||
|
|
||||||
// string outputRandomFileNameNoExtension = StringUtil.ReplaceLastOccurrence(FileUtil.NewRandomFileName, ".", "");
|
// string outputRandomFileNameNoExtension = StringUtil.ReplaceLastOccurrence(FileUtil.NewRandomFileName, ".", "");
|
||||||
string outputSourceFileName = baseFileName + "." + format;
|
string outputSourceFileName = baseFileName + "." + format;
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
// uploadFormData = await ApiUploadProcessor.ProcessUploadAsync(HttpContext);xx
|
// uploadFormData = await ApiUploadProcessor.ProcessUploadAsync(HttpContext);xx
|
||||||
|
|
||||||
|
|
||||||
string UploadObjectType = string.Empty;
|
string UploadAType = string.Empty;
|
||||||
|
|
||||||
string errorMessage = string.Empty;
|
string errorMessage = string.Empty;
|
||||||
string Notes = string.Empty;
|
string Notes = string.Empty;
|
||||||
@@ -100,10 +100,10 @@ namespace AyaNova.Api.Controllers
|
|||||||
return BadRequest(new ApiErrorResponse(ApiErrorCode.INVALID_OPERATION, null, "Missing required FormFieldData value: FileData"));
|
return BadRequest(new ApiErrorResponse(ApiErrorCode.INVALID_OPERATION, null, "Missing required FormFieldData value: FileData"));
|
||||||
|
|
||||||
|
|
||||||
if (uploadFormData.FormFieldData.ContainsKey("ObjectType"))
|
if (uploadFormData.FormFieldData.ContainsKey("AType"))
|
||||||
UploadObjectType = uploadFormData.FormFieldData["ObjectType"].ToString();
|
UploadAType = uploadFormData.FormFieldData["AType"].ToString();
|
||||||
else
|
else
|
||||||
return BadRequest(new ApiErrorResponse(ApiErrorCode.INVALID_OPERATION, null, "Missing required FormFieldData value: ObjectType"));
|
return BadRequest(new ApiErrorResponse(ApiErrorCode.INVALID_OPERATION, null, "Missing required FormFieldData value: AType"));
|
||||||
|
|
||||||
//fileData in JSON stringify format which contains the actual last modified dates etc
|
//fileData in JSON stringify format which contains the actual last modified dates etc
|
||||||
//"[{\"name\":\"Client.csv\",\"lastModified\":1582822079618},{\"name\":\"wmi4fu06nrs41.jpg\",\"lastModified\":1586900220990}]"
|
//"[{\"name\":\"Client.csv\",\"lastModified\":1582822079618},{\"name\":\"wmi4fu06nrs41.jpg\",\"lastModified\":1586900220990}]"
|
||||||
@@ -112,7 +112,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
|
|
||||||
|
|
||||||
//Instantiate the business object handler
|
//Instantiate the business object handler
|
||||||
AyaType TheType = System.Enum.Parse<AyaType>(UploadObjectType, true);
|
AyaType TheType = System.Enum.Parse<AyaType>(UploadAType, true);
|
||||||
log.LogDebug($"Instantiating biz object handler for {TheType}");
|
log.LogDebug($"Instantiating biz object handler for {TheType}");
|
||||||
var biz = BizObjectFactory.GetBizObject(TheType, ct);
|
var biz = BizObjectFactory.GetBizObject(TheType, ct);
|
||||||
|
|
||||||
|
|||||||
@@ -207,7 +207,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
return BadRequest(new ApiErrorResponse(ApiErrorCode.VALIDATION_REQUIRED, null, "DataListSelectedRequest is required"));
|
return BadRequest(new ApiErrorResponse(ApiErrorCode.VALIDATION_REQUIRED, null, "DataListSelectedRequest is required"));
|
||||||
|
|
||||||
|
|
||||||
if (!Authorized.HasDeleteRole(HttpContext.Items, selectedRequest.ObjectType))
|
if (!Authorized.HasDeleteRole(HttpContext.Items, selectedRequest.AType))
|
||||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||||
|
|
||||||
//Rehydrate id list if necessary
|
//Rehydrate id list if necessary
|
||||||
@@ -220,7 +220,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
UserIdFromContext.Id(HttpContext.Items),
|
UserIdFromContext.Id(HttpContext.Items),
|
||||||
UserTranslationIdFromContext.Id(HttpContext.Items));
|
UserTranslationIdFromContext.Id(HttpContext.Items));
|
||||||
|
|
||||||
var JobName = $"LT:BatchDeleteJob - LT:{selectedRequest.ObjectType} ({selectedRequest.SelectedRowIds.LongLength}) LT:User {UserNameFromContext.Name(HttpContext.Items)}";
|
var JobName = $"LT:BatchDeleteJob - LT:{selectedRequest.AType} ({selectedRequest.SelectedRowIds.LongLength}) LT:User {UserNameFromContext.Name(HttpContext.Items)}";
|
||||||
JObject o = JObject.FromObject(new
|
JObject o = JObject.FromObject(new
|
||||||
{
|
{
|
||||||
idList = selectedRequest.SelectedRowIds
|
idList = selectedRequest.SelectedRowIds
|
||||||
@@ -228,7 +228,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
|
|
||||||
OpsJob j = new OpsJob();
|
OpsJob j = new OpsJob();
|
||||||
j.Name = JobName;
|
j.Name = JobName;
|
||||||
j.ObjectType = selectedRequest.ObjectType;
|
j.AType = selectedRequest.AType;
|
||||||
j.JobType = JobType.BatchCoreObjectOperation;
|
j.JobType = JobType.BatchCoreObjectOperation;
|
||||||
j.SubType = JobSubType.Delete;
|
j.SubType = JobSubType.Delete;
|
||||||
j.Exclusive = false;
|
j.Exclusive = false;
|
||||||
|
|||||||
@@ -40,22 +40,22 @@ namespace AyaNova.Api.Controllers
|
|||||||
/// not all business objects have names some may return '-' or simply the type name
|
/// not all business objects have names some may return '-' or simply the type name
|
||||||
/// if that is the case
|
/// if that is the case
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="ayType">AyaType</param>
|
/// <param name="aType">AyaType</param>
|
||||||
/// <param name="id">Non zero id, if zero returns type name</param>
|
/// <param name="id">Non zero id, if zero returns type name</param>
|
||||||
/// <returns>Name</returns>
|
/// <returns>Name</returns>
|
||||||
[HttpGet("{ayType}/{id}")]
|
[HttpGet("{aType}/{id}")]
|
||||||
public ActionResult GetName([FromRoute] AyaType ayType, [FromRoute] long id)
|
public ActionResult GetName([FromRoute] AyaType aType, [FromRoute] long id)
|
||||||
{
|
{
|
||||||
if (!serverState.IsOpen)
|
if (!serverState.IsOpen)
|
||||||
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
|
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
|
||||||
if (!Authorized.HasSelectRole(HttpContext.Items, ayType))
|
if (!Authorized.HasSelectRole(HttpContext.Items, aType))
|
||||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||||
if (!ModelState.IsValid)
|
if (!ModelState.IsValid)
|
||||||
return BadRequest(new ApiErrorResponse(ModelState));
|
return BadRequest(new ApiErrorResponse(ModelState));
|
||||||
if (id == 0)
|
if (id == 0)
|
||||||
return Ok(ApiOkResponse.Response(ayType.ToString()));
|
return Ok(ApiOkResponse.Response(aType.ToString()));
|
||||||
|
|
||||||
return Ok(ApiOkResponse.Response(BizObjectNameFetcherDirect.Name(ayType, id, ct)));
|
return Ok(ApiOkResponse.Response(BizObjectNameFetcherDirect.Name(aType, id, ct)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -160,10 +160,10 @@ namespace AyaNova.Api.Controllers
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get Report list for object
|
/// Get Report list for object
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="ayType">Type of object</param>
|
/// <param name="aType">Type of object</param>
|
||||||
/// <returns>Name / id report list of allowed reports for role of requester</returns>
|
/// <returns>Name / id report list of allowed reports for role of requester</returns>
|
||||||
[HttpGet("list/{ayType}")]
|
[HttpGet("list/{aType}")]
|
||||||
public async Task<IActionResult> GetReportList([FromRoute] AyaType ayType)
|
public async Task<IActionResult> GetReportList([FromRoute] AyaType aType)
|
||||||
{
|
{
|
||||||
if (!serverState.IsOpen)
|
if (!serverState.IsOpen)
|
||||||
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
|
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
|
||||||
@@ -171,11 +171,11 @@ namespace AyaNova.Api.Controllers
|
|||||||
if (!Authorized.HasReadFullRole(HttpContext.Items, biz.BizType))
|
if (!Authorized.HasReadFullRole(HttpContext.Items, biz.BizType))
|
||||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||||
//extra check if they have rights to the type of object in question, this nips it in the bud before they even get to the fetch data stage later
|
//extra check if they have rights to the type of object in question, this nips it in the bud before they even get to the fetch data stage later
|
||||||
if (!Authorized.HasReadFullRole(HttpContext.Items, ayType))
|
if (!Authorized.HasReadFullRole(HttpContext.Items, aType))
|
||||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||||
if (!ModelState.IsValid)
|
if (!ModelState.IsValid)
|
||||||
return BadRequest(new ApiErrorResponse(ModelState));
|
return BadRequest(new ApiErrorResponse(ModelState));
|
||||||
var o = await biz.GetReportListAsync(ayType);
|
var o = await biz.GetReportListAsync(aType);
|
||||||
if (o == null) return NotFound(new ApiErrorResponse(ApiErrorCode.NOT_FOUND));
|
if (o == null) return NotFound(new ApiErrorResponse(ApiErrorCode.NOT_FOUND));
|
||||||
return Ok(ApiOkResponse.Response(o));
|
return Ok(ApiOkResponse.Response(o));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
case AyaType.WorkOrderItemTask:
|
case AyaType.WorkOrderItemTask:
|
||||||
case AyaType.WorkOrderItemTravel:
|
case AyaType.WorkOrderItemTravel:
|
||||||
AyaTypeId TypeId = await WorkOrderBiz.GetAncestor(ayaType, id, ct);
|
AyaTypeId TypeId = await WorkOrderBiz.GetAncestor(ayaType, id, ct);
|
||||||
return Ok(ApiOkResponse.Response(new { AyaType = TypeId.ObjectTypeAsInt, Id = TypeId.ObjectId }));
|
return Ok(ApiOkResponse.Response(new { AyaType = TypeId.ATypeAsInt, Id = TypeId.ObjectId }));
|
||||||
default:
|
default:
|
||||||
return BadRequest(new ApiErrorResponse(ApiErrorCode.VALIDATION_INVALID_VALUE, null, "Only types with ancestors are valid"));
|
return BadRequest(new ApiErrorResponse(ApiErrorCode.VALIDATION_INVALID_VALUE, null, "Only types with ancestors are valid"));
|
||||||
|
|
||||||
|
|||||||
@@ -90,10 +90,10 @@ namespace AyaNova.Api.Controllers
|
|||||||
if (!ModelState.IsValid)
|
if (!ModelState.IsValid)
|
||||||
return BadRequest(new ApiErrorResponse(ModelState));
|
return BadRequest(new ApiErrorResponse(ModelState));
|
||||||
|
|
||||||
if (!selectedRequest.ObjectType.HasAttribute(typeof(CoreBizObjectAttribute)))
|
if (!selectedRequest.AType.HasAttribute(typeof(CoreBizObjectAttribute)))
|
||||||
return BadRequest(new ApiErrorResponse(ApiErrorCode.INVALID_OPERATION, null, "Not a taggable object type"));
|
return BadRequest(new ApiErrorResponse(ApiErrorCode.INVALID_OPERATION, null, "Not a taggable object type"));
|
||||||
|
|
||||||
if (!Authorized.HasModifyRole(HttpContext.Items, selectedRequest.ObjectType))
|
if (!Authorized.HasModifyRole(HttpContext.Items, selectedRequest.AType))
|
||||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||||
|
|
||||||
tag = TagBiz.NormalizeTag(tag);
|
tag = TagBiz.NormalizeTag(tag);
|
||||||
@@ -110,7 +110,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
UserIdFromContext.Id(HttpContext.Items),
|
UserIdFromContext.Id(HttpContext.Items),
|
||||||
UserTranslationIdFromContext.Id(HttpContext.Items));
|
UserTranslationIdFromContext.Id(HttpContext.Items));
|
||||||
|
|
||||||
var JobName = $"LT:BatchJob LT:Add LT:Tag \"{tag}\" LT:{selectedRequest.ObjectType} ({selectedRequest.SelectedRowIds.LongLength}) LT:User {UserNameFromContext.Name(HttpContext.Items)}";
|
var JobName = $"LT:BatchJob LT:Add LT:Tag \"{tag}\" LT:{selectedRequest.AType} ({selectedRequest.SelectedRowIds.LongLength}) LT:User {UserNameFromContext.Name(HttpContext.Items)}";
|
||||||
JObject o = JObject.FromObject(new
|
JObject o = JObject.FromObject(new
|
||||||
{
|
{
|
||||||
idList = selectedRequest.SelectedRowIds,
|
idList = selectedRequest.SelectedRowIds,
|
||||||
@@ -119,7 +119,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
|
|
||||||
OpsJob j = new OpsJob();
|
OpsJob j = new OpsJob();
|
||||||
j.Name = JobName;
|
j.Name = JobName;
|
||||||
j.ObjectType = selectedRequest.ObjectType;
|
j.AType = selectedRequest.AType;
|
||||||
j.JobType = JobType.BatchCoreObjectOperation;
|
j.JobType = JobType.BatchCoreObjectOperation;
|
||||||
j.SubType = JobSubType.TagAdd;
|
j.SubType = JobSubType.TagAdd;
|
||||||
j.Exclusive = false;
|
j.Exclusive = false;
|
||||||
@@ -159,7 +159,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
|
|
||||||
OpsJob j = new OpsJob();
|
OpsJob j = new OpsJob();
|
||||||
j.Name = JobName;
|
j.Name = JobName;
|
||||||
j.ObjectType = ayaType;
|
j.AType = ayaType;
|
||||||
j.JobType = JobType.BatchCoreObjectOperation;
|
j.JobType = JobType.BatchCoreObjectOperation;
|
||||||
j.SubType = JobSubType.TagAddAny;
|
j.SubType = JobSubType.TagAddAny;
|
||||||
j.Exclusive = false;
|
j.Exclusive = false;
|
||||||
@@ -183,9 +183,9 @@ namespace AyaNova.Api.Controllers
|
|||||||
if (!ModelState.IsValid)
|
if (!ModelState.IsValid)
|
||||||
return BadRequest(new ApiErrorResponse(ModelState));
|
return BadRequest(new ApiErrorResponse(ModelState));
|
||||||
|
|
||||||
if (!selectedRequest.ObjectType.HasAttribute(typeof(CoreBizObjectAttribute)))
|
if (!selectedRequest.AType.HasAttribute(typeof(CoreBizObjectAttribute)))
|
||||||
return BadRequest(new ApiErrorResponse(ApiErrorCode.INVALID_OPERATION, null, "Not a taggable object type"));
|
return BadRequest(new ApiErrorResponse(ApiErrorCode.INVALID_OPERATION, null, "Not a taggable object type"));
|
||||||
if (!Authorized.HasModifyRole(HttpContext.Items, selectedRequest.ObjectType))
|
if (!Authorized.HasModifyRole(HttpContext.Items, selectedRequest.AType))
|
||||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||||
|
|
||||||
tag = TagBiz.NormalizeTag(tag);
|
tag = TagBiz.NormalizeTag(tag);
|
||||||
@@ -202,7 +202,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
UserIdFromContext.Id(HttpContext.Items),
|
UserIdFromContext.Id(HttpContext.Items),
|
||||||
UserTranslationIdFromContext.Id(HttpContext.Items));
|
UserTranslationIdFromContext.Id(HttpContext.Items));
|
||||||
|
|
||||||
var JobName = $"LT:BatchJob LT:Remove LT:Tag \"{tag}\" LT:{selectedRequest.ObjectType} ({selectedRequest.SelectedRowIds.LongLength}) LT:User {UserNameFromContext.Name(HttpContext.Items)}";
|
var JobName = $"LT:BatchJob LT:Remove LT:Tag \"{tag}\" LT:{selectedRequest.AType} ({selectedRequest.SelectedRowIds.LongLength}) LT:User {UserNameFromContext.Name(HttpContext.Items)}";
|
||||||
JObject o = JObject.FromObject(new
|
JObject o = JObject.FromObject(new
|
||||||
{
|
{
|
||||||
idList = selectedRequest.SelectedRowIds,
|
idList = selectedRequest.SelectedRowIds,
|
||||||
@@ -211,7 +211,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
|
|
||||||
OpsJob j = new OpsJob();
|
OpsJob j = new OpsJob();
|
||||||
j.Name = JobName;
|
j.Name = JobName;
|
||||||
j.ObjectType = selectedRequest.ObjectType;
|
j.AType = selectedRequest.AType;
|
||||||
j.JobType = JobType.BatchCoreObjectOperation;
|
j.JobType = JobType.BatchCoreObjectOperation;
|
||||||
j.SubType = JobSubType.TagRemove;
|
j.SubType = JobSubType.TagRemove;
|
||||||
j.Exclusive = false;
|
j.Exclusive = false;
|
||||||
@@ -252,7 +252,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
|
|
||||||
OpsJob j = new OpsJob();
|
OpsJob j = new OpsJob();
|
||||||
j.Name = JobName;
|
j.Name = JobName;
|
||||||
j.ObjectType = ayaType;
|
j.AType = ayaType;
|
||||||
j.SubType = JobSubType.TagRemoveAny;
|
j.SubType = JobSubType.TagRemoveAny;
|
||||||
j.JobType = JobType.BatchCoreObjectOperation;
|
j.JobType = JobType.BatchCoreObjectOperation;
|
||||||
j.Exclusive = false;
|
j.Exclusive = false;
|
||||||
@@ -278,9 +278,9 @@ namespace AyaNova.Api.Controllers
|
|||||||
if (!ModelState.IsValid)
|
if (!ModelState.IsValid)
|
||||||
return BadRequest(new ApiErrorResponse(ModelState));
|
return BadRequest(new ApiErrorResponse(ModelState));
|
||||||
|
|
||||||
if (!selectedRequest.ObjectType.HasAttribute(typeof(CoreBizObjectAttribute)))
|
if (!selectedRequest.AType.HasAttribute(typeof(CoreBizObjectAttribute)))
|
||||||
return BadRequest(new ApiErrorResponse(ApiErrorCode.INVALID_OPERATION, null, "Not a taggable object type"));
|
return BadRequest(new ApiErrorResponse(ApiErrorCode.INVALID_OPERATION, null, "Not a taggable object type"));
|
||||||
if (!Authorized.HasModifyRole(HttpContext.Items, selectedRequest.ObjectType))
|
if (!Authorized.HasModifyRole(HttpContext.Items, selectedRequest.AType))
|
||||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||||
fromTag = TagBiz.NormalizeTag(fromTag);
|
fromTag = TagBiz.NormalizeTag(fromTag);
|
||||||
if (string.IsNullOrWhiteSpace(fromTag))
|
if (string.IsNullOrWhiteSpace(fromTag))
|
||||||
@@ -299,7 +299,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
UserIdFromContext.Id(HttpContext.Items),
|
UserIdFromContext.Id(HttpContext.Items),
|
||||||
UserTranslationIdFromContext.Id(HttpContext.Items));
|
UserTranslationIdFromContext.Id(HttpContext.Items));
|
||||||
|
|
||||||
var JobName = $"LT:BatchJob LT:Replace LT:Tag \"{fromTag}\" -> LT:Tag \"{toTag}\" LT:{selectedRequest.ObjectType} ({selectedRequest.SelectedRowIds.LongLength}) LT:User {UserNameFromContext.Name(HttpContext.Items)}";
|
var JobName = $"LT:BatchJob LT:Replace LT:Tag \"{fromTag}\" -> LT:Tag \"{toTag}\" LT:{selectedRequest.AType} ({selectedRequest.SelectedRowIds.LongLength}) LT:User {UserNameFromContext.Name(HttpContext.Items)}";
|
||||||
JObject o = JObject.FromObject(new
|
JObject o = JObject.FromObject(new
|
||||||
{
|
{
|
||||||
idList = selectedRequest.SelectedRowIds,
|
idList = selectedRequest.SelectedRowIds,
|
||||||
@@ -308,7 +308,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
});
|
});
|
||||||
|
|
||||||
OpsJob j = new OpsJob();
|
OpsJob j = new OpsJob();
|
||||||
j.ObjectType = selectedRequest.ObjectType;
|
j.AType = selectedRequest.AType;
|
||||||
j.Name = JobName;
|
j.Name = JobName;
|
||||||
j.JobType = JobType.BatchCoreObjectOperation;
|
j.JobType = JobType.BatchCoreObjectOperation;
|
||||||
j.SubType = JobSubType.TagReplace;
|
j.SubType = JobSubType.TagReplace;
|
||||||
@@ -355,7 +355,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
|
|
||||||
OpsJob j = new OpsJob();
|
OpsJob j = new OpsJob();
|
||||||
j.Name = JobName;
|
j.Name = JobName;
|
||||||
j.ObjectType = ayaType;
|
j.AType = ayaType;
|
||||||
j.JobType = JobType.BatchCoreObjectOperation;
|
j.JobType = JobType.BatchCoreObjectOperation;
|
||||||
j.SubType = JobSubType.TagReplaceAny;
|
j.SubType = JobSubType.TagReplaceAny;
|
||||||
j.Exclusive = false;
|
j.Exclusive = false;
|
||||||
|
|||||||
@@ -336,7 +336,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
|
|
||||||
|
|
||||||
bool badRequest = false;
|
bool badRequest = false;
|
||||||
string UploadObjectType = string.Empty;
|
string UploadAType = string.Empty;
|
||||||
string UploadObjectId = string.Empty;
|
string UploadObjectId = string.Empty;
|
||||||
string errorMessage = string.Empty;
|
string errorMessage = string.Empty;
|
||||||
string Notes = string.Empty;
|
string Notes = string.Empty;
|
||||||
@@ -371,8 +371,8 @@ namespace AyaNova.Api.Controllers
|
|||||||
}
|
}
|
||||||
if (!badRequest)
|
if (!badRequest)
|
||||||
{
|
{
|
||||||
if (uploadFormData.FormFieldData.ContainsKey("ObjectType"))
|
if (uploadFormData.FormFieldData.ContainsKey("AType"))
|
||||||
UploadObjectType = uploadFormData.FormFieldData["ObjectType"].ToString();
|
UploadAType = uploadFormData.FormFieldData["AType"].ToString();
|
||||||
if (uploadFormData.FormFieldData.ContainsKey("ObjectId"))
|
if (uploadFormData.FormFieldData.ContainsKey("ObjectId"))
|
||||||
UploadObjectId = uploadFormData.FormFieldData["ObjectId"].ToString();
|
UploadObjectId = uploadFormData.FormFieldData["ObjectId"].ToString();
|
||||||
if (uploadFormData.FormFieldData.ContainsKey("Notes"))
|
if (uploadFormData.FormFieldData.ContainsKey("Notes"))
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
public AttachmentDataList()
|
public AttachmentDataList()
|
||||||
{
|
{
|
||||||
DefaultListObjectType = AyaType.FileAttachment;
|
DefaultListAType = AyaType.FileAttachment;
|
||||||
SQLFrom = "from afileattachment";
|
SQLFrom = "from afileattachment";
|
||||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
||||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||||
DefaultColumns = new List<string>() { "displayfilename", "object", "size", "notes", "exists" };
|
DefaultColumns = new List<string>() { "displayfilename", "object", "size", "notes", "exists" };
|
||||||
DefaultSortBy = new Dictionary<string, string>() { { "displayfilename", "+" }, { "size", "-" } };
|
DefaultSortBy = new Dictionary<string, string>() { { "displayfilename", "+" }, { "size", "-" } };
|
||||||
@@ -20,7 +20,7 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
TKey = "FileAttachment",
|
TKey = "FileAttachment",
|
||||||
FieldKey = "displayfilename",
|
FieldKey = "displayfilename",
|
||||||
AyaObjectType = (int)AyaType.FileAttachment,
|
AType = (int)AyaType.FileAttachment,
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "afileattachment.id",
|
SqlIdColumnName = "afileattachment.id",
|
||||||
SqlValueColumnName = "afileattachment.displayfilename",
|
SqlValueColumnName = "afileattachment.displayfilename",
|
||||||
@@ -41,8 +41,8 @@ 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.attachtoobjecttype)",
|
SqlValueColumnName = "AYGETNAME(afileattachment.AttachToObjectid, afileattachment.attachtoatype)",
|
||||||
SqlAyTypeColumnName = "afileattachment.attachtoobjecttype"
|
SqlATypeColumnName = "afileattachment.attachtoatype"
|
||||||
});
|
});
|
||||||
|
|
||||||
FieldDefinitions.Add(new DataListFieldDefinition
|
FieldDefinitions.Add(new DataListFieldDefinition
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
public ContractDataList()
|
public ContractDataList()
|
||||||
{
|
{
|
||||||
DefaultListObjectType = AyaType.Contract;
|
DefaultListAType = AyaType.Contract;
|
||||||
SQLFrom = "from acontract";
|
SQLFrom = "from acontract";
|
||||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
||||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||||
DefaultColumns = new List<string>() { "contractname", "contractactive" };
|
DefaultColumns = new List<string>() { "contractname", "contractactive" };
|
||||||
DefaultSortBy = new Dictionary<string, string>() { { "contractname", "+" } };
|
DefaultSortBy = new Dictionary<string, string>() { { "contractname", "+" } };
|
||||||
@@ -18,7 +18,7 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
TKey = "ContractName",
|
TKey = "ContractName",
|
||||||
FieldKey = "contractname",
|
FieldKey = "contractname",
|
||||||
AyaObjectType = (int)AyaType.Contract,
|
AType = (int)AyaType.Contract,
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "acontract.id",
|
SqlIdColumnName = "acontract.id",
|
||||||
SqlValueColumnName = "acontract.name",
|
SqlValueColumnName = "acontract.name",
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
public CustomerDataList()
|
public CustomerDataList()
|
||||||
{
|
{
|
||||||
DefaultListObjectType = AyaType.Customer;
|
DefaultListAType = AyaType.Customer;
|
||||||
SQLFrom = "from acustomer left join aheadoffice on (acustomer.headofficeid=aheadoffice.id) left join acontract on (acustomer.contractid=acontract.id)";
|
SQLFrom = "from acustomer left join aheadoffice on (acustomer.headofficeid=aheadoffice.id) left join acontract on (acustomer.contractid=acontract.id)";
|
||||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
||||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||||
DefaultColumns = new List<string>() { "customername", "customerphone1", "customeremail", "customerheadoffice" };
|
DefaultColumns = new List<string>() { "customername", "customerphone1", "customeremail", "customerheadoffice" };
|
||||||
DefaultSortBy = new Dictionary<string, string>() { { "customername", "+" } };
|
DefaultSortBy = new Dictionary<string, string>() { { "customername", "+" } };
|
||||||
@@ -19,7 +19,7 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
TKey = "CustomerName",
|
TKey = "CustomerName",
|
||||||
FieldKey = "customername",
|
FieldKey = "customername",
|
||||||
AyaObjectType = (int)AyaType.Customer,
|
AType = (int)AyaType.Customer,
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "acustomer.id",
|
SqlIdColumnName = "acustomer.id",
|
||||||
SqlValueColumnName = "acustomer.name",
|
SqlValueColumnName = "acustomer.name",
|
||||||
@@ -71,7 +71,7 @@ namespace AyaNova.DataList
|
|||||||
TKey = "HeadOffice",
|
TKey = "HeadOffice",
|
||||||
FieldKey = "customerheadoffice",
|
FieldKey = "customerheadoffice",
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
AyaObjectType = (int)AyaType.HeadOffice,
|
AType = (int)AyaType.HeadOffice,
|
||||||
SqlIdColumnName = "aheadoffice.id",
|
SqlIdColumnName = "aheadoffice.id",
|
||||||
SqlValueColumnName = "aheadoffice.name"
|
SqlValueColumnName = "aheadoffice.name"
|
||||||
});
|
});
|
||||||
@@ -113,7 +113,7 @@ namespace AyaNova.DataList
|
|||||||
TKey = "Contract",
|
TKey = "Contract",
|
||||||
FieldKey = "customercontract",
|
FieldKey = "customercontract",
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
AyaObjectType = (int)AyaType.Contract,
|
AType = (int)AyaType.Contract,
|
||||||
SqlIdColumnName = "acontract.id",
|
SqlIdColumnName = "acontract.id",
|
||||||
SqlValueColumnName = "acontract.name"
|
SqlValueColumnName = "acontract.name"
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
public CustomerNoteDataList()
|
public CustomerNoteDataList()
|
||||||
{
|
{
|
||||||
DefaultListObjectType = AyaType.CustomerNote;
|
DefaultListAType = AyaType.CustomerNote;
|
||||||
SQLFrom = "from acustomernote left join auser on (acustomernote.userid=auser.id)";
|
SQLFrom = "from acustomernote left join auser on (acustomernote.userid=auser.id)";
|
||||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
||||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||||
DefaultColumns = new List<string>() { "notedate", "notes", "username" };
|
DefaultColumns = new List<string>() { "notedate", "notes", "username" };
|
||||||
DefaultSortBy = new Dictionary<string, string>() { { "notedate", "-" } };
|
DefaultSortBy = new Dictionary<string, string>() { { "notedate", "-" } };
|
||||||
@@ -21,7 +21,7 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
TKey = "User",
|
TKey = "User",
|
||||||
FieldKey = "username",
|
FieldKey = "username",
|
||||||
AyaObjectType = (int)AyaType.User,
|
AType = (int)AyaType.User,
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "auser.id",
|
SqlIdColumnName = "auser.id",
|
||||||
SqlValueColumnName = "auser.name",
|
SqlValueColumnName = "auser.name",
|
||||||
@@ -33,7 +33,7 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
TKey = "CustomerNoteNotes",
|
TKey = "CustomerNoteNotes",
|
||||||
FieldKey = "notes",
|
FieldKey = "notes",
|
||||||
AyaObjectType = (int)AyaType.CustomerNote,
|
AType = (int)AyaType.CustomerNote,
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "acustomernote.id",
|
SqlIdColumnName = "acustomernote.id",
|
||||||
SqlValueColumnName = "acustomernote.notes",
|
SqlValueColumnName = "acustomernote.notes",
|
||||||
|
|||||||
@@ -6,14 +6,14 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
public CustomerServiceRequestDataList()
|
public CustomerServiceRequestDataList()
|
||||||
{
|
{
|
||||||
DefaultListObjectType = AyaType.CustomerServiceRequest;
|
DefaultListAType = AyaType.CustomerServiceRequest;
|
||||||
SQLFrom = "from acustomerservicerequest " +
|
SQLFrom = "from acustomerservicerequest " +
|
||||||
"left join acustomer on (acustomerservicerequest.customerid=acustomer.id) " +
|
"left join acustomer on (acustomerservicerequest.customerid=acustomer.id) " +
|
||||||
"left join auser on (acustomerservicerequest.requestedbyuserid=auser.id) " +
|
"left join auser on (acustomerservicerequest.requestedbyuserid=auser.id) " +
|
||||||
"left join aunit on (acustomerservicerequest.unitid = aunit.id) " +
|
"left join aunit on (acustomerservicerequest.unitid = aunit.id) " +
|
||||||
"left join aworkorderitem as wi on (acustomerservicerequest.workorderitemid=wi.id) " +
|
"left join aworkorderitem as wi on (acustomerservicerequest.workorderitemid=wi.id) " +
|
||||||
"left join aworkorder as w on (wi.workorderid=w.id)";
|
"left join aworkorder as w on (wi.workorderid=w.id)";
|
||||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
||||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||||
DefaultColumns = new List<string>() { "Created", "Customer", "CustomerServiceRequestTitle", "CustomerServiceRequestPriority", "CustomerServiceRequestStatus" };
|
DefaultColumns = new List<string>() { "Created", "Customer", "CustomerServiceRequestTitle", "CustomerServiceRequestPriority", "CustomerServiceRequestStatus" };
|
||||||
DefaultSortBy = new Dictionary<string, string>() { { "Created", "-" } };
|
DefaultSortBy = new Dictionary<string, string>() { { "Created", "-" } };
|
||||||
@@ -24,7 +24,7 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
TKey = "CustomerServiceRequestTitle",
|
TKey = "CustomerServiceRequestTitle",
|
||||||
FieldKey = "CustomerServiceRequestTitle",
|
FieldKey = "CustomerServiceRequestTitle",
|
||||||
AyaObjectType = (int)AyaType.CustomerServiceRequest,
|
AType = (int)AyaType.CustomerServiceRequest,
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "acustomerservicerequest.id",
|
SqlIdColumnName = "acustomerservicerequest.id",
|
||||||
SqlValueColumnName = "acustomerservicerequest.name",
|
SqlValueColumnName = "acustomerservicerequest.name",
|
||||||
@@ -60,7 +60,7 @@ namespace AyaNova.DataList
|
|||||||
FieldKey = "Customer",
|
FieldKey = "Customer",
|
||||||
TKey = "Customer",
|
TKey = "Customer",
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
AyaObjectType = (int)AyaType.Customer,
|
AType = (int)AyaType.Customer,
|
||||||
SqlIdColumnName = "acustomer.id",
|
SqlIdColumnName = "acustomer.id",
|
||||||
SqlValueColumnName = "acustomer.name"
|
SqlValueColumnName = "acustomer.name"
|
||||||
});
|
});
|
||||||
@@ -70,7 +70,7 @@ namespace AyaNova.DataList
|
|||||||
FieldKey = "CustomerServiceRequestItemUnitID",
|
FieldKey = "CustomerServiceRequestItemUnitID",
|
||||||
TKey = "CustomerServiceRequestItemUnitID",
|
TKey = "CustomerServiceRequestItemUnitID",
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
AyaObjectType = (int)AyaType.Unit,
|
AType = (int)AyaType.Unit,
|
||||||
SqlIdColumnName = "aunit.id",
|
SqlIdColumnName = "aunit.id",
|
||||||
SqlValueColumnName = "aunit.serial"
|
SqlValueColumnName = "aunit.serial"
|
||||||
});
|
});
|
||||||
@@ -80,7 +80,7 @@ namespace AyaNova.DataList
|
|||||||
FieldKey = "WorkOrder",
|
FieldKey = "WorkOrder",
|
||||||
TKey = "WorkOrder",
|
TKey = "WorkOrder",
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
AyaObjectType = (int)AyaType.WorkOrderItem,
|
AType = (int)AyaType.WorkOrderItem,
|
||||||
SqlIdColumnName = "wi.id",
|
SqlIdColumnName = "wi.id",
|
||||||
SqlValueColumnName = "w.serial"
|
SqlValueColumnName = "w.serial"
|
||||||
});
|
});
|
||||||
@@ -90,7 +90,7 @@ namespace AyaNova.DataList
|
|||||||
FieldKey = "CustomerServiceRequestRequestedBy",
|
FieldKey = "CustomerServiceRequestRequestedBy",
|
||||||
TKey = "CustomerServiceRequestRequestedBy",
|
TKey = "CustomerServiceRequestRequestedBy",
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
AyaObjectType = (int)AyaType.User,
|
AType = (int)AyaType.User,
|
||||||
SqlIdColumnName = "auser.id",
|
SqlIdColumnName = "auser.id",
|
||||||
SqlValueColumnName = "auser.name"
|
SqlValueColumnName = "auser.name"
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -120,9 +120,9 @@ namespace AyaNova.DataList
|
|||||||
AyaField.i = dr.GetInt64(ordinal);
|
AyaField.i = dr.GetInt64(ordinal);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (f.SqlAyTypeColumnName != null)
|
if (f.SqlATypeColumnName != null)
|
||||||
{
|
{
|
||||||
var ordinal = qSelect.map[f.SqlAyTypeColumnName];
|
var ordinal = qSelect.map[f.SqlATypeColumnName];
|
||||||
if (!await dr.IsDBNullAsync(ordinal))
|
if (!await dr.IsDBNullAsync(ordinal))
|
||||||
AyaField.ot = dr.GetInt32(ordinal);
|
AyaField.ot = dr.GetInt32(ordinal);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ namespace AyaNova.DataList
|
|||||||
public bool IsRowId { get; set; }
|
public bool IsRowId { get; set; }
|
||||||
|
|
||||||
//CLIENT / SERVER - client display and to indicate what object to open , Server for formatting return object
|
//CLIENT / SERVER - client display and to indicate what object to open , Server for formatting return object
|
||||||
public int AyaObjectType { get; set; }
|
public int AType { get; set; }
|
||||||
|
|
||||||
//SERVER - for building sql queries
|
//SERVER - for building sql queries
|
||||||
//don't return these properties when api user fetches field list definitions in DataListController
|
//don't return these properties when api user fetches field list definitions in DataListController
|
||||||
@@ -45,7 +45,7 @@ namespace AyaNova.DataList
|
|||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public string SqlValueColumnName { get; set; }
|
public string SqlValueColumnName { get; set; }
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public string SqlAyTypeColumnName { get; set; }//column to fetch the AyaType openabel for this field to set it dynamically instead of preset
|
public string SqlATypeColumnName { get; set; }//column to fetch the AyaType openabel for this field to set it dynamically instead of preset
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public string SqlColorColumnName { get; set; }//column to fetch the color if applicable to this field
|
public string SqlColorColumnName { get; set; }//column to fetch the color if applicable to this field
|
||||||
|
|
||||||
@@ -58,8 +58,8 @@ namespace AyaNova.DataList
|
|||||||
IsRowId = false;
|
IsRowId = false;
|
||||||
IsMeta = false;
|
IsMeta = false;
|
||||||
//Set openable object type to no type which is the default and means it's not a link to another object
|
//Set openable object type to no type which is the default and means it's not a link to another object
|
||||||
AyaObjectType = (int)AyaType.NoType;
|
AType = (int)AyaType.NoType;
|
||||||
SqlAyTypeColumnName = null;//must be null as that is checked against specifically
|
SqlATypeColumnName = null;//must be null as that is checked against specifically
|
||||||
SqlColorColumnName = null;//must be null to be ignored properly
|
SqlColorColumnName = null;//must be null to be ignored properly
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ namespace AyaNova.DataList
|
|||||||
public string SQLFrom { get; set; }
|
public string SQLFrom { get; set; }
|
||||||
public List<DataListFieldDefinition> FieldDefinitions { get; set; }
|
public List<DataListFieldDefinition> FieldDefinitions { get; set; }
|
||||||
public AuthorizationRoles AllowedRoles { get; set; }
|
public AuthorizationRoles AllowedRoles { get; set; }
|
||||||
public AyaType DefaultListObjectType { get; set; }
|
public AyaType DefaultListAType { get; set; }
|
||||||
public long CurrentUserId { get; set; }
|
public long CurrentUserId { 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; }
|
||||||
@@ -112,9 +112,9 @@ namespace AyaNova.DataList
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Has a AyObjectType? (linkable / openable)
|
//Has a AyAType? (linkable / openable)
|
||||||
if (o.AyaObjectType != 0)
|
if (o.AType != 0)
|
||||||
sb.Append($",\"ay\":{(int)o.AyaObjectType}");
|
sb.Append($",\"ay\":{(int)o.AType}");
|
||||||
|
|
||||||
//Row ID column?
|
//Row ID column?
|
||||||
if (o.IsRowId)
|
if (o.IsRowId)
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ namespace AyaNova.DataList
|
|||||||
}
|
}
|
||||||
|
|
||||||
//does it also have an openable AyaType column?
|
//does it also have an openable AyaType column?
|
||||||
var ayaTypeColumnName = o.SqlAyTypeColumnName;
|
var ayaTypeColumnName = o.SqlATypeColumnName;
|
||||||
if (!string.IsNullOrWhiteSpace(ayaTypeColumnName))
|
if (!string.IsNullOrWhiteSpace(ayaTypeColumnName))
|
||||||
{
|
{
|
||||||
if (!map.ContainsKey(ayaTypeColumnName))
|
if (!map.ContainsKey(ayaTypeColumnName))
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ namespace AyaNova.DataList
|
|||||||
public EventDataList()
|
public EventDataList()
|
||||||
{
|
{
|
||||||
//NOTE: used this type because it's full BizFull and read only BizLimited only which is appropriate and there is no event type
|
//NOTE: used this type because it's full BizFull and read only BizLimited only which is appropriate and there is no event type
|
||||||
DefaultListObjectType = AyaType.Global;
|
DefaultListAType = AyaType.Global;
|
||||||
SQLFrom = "from aevent left join auser on (aevent.userid=auser.id)";
|
SQLFrom = "from aevent left join auser on (aevent.userid=auser.id)";
|
||||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
||||||
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", "-" } };
|
||||||
@@ -49,7 +49,7 @@ namespace AyaNova.DataList
|
|||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "aevent.ayid",
|
SqlIdColumnName = "aevent.ayid",
|
||||||
SqlValueColumnName = "AYGETNAME(aevent.ayid, aevent.ayatype)",
|
SqlValueColumnName = "AYGETNAME(aevent.ayid, aevent.ayatype)",
|
||||||
SqlAyTypeColumnName = "aevent.ayatype"
|
SqlATypeColumnName = "aevent.ayatype"
|
||||||
});
|
});
|
||||||
|
|
||||||
FieldDefinitions.Add(new DataListFieldDefinition
|
FieldDefinitions.Add(new DataListFieldDefinition
|
||||||
@@ -57,7 +57,7 @@ namespace AyaNova.DataList
|
|||||||
FieldKey = "username",
|
FieldKey = "username",
|
||||||
TKey = "User",
|
TKey = "User",
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
AyaObjectType = (int)AyaType.User,
|
AType = (int)AyaType.User,
|
||||||
SqlIdColumnName = "auser.id",
|
SqlIdColumnName = "auser.id",
|
||||||
SqlValueColumnName = "auser.name"
|
SqlValueColumnName = "auser.name"
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
public HeadOfficeDataList()
|
public HeadOfficeDataList()
|
||||||
{
|
{
|
||||||
DefaultListObjectType = AyaType.HeadOffice;
|
DefaultListAType = AyaType.HeadOffice;
|
||||||
SQLFrom = "from aheadoffice left join acontract on (aheadoffice.contractid=acontract.id)";
|
SQLFrom = "from aheadoffice left join acontract on (aheadoffice.contractid=acontract.id)";
|
||||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
||||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||||
DefaultColumns = new List<string>() { "headofficename", "headofficephone1", "headofficeemail" };
|
DefaultColumns = new List<string>() { "headofficename", "headofficephone1", "headofficeemail" };
|
||||||
DefaultSortBy = new Dictionary<string, string>() { { "headofficename", "+" } };
|
DefaultSortBy = new Dictionary<string, string>() { { "headofficename", "+" } };
|
||||||
@@ -19,7 +19,7 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
TKey = "HeadOfficeName",
|
TKey = "HeadOfficeName",
|
||||||
FieldKey = "headofficename",
|
FieldKey = "headofficename",
|
||||||
AyaObjectType = (int)AyaType.HeadOffice,
|
AType = (int)AyaType.HeadOffice,
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "aheadoffice.id",
|
SqlIdColumnName = "aheadoffice.id",
|
||||||
SqlValueColumnName = "aheadoffice.name",
|
SqlValueColumnName = "aheadoffice.name",
|
||||||
@@ -80,7 +80,7 @@ namespace AyaNova.DataList
|
|||||||
TKey = "Contract",
|
TKey = "Contract",
|
||||||
FieldKey = "headofficecontract",
|
FieldKey = "headofficecontract",
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
AyaObjectType = (int)AyaType.Contract,
|
AType = (int)AyaType.Contract,
|
||||||
SqlIdColumnName = "acontract.id",
|
SqlIdColumnName = "acontract.id",
|
||||||
SqlValueColumnName = "acontract.name"
|
SqlValueColumnName = "acontract.name"
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace AyaNova.DataList
|
|||||||
//allowed roles to access this list
|
//allowed roles to access this list
|
||||||
AuthorizationRoles AllowedRoles { get; set; }
|
AuthorizationRoles AllowedRoles { get; set; }
|
||||||
//Default object type to open for rows of this list (use no object if no)
|
//Default object type to open for rows of this list (use no object if no)
|
||||||
AyaType DefaultListObjectType { get; set; }
|
AyaType DefaultListAType { get; set; }
|
||||||
//Defaults when none is specified (see DataListOptions for formats and notes)
|
//Defaults when none is specified (see DataListOptions for formats and notes)
|
||||||
List<string> DefaultColumns { get; set; }
|
List<string> DefaultColumns { get; set; }
|
||||||
Dictionary<string, string> DefaultSortBy { get; set; }
|
Dictionary<string, string> DefaultSortBy { get; set; }
|
||||||
|
|||||||
@@ -9,9 +9,9 @@ namespace AyaNova.DataList
|
|||||||
|
|
||||||
public InsideUserDataList()
|
public InsideUserDataList()
|
||||||
{
|
{
|
||||||
DefaultListObjectType = AyaType.User;
|
DefaultListAType = AyaType.User;
|
||||||
SQLFrom = "from auser left join avendor on (auser.vendorid=avendor.id)";
|
SQLFrom = "from auser left join avendor on (auser.vendorid=avendor.id)";
|
||||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
||||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||||
DefaultColumns = new List<string>() { "name", "employeenumber", "active", "usertype", "lastlogin" };
|
DefaultColumns = new List<string>() { "name", "employeenumber", "active", "usertype", "lastlogin" };
|
||||||
DefaultSortBy = new Dictionary<string, string>() { { "name", "+" } };
|
DefaultSortBy = new Dictionary<string, string>() { { "name", "+" } };
|
||||||
@@ -21,7 +21,7 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
TKey = "User",
|
TKey = "User",
|
||||||
FieldKey = "name",
|
FieldKey = "name",
|
||||||
AyaObjectType = (int)AyaType.User,
|
AType = (int)AyaType.User,
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "auser.id",
|
SqlIdColumnName = "auser.id",
|
||||||
SqlValueColumnName = "auser.name",
|
SqlValueColumnName = "auser.name",
|
||||||
@@ -77,7 +77,7 @@ namespace AyaNova.DataList
|
|||||||
TKey = "Vendor",
|
TKey = "Vendor",
|
||||||
FieldKey = "uservendor",
|
FieldKey = "uservendor",
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
AyaObjectType = (int)AyaType.Vendor,
|
AType = (int)AyaType.Vendor,
|
||||||
SqlIdColumnName = "avendor.id",
|
SqlIdColumnName = "avendor.id",
|
||||||
SqlValueColumnName = "avendor.name"
|
SqlValueColumnName = "avendor.name"
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
public LoanUnitDataList()
|
public LoanUnitDataList()
|
||||||
{
|
{
|
||||||
DefaultListObjectType = AyaType.LoanUnit;
|
DefaultListAType = AyaType.LoanUnit;
|
||||||
SQLFrom = "from aloanunit " +
|
SQLFrom = "from aloanunit " +
|
||||||
"left join aunit as shadowunit on (aloanunit.unitid=shadowunit.id) " +
|
"left join aunit as shadowunit on (aloanunit.unitid=shadowunit.id) " +
|
||||||
"left join aworkorderitemloan as wil on (aloanunit.workorderitemloanid=wil.id) " +
|
"left join aworkorderitemloan as wil on (aloanunit.workorderitemloanid=wil.id) " +
|
||||||
@@ -14,7 +14,7 @@ namespace AyaNova.DataList
|
|||||||
"left join aworkorder as w on (wi.workorderid=w.id)";
|
"left join aworkorder as w on (wi.workorderid=w.id)";
|
||||||
//MIGRATE_OUTSTANDING awaiting workorderitemloan coding
|
//MIGRATE_OUTSTANDING awaiting workorderitemloan coding
|
||||||
//todo: look at loanitemlist in v7 it surfaces due date, out date etc in the list and should here too once those fields are coded for
|
//todo: look at loanitemlist in v7 it surfaces due date, out date etc in the list and should here too once those fields are coded for
|
||||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
||||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||||
DefaultColumns = new List<string>() { "LoanUnitName", "LoanUnitSerial", "Tags" };
|
DefaultColumns = new List<string>() { "LoanUnitName", "LoanUnitSerial", "Tags" };
|
||||||
DefaultSortBy = new Dictionary<string, string>() { { "LoanUnitName", "+" } };
|
DefaultSortBy = new Dictionary<string, string>() { { "LoanUnitName", "+" } };
|
||||||
@@ -24,7 +24,7 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
TKey = "LoanUnitName",
|
TKey = "LoanUnitName",
|
||||||
FieldKey = "LoanUnitName",
|
FieldKey = "LoanUnitName",
|
||||||
AyaObjectType = (int)AyaType.LoanUnit,
|
AType = (int)AyaType.LoanUnit,
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "aloanunit.id",
|
SqlIdColumnName = "aloanunit.id",
|
||||||
SqlValueColumnName = "aloanunit.name",
|
SqlValueColumnName = "aloanunit.name",
|
||||||
@@ -68,7 +68,7 @@ namespace AyaNova.DataList
|
|||||||
FieldKey = "LoanUnitCurrentWorkOrderItemLoan",
|
FieldKey = "LoanUnitCurrentWorkOrderItemLoan",
|
||||||
TKey = "LoanUnitCurrentWorkOrderItemLoan",
|
TKey = "LoanUnitCurrentWorkOrderItemLoan",
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
AyaObjectType = (int)AyaType.WorkOrderItemLoan,
|
AType = (int)AyaType.WorkOrderItemLoan,
|
||||||
SqlIdColumnName = "wil.id",
|
SqlIdColumnName = "wil.id",
|
||||||
SqlValueColumnName = "w.serial"
|
SqlValueColumnName = "w.serial"
|
||||||
});
|
});
|
||||||
@@ -135,7 +135,7 @@ namespace AyaNova.DataList
|
|||||||
FieldKey = "LoanUnitShadowUnit",
|
FieldKey = "LoanUnitShadowUnit",
|
||||||
TKey = "LoanUnitShadowUnit",
|
TKey = "LoanUnitShadowUnit",
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
AyaObjectType = (int)AyaType.Unit,
|
AType = (int)AyaType.Unit,
|
||||||
SqlIdColumnName = "shadowunit.id",
|
SqlIdColumnName = "shadowunit.id",
|
||||||
SqlValueColumnName = "shadowunit.serial"
|
SqlValueColumnName = "shadowunit.serial"
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ namespace AyaNova.DataList
|
|||||||
public MemoDataList()
|
public MemoDataList()
|
||||||
{
|
{
|
||||||
|
|
||||||
DefaultListObjectType = AyaType.Memo;
|
DefaultListAType = AyaType.Memo;
|
||||||
SQLFrom = "from amemo left join auser on (amemo.fromid=auser.id)";
|
SQLFrom = "from amemo left join auser on (amemo.fromid=auser.id)";
|
||||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
||||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||||
DefaultColumns = new List<string>() { "MemoSubject", "MemoFromID", "MemoSent", "MemoViewed" };
|
DefaultColumns = new List<string>() { "MemoSubject", "MemoFromID", "MemoSent", "MemoViewed" };
|
||||||
DefaultSortBy = new Dictionary<string, string>() { { "MemoSent", "-" } };
|
DefaultSortBy = new Dictionary<string, string>() { { "MemoSent", "-" } };
|
||||||
@@ -20,7 +20,7 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
TKey = "MemoSubject",
|
TKey = "MemoSubject",
|
||||||
FieldKey = "MemoSubject",
|
FieldKey = "MemoSubject",
|
||||||
AyaObjectType = (int)AyaType.Memo,
|
AType = (int)AyaType.Memo,
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "amemo.id",
|
SqlIdColumnName = "amemo.id",
|
||||||
SqlValueColumnName = "amemo.name",
|
SqlValueColumnName = "amemo.name",
|
||||||
@@ -39,7 +39,7 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
TKey = "MemoFromID",
|
TKey = "MemoFromID",
|
||||||
FieldKey = "MemoFromID",
|
FieldKey = "MemoFromID",
|
||||||
AyaObjectType = (int)AyaType.User,
|
AType = (int)AyaType.User,
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "auser.id",
|
SqlIdColumnName = "auser.id",
|
||||||
SqlValueColumnName = "auser.name",
|
SqlValueColumnName = "auser.name",
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ namespace AyaNova.DataList
|
|||||||
|
|
||||||
public OutsideUserDataList()
|
public OutsideUserDataList()
|
||||||
{
|
{
|
||||||
DefaultListObjectType = AyaType.Customer;
|
DefaultListAType = AyaType.Customer;
|
||||||
SQLFrom = "from auser left join aheadoffice on (auser.headofficeid=aheadoffice.id) left join acustomer on (auser.customerid=acustomer.id)";
|
SQLFrom = "from auser left join aheadoffice on (auser.headofficeid=aheadoffice.id) left join acustomer on (auser.customerid=acustomer.id)";
|
||||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
||||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||||
DefaultColumns = new List<string>() { "name", "active", "usercustomer", "userheadoffice", "lastlogin" };
|
DefaultColumns = new List<string>() { "name", "active", "usercustomer", "userheadoffice", "lastlogin" };
|
||||||
DefaultSortBy = new Dictionary<string, string>() { { "name", "+" } };
|
DefaultSortBy = new Dictionary<string, string>() { { "name", "+" } };
|
||||||
@@ -20,7 +20,7 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
TKey = "User",
|
TKey = "User",
|
||||||
FieldKey = "name",
|
FieldKey = "name",
|
||||||
AyaObjectType = (int)AyaType.User,
|
AType = (int)AyaType.User,
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "auser.id",
|
SqlIdColumnName = "auser.id",
|
||||||
SqlValueColumnName = "auser.name",
|
SqlValueColumnName = "auser.name",
|
||||||
@@ -75,7 +75,7 @@ namespace AyaNova.DataList
|
|||||||
TKey = "HeadOffice",
|
TKey = "HeadOffice",
|
||||||
FieldKey = "userheadoffice",
|
FieldKey = "userheadoffice",
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
AyaObjectType = (int)AyaType.HeadOffice,
|
AType = (int)AyaType.HeadOffice,
|
||||||
SqlIdColumnName = "aheadoffice.id",
|
SqlIdColumnName = "aheadoffice.id",
|
||||||
SqlValueColumnName = "aheadoffice.name"
|
SqlValueColumnName = "aheadoffice.name"
|
||||||
});
|
});
|
||||||
@@ -85,7 +85,7 @@ namespace AyaNova.DataList
|
|||||||
TKey = "Customer",
|
TKey = "Customer",
|
||||||
FieldKey = "usercustomer",
|
FieldKey = "usercustomer",
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
AyaObjectType = (int)AyaType.Customer,
|
AType = (int)AyaType.Customer,
|
||||||
SqlIdColumnName = "acustomer.id",
|
SqlIdColumnName = "acustomer.id",
|
||||||
SqlValueColumnName = "acustomer.name"
|
SqlValueColumnName = "acustomer.name"
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
public PartAssemblyDataList()
|
public PartAssemblyDataList()
|
||||||
{
|
{
|
||||||
DefaultListObjectType = AyaType.PartAssembly;
|
DefaultListAType = AyaType.PartAssembly;
|
||||||
SQLFrom = "from apartassembly";
|
SQLFrom = "from apartassembly";
|
||||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
||||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||||
DefaultColumns = new List<string>() { "partassemblyname" };
|
DefaultColumns = new List<string>() { "partassemblyname" };
|
||||||
DefaultSortBy = new Dictionary<string, string>() { { "partassemblyname", "+" } };
|
DefaultSortBy = new Dictionary<string, string>() { { "partassemblyname", "+" } };
|
||||||
@@ -18,7 +18,7 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
TKey = "PartAssemblyName",
|
TKey = "PartAssemblyName",
|
||||||
FieldKey = "partassemblyname",
|
FieldKey = "partassemblyname",
|
||||||
AyaObjectType = (int)AyaType.PartAssembly,
|
AType = (int)AyaType.PartAssembly,
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "apartassembly.id",
|
SqlIdColumnName = "apartassembly.id",
|
||||||
SqlValueColumnName = "apartassembly.name",
|
SqlValueColumnName = "apartassembly.name",
|
||||||
|
|||||||
@@ -6,12 +6,12 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
public PartDataList()
|
public PartDataList()
|
||||||
{
|
{
|
||||||
DefaultListObjectType = AyaType.Part;
|
DefaultListAType = AyaType.Part;
|
||||||
SQLFrom = "from apart "
|
SQLFrom = "from apart "
|
||||||
+ "left join avendor as aman on (apart.manufacturerid=aman.id) "
|
+ "left join avendor as aman on (apart.manufacturerid=aman.id) "
|
||||||
+ "left join avendor as awhole on (apart.wholesalerid=awhole.id) "
|
+ "left join avendor as awhole on (apart.wholesalerid=awhole.id) "
|
||||||
+ "left join avendor as aaltwhole on (apart.alternativewholesalerid=aaltwhole.id)";
|
+ "left join avendor as aaltwhole on (apart.alternativewholesalerid=aaltwhole.id)";
|
||||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
||||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||||
DefaultColumns = new List<string>() { "PartPartNumber", "PartName", "PartManufacturerID", "PartWholesalerID", "Tags" };
|
DefaultColumns = new List<string>() { "PartPartNumber", "PartName", "PartManufacturerID", "PartWholesalerID", "Tags" };
|
||||||
DefaultSortBy = new Dictionary<string, string>() { { "PartPartNumber", "+" } };
|
DefaultSortBy = new Dictionary<string, string>() { { "PartPartNumber", "+" } };
|
||||||
@@ -21,7 +21,7 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
TKey = "PartPartNumber",
|
TKey = "PartPartNumber",
|
||||||
FieldKey = "PartPartNumber",
|
FieldKey = "PartPartNumber",
|
||||||
AyaObjectType = (int)AyaType.Part,
|
AType = (int)AyaType.Part,
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "apart.id",
|
SqlIdColumnName = "apart.id",
|
||||||
SqlValueColumnName = "apart.partnumber",
|
SqlValueColumnName = "apart.partnumber",
|
||||||
@@ -81,7 +81,7 @@ namespace AyaNova.DataList
|
|||||||
FieldKey = "PartManufacturerID",
|
FieldKey = "PartManufacturerID",
|
||||||
TKey = "PartManufacturerID",
|
TKey = "PartManufacturerID",
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
AyaObjectType = (int)AyaType.Vendor,
|
AType = (int)AyaType.Vendor,
|
||||||
SqlIdColumnName = "aman.id",
|
SqlIdColumnName = "aman.id",
|
||||||
SqlValueColumnName = "aman.name"
|
SqlValueColumnName = "aman.name"
|
||||||
});
|
});
|
||||||
@@ -91,7 +91,7 @@ namespace AyaNova.DataList
|
|||||||
FieldKey = "PartWholesalerID",
|
FieldKey = "PartWholesalerID",
|
||||||
TKey = "PartWholesalerID",
|
TKey = "PartWholesalerID",
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
AyaObjectType = (int)AyaType.Vendor,
|
AType = (int)AyaType.Vendor,
|
||||||
SqlIdColumnName = "awhole.id",
|
SqlIdColumnName = "awhole.id",
|
||||||
SqlValueColumnName = "awhole.name"
|
SqlValueColumnName = "awhole.name"
|
||||||
});
|
});
|
||||||
@@ -101,7 +101,7 @@ namespace AyaNova.DataList
|
|||||||
FieldKey = "PartAlternativeWholesalerID",
|
FieldKey = "PartAlternativeWholesalerID",
|
||||||
TKey = "PartAlternativeWholesalerID",
|
TKey = "PartAlternativeWholesalerID",
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
AyaObjectType = (int)AyaType.Vendor,
|
AType = (int)AyaType.Vendor,
|
||||||
SqlIdColumnName = "aaltwhole.id",
|
SqlIdColumnName = "aaltwhole.id",
|
||||||
SqlValueColumnName = "aaltwhole.name"
|
SqlValueColumnName = "aaltwhole.name"
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -9,13 +9,13 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
public PartInventoryDataList()
|
public PartInventoryDataList()
|
||||||
{
|
{
|
||||||
DefaultListObjectType = AyaType.PartInventory;
|
DefaultListAType = AyaType.PartInventory;
|
||||||
|
|
||||||
SQLFrom = "from vpartinventorylist "
|
SQLFrom = "from vpartinventorylist "
|
||||||
+ "LEFT JOIN apart ON (vpartinventorylist.partid = apart.id) "
|
+ "LEFT JOIN apart ON (vpartinventorylist.partid = apart.id) "
|
||||||
+ "LEFT JOIN apartwarehouse ON (vpartinventorylist.partwarehouseid = apartwarehouse.id) ";
|
+ "LEFT JOIN apartwarehouse ON (vpartinventorylist.partwarehouseid = apartwarehouse.id) ";
|
||||||
|
|
||||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
||||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||||
DefaultColumns = new List<string>() { "PartPartNumber", "PartWarehouseName", "PartInventoryBalance", "PartByWarehouseInventoryQuantityOnOrder", "PartByWarehouseInventoryQtyOnOrderCommitted" };
|
DefaultColumns = new List<string>() { "PartPartNumber", "PartWarehouseName", "PartInventoryBalance", "PartByWarehouseInventoryQuantityOnOrder", "PartByWarehouseInventoryQtyOnOrderCommitted" };
|
||||||
DefaultSortBy = new Dictionary<string, string>() { { "PartPartNumber", "+" }, { "PartWarehouseName", "+" } };
|
DefaultSortBy = new Dictionary<string, string>() { { "PartPartNumber", "+" }, { "PartWarehouseName", "+" } };
|
||||||
@@ -25,7 +25,7 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
TKey = "PartPartNumber",
|
TKey = "PartPartNumber",
|
||||||
FieldKey = "PartPartNumber",
|
FieldKey = "PartPartNumber",
|
||||||
AyaObjectType = (int)AyaType.Part,
|
AType = (int)AyaType.Part,
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "apart.id",
|
SqlIdColumnName = "apart.id",
|
||||||
SqlValueColumnName = "apart.partnumber"
|
SqlValueColumnName = "apart.partnumber"
|
||||||
@@ -35,7 +35,7 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
TKey = "PartName",
|
TKey = "PartName",
|
||||||
FieldKey = "PartName",
|
FieldKey = "PartName",
|
||||||
AyaObjectType = (int)AyaType.Part,
|
AType = (int)AyaType.Part,
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "apart.id",
|
SqlIdColumnName = "apart.id",
|
||||||
SqlValueColumnName = "apart.name"
|
SqlValueColumnName = "apart.name"
|
||||||
@@ -45,7 +45,7 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
TKey = "PartWarehouseName",
|
TKey = "PartWarehouseName",
|
||||||
FieldKey = "PartWarehouseName",
|
FieldKey = "PartWarehouseName",
|
||||||
AyaObjectType = (int)AyaType.PartWarehouse,
|
AType = (int)AyaType.PartWarehouse,
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "apartwarehouse.id",
|
SqlIdColumnName = "apartwarehouse.id",
|
||||||
SqlValueColumnName = "apartwarehouse.name"
|
SqlValueColumnName = "apartwarehouse.name"
|
||||||
@@ -55,7 +55,7 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
TKey = "PartInventoryTransactionDescription",
|
TKey = "PartInventoryTransactionDescription",
|
||||||
FieldKey = "PartInventoryTransactionDescription",
|
FieldKey = "PartInventoryTransactionDescription",
|
||||||
AyaObjectType = (int)AyaType.PartInventory,
|
AType = (int)AyaType.PartInventory,
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "vpartinventorylist.id",
|
SqlIdColumnName = "vpartinventorylist.id",
|
||||||
SqlValueColumnName = "vpartinventorylist.description",
|
SqlValueColumnName = "vpartinventorylist.description",
|
||||||
|
|||||||
@@ -9,11 +9,11 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
public PartInventoryTransactionsDataList()
|
public PartInventoryTransactionsDataList()
|
||||||
{
|
{
|
||||||
DefaultListObjectType = AyaType.PartInventory;
|
DefaultListAType = AyaType.PartInventory;
|
||||||
SQLFrom = "from apartinventory "
|
SQLFrom = "from apartinventory "
|
||||||
+ "left join apart on (apartinventory.partid=apart.id) "
|
+ "left join apart on (apartinventory.partid=apart.id) "
|
||||||
+ "left join apartwarehouse on (apartinventory.partwarehouseid=apartwarehouse.id) ";
|
+ "left join apartwarehouse on (apartinventory.partwarehouseid=apartwarehouse.id) ";
|
||||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
||||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||||
DefaultColumns = new List<string>() {
|
DefaultColumns = new List<string>() {
|
||||||
"PartInventoryTransactionEntryDate", "PartPartNumber", "PartWarehouseName", "PartInventoryTransactionQuantity",
|
"PartInventoryTransactionEntryDate", "PartPartNumber", "PartWarehouseName", "PartInventoryTransactionQuantity",
|
||||||
@@ -29,14 +29,14 @@ namespace AyaNova.DataList
|
|||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "apartinventory.sourceid",
|
SqlIdColumnName = "apartinventory.sourceid",
|
||||||
SqlValueColumnName = "AYGETNAME(apartinventory.sourceid, apartinventory.sourcetype)",
|
SqlValueColumnName = "AYGETNAME(apartinventory.sourceid, apartinventory.sourcetype)",
|
||||||
SqlAyTypeColumnName = "apartinventory.sourcetype"
|
SqlATypeColumnName = "apartinventory.sourcetype"
|
||||||
});
|
});
|
||||||
|
|
||||||
FieldDefinitions.Add(new DataListFieldDefinition
|
FieldDefinitions.Add(new DataListFieldDefinition
|
||||||
{
|
{
|
||||||
TKey = "PartPartNumber",
|
TKey = "PartPartNumber",
|
||||||
FieldKey = "PartPartNumber",
|
FieldKey = "PartPartNumber",
|
||||||
AyaObjectType = (int)AyaType.Part,
|
AType = (int)AyaType.Part,
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "apart.id",
|
SqlIdColumnName = "apart.id",
|
||||||
SqlValueColumnName = "apart.partnumber"
|
SqlValueColumnName = "apart.partnumber"
|
||||||
@@ -46,7 +46,7 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
TKey = "PartWarehouseName",
|
TKey = "PartWarehouseName",
|
||||||
FieldKey = "PartWarehouseName",
|
FieldKey = "PartWarehouseName",
|
||||||
AyaObjectType = (int)AyaType.PartWarehouse,
|
AType = (int)AyaType.PartWarehouse,
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "apartwarehouse.id",
|
SqlIdColumnName = "apartwarehouse.id",
|
||||||
SqlValueColumnName = "apartwarehouse.name"
|
SqlValueColumnName = "apartwarehouse.name"
|
||||||
@@ -56,7 +56,7 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
TKey = "PartInventoryTransactionDescription",
|
TKey = "PartInventoryTransactionDescription",
|
||||||
FieldKey = "PartInventoryTransactionDescription",
|
FieldKey = "PartInventoryTransactionDescription",
|
||||||
AyaObjectType = (int)AyaType.PartInventory,
|
AType = (int)AyaType.PartInventory,
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "apartinventory.id",
|
SqlIdColumnName = "apartinventory.id",
|
||||||
SqlValueColumnName = "apartinventory.description",
|
SqlValueColumnName = "apartinventory.description",
|
||||||
|
|||||||
@@ -14,9 +14,9 @@ namespace AyaNova.DataList
|
|||||||
// + "apartstocklevel.minimumquantity, vpartinventorynow.balance, COALESCE(vpartsonorder.quantityonorder,0) AS onorderquantity, "
|
// + "apartstocklevel.minimumquantity, vpartinventorynow.balance, COALESCE(vpartsonorder.quantityonorder,0) AS onorderquantity, "
|
||||||
// + "apartstocklevel.minimumquantity - (COALESCE(vpartinventorynow.balance, 0) + COALESCE(vpartsonorder.quantityonorder, 0)) AS requiredquantity "
|
// + "apartstocklevel.minimumquantity - (COALESCE(vpartinventorynow.balance, 0) + COALESCE(vpartsonorder.quantityonorder, 0)) AS requiredquantity "
|
||||||
|
|
||||||
DefaultListObjectType = AyaType.PartInventoryRestock;
|
DefaultListAType = AyaType.PartInventoryRestock;
|
||||||
SQLFrom = "FROM vrestockrequired";
|
SQLFrom = "FROM vrestockrequired";
|
||||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
||||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||||
DefaultColumns = new List<string>() {
|
DefaultColumns = new List<string>() {
|
||||||
"PartPartNumber", "PartWarehouseName", "PartWholesalerID","PartAlternativeWholesalerID","PartManufacturerID", "PartByWarehouseInventoryMinStockLevel",
|
"PartPartNumber", "PartWarehouseName", "PartWholesalerID","PartAlternativeWholesalerID","PartManufacturerID", "PartByWarehouseInventoryMinStockLevel",
|
||||||
@@ -30,7 +30,7 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
TKey = "PartPartNumber",
|
TKey = "PartPartNumber",
|
||||||
FieldKey = "PartPartNumber",
|
FieldKey = "PartPartNumber",
|
||||||
AyaObjectType = (int)AyaType.Part,
|
AType = (int)AyaType.Part,
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "partid",
|
SqlIdColumnName = "partid",
|
||||||
SqlValueColumnName = "partnumber"
|
SqlValueColumnName = "partnumber"
|
||||||
@@ -40,7 +40,7 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
TKey = "PartWarehouseName",
|
TKey = "PartWarehouseName",
|
||||||
FieldKey = "PartWarehouseName",
|
FieldKey = "PartWarehouseName",
|
||||||
AyaObjectType = (int)AyaType.PartWarehouse,
|
AType = (int)AyaType.PartWarehouse,
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "partwarehouseid",
|
SqlIdColumnName = "partwarehouseid",
|
||||||
SqlValueColumnName = "displaywarehouse"
|
SqlValueColumnName = "displaywarehouse"
|
||||||
@@ -51,7 +51,7 @@ namespace AyaNova.DataList
|
|||||||
FieldKey = "PartManufacturerID",
|
FieldKey = "PartManufacturerID",
|
||||||
TKey = "PartManufacturerID",
|
TKey = "PartManufacturerID",
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
AyaObjectType = (int)AyaType.Vendor,
|
AType = (int)AyaType.Vendor,
|
||||||
SqlIdColumnName = "manufactureid",
|
SqlIdColumnName = "manufactureid",
|
||||||
SqlValueColumnName = "displaymanufacturer"
|
SqlValueColumnName = "displaymanufacturer"
|
||||||
});
|
});
|
||||||
@@ -61,7 +61,7 @@ namespace AyaNova.DataList
|
|||||||
FieldKey = "PartWholesalerID",
|
FieldKey = "PartWholesalerID",
|
||||||
TKey = "PartWholesalerID",
|
TKey = "PartWholesalerID",
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
AyaObjectType = (int)AyaType.Vendor,
|
AType = (int)AyaType.Vendor,
|
||||||
SqlIdColumnName = "wholesalerid",
|
SqlIdColumnName = "wholesalerid",
|
||||||
SqlValueColumnName = "displaywholesaler"
|
SqlValueColumnName = "displaywholesaler"
|
||||||
});
|
});
|
||||||
@@ -71,7 +71,7 @@ namespace AyaNova.DataList
|
|||||||
FieldKey = "PartAlternativeWholesalerID",
|
FieldKey = "PartAlternativeWholesalerID",
|
||||||
TKey = "PartAlternativeWholesalerID",
|
TKey = "PartAlternativeWholesalerID",
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
AyaObjectType = (int)AyaType.Vendor,
|
AType = (int)AyaType.Vendor,
|
||||||
SqlIdColumnName = "alternativewholesalerid",
|
SqlIdColumnName = "alternativewholesalerid",
|
||||||
SqlValueColumnName = "displayalternativewholesaler"
|
SqlValueColumnName = "displayalternativewholesaler"
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
public PartWarehouseDataList()
|
public PartWarehouseDataList()
|
||||||
{
|
{
|
||||||
DefaultListObjectType = AyaType.PartWarehouse;
|
DefaultListAType = AyaType.PartWarehouse;
|
||||||
SQLFrom = "from apartwarehouse";
|
SQLFrom = "from apartwarehouse";
|
||||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
||||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||||
DefaultColumns = new List<string>() { "PartWarehouseName", "Active", "Tags" };
|
DefaultColumns = new List<string>() { "PartWarehouseName", "Active", "Tags" };
|
||||||
DefaultSortBy = new Dictionary<string, string>() { { "PartWarehouseName", "+" } };
|
DefaultSortBy = new Dictionary<string, string>() { { "PartWarehouseName", "+" } };
|
||||||
@@ -18,7 +18,7 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
TKey = "PartWarehouseName",
|
TKey = "PartWarehouseName",
|
||||||
FieldKey = "PartWarehouseName",
|
FieldKey = "PartWarehouseName",
|
||||||
AyaObjectType = (int)AyaType.PartWarehouse,
|
AType = (int)AyaType.PartWarehouse,
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "apartwarehouse.id",
|
SqlIdColumnName = "apartwarehouse.id",
|
||||||
SqlValueColumnName = "apartwarehouse.name",
|
SqlValueColumnName = "apartwarehouse.name",
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
public ProjectDataList()
|
public ProjectDataList()
|
||||||
{
|
{
|
||||||
DefaultListObjectType = AyaType.Project;
|
DefaultListAType = AyaType.Project;
|
||||||
SQLFrom = "from aproject left join auser on (aproject.projectoverseerid=auser.id)";
|
SQLFrom = "from aproject left join auser on (aproject.projectoverseerid=auser.id)";
|
||||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
||||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||||
DefaultColumns = new List<string>() { "projectname", "ProjectProjectOverseerID", "ProjectDateStarted", "ProjectDateCompleted",
|
DefaultColumns = new List<string>() { "projectname", "ProjectProjectOverseerID", "ProjectDateStarted", "ProjectDateCompleted",
|
||||||
"ProjectAccountNumber", "projectactive", "projecttags" };
|
"ProjectAccountNumber", "projectactive", "projecttags" };
|
||||||
@@ -19,7 +19,7 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
TKey = "ProjectName",
|
TKey = "ProjectName",
|
||||||
FieldKey = "projectname",
|
FieldKey = "projectname",
|
||||||
AyaObjectType = (int)AyaType.Project,
|
AType = (int)AyaType.Project,
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "aproject.id",
|
SqlIdColumnName = "aproject.id",
|
||||||
SqlValueColumnName = "aproject.name",
|
SqlValueColumnName = "aproject.name",
|
||||||
@@ -63,7 +63,7 @@ namespace AyaNova.DataList
|
|||||||
FieldKey = "ProjectProjectOverseerID",
|
FieldKey = "ProjectProjectOverseerID",
|
||||||
TKey = "ProjectProjectOverseerID",
|
TKey = "ProjectProjectOverseerID",
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
AyaObjectType = (int)AyaType.User,
|
AType = (int)AyaType.User,
|
||||||
SqlIdColumnName = "auser.id",
|
SqlIdColumnName = "auser.id",
|
||||||
SqlValueColumnName = "auser.name"
|
SqlValueColumnName = "auser.name"
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -6,13 +6,13 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
public PurchaseOrderDataList()
|
public PurchaseOrderDataList()
|
||||||
{
|
{
|
||||||
DefaultListObjectType = AyaType.PurchaseOrder;
|
DefaultListAType = AyaType.PurchaseOrder;
|
||||||
SQLFrom = "from apurchaseorder " +
|
SQLFrom = "from apurchaseorder " +
|
||||||
"left join avendor on (apurchaseorder.vendorid=avendor.id)" +
|
"left join avendor on (apurchaseorder.vendorid=avendor.id)" +
|
||||||
"left join acustomer on (apurchaseorder.dropshiptocustomerid=acustomer.id)" +
|
"left join acustomer on (apurchaseorder.dropshiptocustomerid=acustomer.id)" +
|
||||||
"left join aproject on (apurchaseorder.projectid=aproject.id)";
|
"left join aproject on (apurchaseorder.projectid=aproject.id)";
|
||||||
|
|
||||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
||||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||||
DefaultColumns = new List<string>() { "PurchaseOrderPONumber", "Vendor", "PurchaseOrderOrderedDate", "PurchaseOrderStatus",
|
DefaultColumns = new List<string>() { "PurchaseOrderPONumber", "Vendor", "PurchaseOrderOrderedDate", "PurchaseOrderStatus",
|
||||||
"PurchaseOrderExpectedReceiveDate" };
|
"PurchaseOrderExpectedReceiveDate" };
|
||||||
@@ -23,7 +23,7 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
TKey = "PurchaseOrderPONumber",
|
TKey = "PurchaseOrderPONumber",
|
||||||
FieldKey = "PurchaseOrderPONumber",
|
FieldKey = "PurchaseOrderPONumber",
|
||||||
AyaObjectType = (int)AyaType.PurchaseOrder,
|
AType = (int)AyaType.PurchaseOrder,
|
||||||
UiFieldDataType = (int)UiFieldDataType.Integer,
|
UiFieldDataType = (int)UiFieldDataType.Integer,
|
||||||
SqlIdColumnName = "apurchaseorder.id",
|
SqlIdColumnName = "apurchaseorder.id",
|
||||||
SqlValueColumnName = "apurchaseorder.serial",
|
SqlValueColumnName = "apurchaseorder.serial",
|
||||||
@@ -59,7 +59,7 @@ namespace AyaNova.DataList
|
|||||||
FieldKey = "PurchaseOrderDropShipToCustomerID",
|
FieldKey = "PurchaseOrderDropShipToCustomerID",
|
||||||
TKey = "PurchaseOrderDropShipToCustomerID",
|
TKey = "PurchaseOrderDropShipToCustomerID",
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
AyaObjectType = (int)AyaType.User,
|
AType = (int)AyaType.User,
|
||||||
SqlIdColumnName = "acustomer.id",
|
SqlIdColumnName = "acustomer.id",
|
||||||
SqlValueColumnName = "acustomer.name"
|
SqlValueColumnName = "acustomer.name"
|
||||||
});
|
});
|
||||||
@@ -77,7 +77,7 @@ namespace AyaNova.DataList
|
|||||||
FieldKey = "Vendor",
|
FieldKey = "Vendor",
|
||||||
TKey = "Vendor",
|
TKey = "Vendor",
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
AyaObjectType = (int)AyaType.User,
|
AType = (int)AyaType.User,
|
||||||
SqlIdColumnName = "avendor.id",
|
SqlIdColumnName = "avendor.id",
|
||||||
SqlValueColumnName = "avendor.name"
|
SqlValueColumnName = "avendor.name"
|
||||||
});
|
});
|
||||||
@@ -112,7 +112,7 @@ namespace AyaNova.DataList
|
|||||||
FieldKey = "Project",
|
FieldKey = "Project",
|
||||||
TKey = "Project",
|
TKey = "Project",
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
AyaObjectType = (int)AyaType.User,
|
AType = (int)AyaType.User,
|
||||||
SqlIdColumnName = "aproject.id",
|
SqlIdColumnName = "aproject.id",
|
||||||
SqlValueColumnName = "aproject.name"
|
SqlValueColumnName = "aproject.name"
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
public ReminderDataList()
|
public ReminderDataList()
|
||||||
{
|
{
|
||||||
DefaultListObjectType = AyaType.Reminder;
|
DefaultListAType = AyaType.Reminder;
|
||||||
SQLFrom = "from areminder";
|
SQLFrom = "from areminder";
|
||||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
||||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||||
DefaultColumns = new List<string>() { "ReminderName", "ReminderNotes", "ReminderStopDate", "ReminderStartDate" };
|
DefaultColumns = new List<string>() { "ReminderName", "ReminderNotes", "ReminderStopDate", "ReminderStartDate" };
|
||||||
DefaultSortBy = new Dictionary<string, string>() { { "ReminderStopDate", "-" } };
|
DefaultSortBy = new Dictionary<string, string>() { { "ReminderStopDate", "-" } };
|
||||||
@@ -19,7 +19,7 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
TKey = "ReminderName",
|
TKey = "ReminderName",
|
||||||
FieldKey = "ReminderName",
|
FieldKey = "ReminderName",
|
||||||
AyaObjectType = (int)AyaType.Reminder,
|
AType = (int)AyaType.Reminder,
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "areminder.id",
|
SqlIdColumnName = "areminder.id",
|
||||||
SqlValueColumnName = "areminder.name",
|
SqlValueColumnName = "areminder.name",
|
||||||
|
|||||||
@@ -6,11 +6,11 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
public ReportDataList()
|
public ReportDataList()
|
||||||
{
|
{
|
||||||
DefaultListObjectType = AyaType.Report;
|
DefaultListAType = AyaType.Report;
|
||||||
SQLFrom = "from aReport";
|
SQLFrom = "from aReport";
|
||||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
||||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||||
DefaultColumns = new List<string>() { "name", "objecttype", "active" };
|
DefaultColumns = new List<string>() { "name", "aType", "active" };
|
||||||
DefaultSortBy = new Dictionary<string, string>() { { "name", "+" } };
|
DefaultSortBy = new Dictionary<string, string>() { { "name", "+" } };
|
||||||
FieldDefinitions = new List<DataListFieldDefinition>();
|
FieldDefinitions = new List<DataListFieldDefinition>();
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
TKey = "Report",
|
TKey = "Report",
|
||||||
FieldKey = "name",
|
FieldKey = "name",
|
||||||
AyaObjectType = (int)AyaType.Report,
|
AType = (int)AyaType.Report,
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "aReport.id",
|
SqlIdColumnName = "aReport.id",
|
||||||
SqlValueColumnName = "aReport.name",
|
SqlValueColumnName = "aReport.name",
|
||||||
@@ -28,10 +28,10 @@ namespace AyaNova.DataList
|
|||||||
FieldDefinitions.Add(new DataListFieldDefinition
|
FieldDefinitions.Add(new DataListFieldDefinition
|
||||||
{
|
{
|
||||||
TKey = "AyaType",
|
TKey = "AyaType",
|
||||||
FieldKey = "objecttype",
|
FieldKey = "aType",
|
||||||
UiFieldDataType = (int)UiFieldDataType.Enum,
|
UiFieldDataType = (int)UiFieldDataType.Enum,
|
||||||
EnumType = AyaNova.Util.StringUtil.TrimTypeName(typeof(AyaType).ToString()),
|
EnumType = AyaNova.Util.StringUtil.TrimTypeName(typeof(AyaType).ToString()),
|
||||||
SqlValueColumnName = "areport.ObjectType"
|
SqlValueColumnName = "areport.AType"
|
||||||
});
|
});
|
||||||
|
|
||||||
FieldDefinitions.Add(new DataListFieldDefinition
|
FieldDefinitions.Add(new DataListFieldDefinition
|
||||||
|
|||||||
@@ -9,11 +9,11 @@ namespace AyaNova.DataList
|
|||||||
public ReviewDataList()
|
public ReviewDataList()
|
||||||
{
|
{
|
||||||
|
|
||||||
DefaultListObjectType = AyaType.Review;
|
DefaultListAType = AyaType.Review;
|
||||||
SQLFrom = "from areview "
|
SQLFrom = "from areview "
|
||||||
+ "left join auser uassto on (areview.userid=uassto.id) "
|
+ "left join auser uassto on (areview.userid=uassto.id) "
|
||||||
+ "left join auser uassby on (areview.assignedbyuserid=uassby.id)";
|
+ "left join auser uassby on (areview.assignedbyuserid=uassby.id)";
|
||||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
||||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||||
DefaultColumns = new List<string>() { "ReviewCompletedDate", "ReviewDueDate", "ReviewName", "Object", "AyaType", "ReviewNotes", "ReviewUserId" };
|
DefaultColumns = new List<string>() { "ReviewCompletedDate", "ReviewDueDate", "ReviewName", "Object", "AyaType", "ReviewNotes", "ReviewUserId" };
|
||||||
DefaultSortBy = new Dictionary<string, string>() { { "ReviewCompletedDate", "-" }, { "ReviewDueDate", "+" } };
|
DefaultSortBy = new Dictionary<string, string>() { { "ReviewCompletedDate", "-" }, { "ReviewDueDate", "+" } };
|
||||||
@@ -25,8 +25,8 @@ 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.objecttype)",
|
SqlValueColumnName = "AYGETNAME(areview.objectid, areview.aType)",
|
||||||
SqlAyTypeColumnName = "areview.objecttype"
|
SqlATypeColumnName = "areview.aType"
|
||||||
});
|
});
|
||||||
|
|
||||||
FieldDefinitions.Add(new DataListFieldDefinition
|
FieldDefinitions.Add(new DataListFieldDefinition
|
||||||
@@ -35,14 +35,14 @@ namespace AyaNova.DataList
|
|||||||
FieldKey = "AyaType",
|
FieldKey = "AyaType",
|
||||||
UiFieldDataType = (int)UiFieldDataType.Enum,
|
UiFieldDataType = (int)UiFieldDataType.Enum,
|
||||||
EnumType = AyaNova.Util.StringUtil.TrimTypeName(typeof(AyaType).ToString()),
|
EnumType = AyaNova.Util.StringUtil.TrimTypeName(typeof(AyaType).ToString()),
|
||||||
SqlValueColumnName = "areview.objecttype"
|
SqlValueColumnName = "areview.aType"
|
||||||
});
|
});
|
||||||
|
|
||||||
FieldDefinitions.Add(new DataListFieldDefinition
|
FieldDefinitions.Add(new DataListFieldDefinition
|
||||||
{
|
{
|
||||||
TKey = "ReviewName",
|
TKey = "ReviewName",
|
||||||
FieldKey = "ReviewName",
|
FieldKey = "ReviewName",
|
||||||
AyaObjectType = (int)AyaType.Review,
|
AType = (int)AyaType.Review,
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "areview.id",
|
SqlIdColumnName = "areview.id",
|
||||||
SqlValueColumnName = "areview.name",
|
SqlValueColumnName = "areview.name",
|
||||||
@@ -85,7 +85,7 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
TKey = "ReviewUserId",
|
TKey = "ReviewUserId",
|
||||||
FieldKey = "ReviewUserId",
|
FieldKey = "ReviewUserId",
|
||||||
AyaObjectType = (int)AyaType.User,
|
AType = (int)AyaType.User,
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "uassto.id",
|
SqlIdColumnName = "uassto.id",
|
||||||
SqlValueColumnName = "uassto.name"
|
SqlValueColumnName = "uassto.name"
|
||||||
@@ -95,7 +95,7 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
TKey = "ReviewAssignedByUserId",
|
TKey = "ReviewAssignedByUserId",
|
||||||
FieldKey = "ReviewAssignedByUserId",
|
FieldKey = "ReviewAssignedByUserId",
|
||||||
AyaObjectType = (int)AyaType.User,
|
AType = (int)AyaType.User,
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "uassby.id",
|
SqlIdColumnName = "uassby.id",
|
||||||
SqlValueColumnName = "uassby.name"
|
SqlValueColumnName = "uassby.name"
|
||||||
@@ -155,7 +155,7 @@ namespace AyaNova.DataList
|
|||||||
FieldKey = "metaobjecttype",
|
FieldKey = "metaobjecttype",
|
||||||
UiFieldDataType = (int)UiFieldDataType.Enum,
|
UiFieldDataType = (int)UiFieldDataType.Enum,
|
||||||
EnumType = AyaNova.Util.StringUtil.TrimTypeName(typeof(AyaType).ToString()),
|
EnumType = AyaNova.Util.StringUtil.TrimTypeName(typeof(AyaType).ToString()),
|
||||||
SqlValueColumnName = "areview.objecttype",
|
SqlValueColumnName = "areview.aType",
|
||||||
IsMeta = true
|
IsMeta = true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,9 +9,9 @@ namespace AyaNova.DataList
|
|||||||
public ServiceBankDataList()
|
public ServiceBankDataList()
|
||||||
{
|
{
|
||||||
|
|
||||||
DefaultListObjectType = AyaType.ServiceBank;
|
DefaultListAType = AyaType.ServiceBank;
|
||||||
SQLFrom = "from aservicebank";
|
SQLFrom = "from aservicebank";
|
||||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
||||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||||
DefaultColumns = new List<string>() {
|
DefaultColumns = new List<string>() {
|
||||||
"ServiceBankCreated", "Object", "ServiceBankCurrency", "ServiceBankCurrencyBalance", "ServiceBankIncidents",
|
"ServiceBankCreated", "Object", "ServiceBankCurrency", "ServiceBankCurrencyBalance", "ServiceBankIncidents",
|
||||||
@@ -22,12 +22,12 @@ namespace AyaNova.DataList
|
|||||||
|
|
||||||
FieldDefinitions.Add(new DataListFieldDefinition
|
FieldDefinitions.Add(new DataListFieldDefinition
|
||||||
{
|
{
|
||||||
TKey = "ServiceBankSourceRootObjectType",
|
TKey = "ServiceBankSourceRootAType",
|
||||||
FieldKey = "ServiceBankSourceRootObjectType",
|
FieldKey = "ServiceBankSourceRootAType",
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "aservicebank.sourceid",
|
SqlIdColumnName = "aservicebank.sourceid",
|
||||||
SqlValueColumnName = "AYGETNAME(aservicebank.sourceid, aservicebank.sourcetype)",
|
SqlValueColumnName = "AYGETNAME(aservicebank.sourceid, aservicebank.sourcetype)",
|
||||||
SqlAyTypeColumnName = "aservicebank.sourcetype"
|
SqlATypeColumnName = "aservicebank.sourcetype"
|
||||||
});
|
});
|
||||||
|
|
||||||
FieldDefinitions.Add(new DataListFieldDefinition
|
FieldDefinitions.Add(new DataListFieldDefinition
|
||||||
@@ -36,8 +36,8 @@ namespace AyaNova.DataList
|
|||||||
FieldKey = "Object",
|
FieldKey = "Object",
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "aservicebank.objectid",
|
SqlIdColumnName = "aservicebank.objectid",
|
||||||
SqlValueColumnName = "AYGETNAME(aservicebank.objectid, aservicebank.objecttype)",
|
SqlValueColumnName = "AYGETNAME(aservicebank.objectid, aservicebank.aType)",
|
||||||
SqlAyTypeColumnName = "aservicebank.objecttype"
|
SqlATypeColumnName = "aservicebank.aType"
|
||||||
});
|
});
|
||||||
|
|
||||||
FieldDefinitions.Add(new DataListFieldDefinition
|
FieldDefinitions.Add(new DataListFieldDefinition
|
||||||
@@ -46,14 +46,14 @@ namespace AyaNova.DataList
|
|||||||
FieldKey = "AyaType",
|
FieldKey = "AyaType",
|
||||||
UiFieldDataType = (int)UiFieldDataType.Enum,
|
UiFieldDataType = (int)UiFieldDataType.Enum,
|
||||||
EnumType = AyaNova.Util.StringUtil.TrimTypeName(typeof(AyaType).ToString()),
|
EnumType = AyaNova.Util.StringUtil.TrimTypeName(typeof(AyaType).ToString()),
|
||||||
SqlValueColumnName = "aservicebank.objecttype"
|
SqlValueColumnName = "aservicebank.aType"
|
||||||
});
|
});
|
||||||
|
|
||||||
FieldDefinitions.Add(new DataListFieldDefinition
|
FieldDefinitions.Add(new DataListFieldDefinition
|
||||||
{
|
{
|
||||||
TKey = "ServiceBankDescription",
|
TKey = "ServiceBankDescription",
|
||||||
FieldKey = "ServiceBankDescription",
|
FieldKey = "ServiceBankDescription",
|
||||||
AyaObjectType = (int)AyaType.ServiceBank,
|
AType = (int)AyaType.ServiceBank,
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "aservicebank.id",
|
SqlIdColumnName = "aservicebank.id",
|
||||||
SqlValueColumnName = "aservicebank.name",
|
SqlValueColumnName = "aservicebank.name",
|
||||||
@@ -132,7 +132,7 @@ namespace AyaNova.DataList
|
|||||||
FieldKey = "metaobjecttype",
|
FieldKey = "metaobjecttype",
|
||||||
UiFieldDataType = (int)UiFieldDataType.Enum,
|
UiFieldDataType = (int)UiFieldDataType.Enum,
|
||||||
EnumType = AyaNova.Util.StringUtil.TrimTypeName(typeof(AyaType).ToString()),
|
EnumType = AyaNova.Util.StringUtil.TrimTypeName(typeof(AyaType).ToString()),
|
||||||
SqlValueColumnName = "aservicebank.objecttype",
|
SqlValueColumnName = "aservicebank.aType",
|
||||||
IsMeta = true
|
IsMeta = true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
public ServiceRateDataList()
|
public ServiceRateDataList()
|
||||||
{
|
{
|
||||||
DefaultListObjectType = AyaType.ServiceRate;
|
DefaultListAType = AyaType.ServiceRate;
|
||||||
SQLFrom = "from aservicerate";
|
SQLFrom = "from aservicerate";
|
||||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
||||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||||
DefaultColumns = new List<string>() { "Name", "Cost", "RateCharge", "RateUnitChargeDescriptionID", "Active" };
|
DefaultColumns = new List<string>() { "Name", "Cost", "RateCharge", "RateUnitChargeDescriptionID", "Active" };
|
||||||
DefaultSortBy = new Dictionary<string, string>() { { "Name", "+" } };
|
DefaultSortBy = new Dictionary<string, string>() { { "Name", "+" } };
|
||||||
@@ -18,7 +18,7 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
TKey = "Name",
|
TKey = "Name",
|
||||||
FieldKey = "Name",
|
FieldKey = "Name",
|
||||||
AyaObjectType = (int)AyaType.ServiceRate,
|
AType = (int)AyaType.ServiceRate,
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "aservicerate.id",
|
SqlIdColumnName = "aservicerate.id",
|
||||||
SqlValueColumnName = "aservicerate.name",
|
SqlValueColumnName = "aservicerate.name",
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
public TaxCodeDataList()
|
public TaxCodeDataList()
|
||||||
{
|
{
|
||||||
DefaultListObjectType = AyaType.TaxCode;
|
DefaultListAType = AyaType.TaxCode;
|
||||||
SQLFrom = "from ataxcode";
|
SQLFrom = "from ataxcode";
|
||||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
||||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||||
DefaultColumns = new List<string>() { "Name", "TaxCodeTaxA", "TaxCodeTaxB", "TaxCodeTaxOnTax", "Active" };
|
DefaultColumns = new List<string>() { "Name", "TaxCodeTaxA", "TaxCodeTaxB", "TaxCodeTaxOnTax", "Active" };
|
||||||
DefaultSortBy = new Dictionary<string, string>() { { "Name", "+" } };
|
DefaultSortBy = new Dictionary<string, string>() { { "Name", "+" } };
|
||||||
@@ -18,7 +18,7 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
TKey = "Name",
|
TKey = "Name",
|
||||||
FieldKey = "Name",
|
FieldKey = "Name",
|
||||||
AyaObjectType = (int)AyaType.TaxCode,
|
AType = (int)AyaType.TaxCode,
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "ataxcode.id",
|
SqlIdColumnName = "ataxcode.id",
|
||||||
SqlValueColumnName = "ataxcode.name",
|
SqlValueColumnName = "ataxcode.name",
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
public TestWidgetDataList()
|
public TestWidgetDataList()
|
||||||
{
|
{
|
||||||
DefaultListObjectType = AyaType.Widget;
|
DefaultListAType = AyaType.Widget;
|
||||||
SQLFrom = "from awidget left join auser on (awidget.userid=auser.id)";
|
SQLFrom = "from awidget left join auser on (awidget.userid=auser.id)";
|
||||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
||||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||||
DefaultColumns = new List<string>() { "widgetname", "widgetserial", "widgetdollaramount", "widgetusertype", "widgetstartdate", "widgetactive", "username" };
|
DefaultColumns = new List<string>() { "widgetname", "widgetserial", "widgetdollaramount", "widgetusertype", "widgetstartdate", "widgetactive", "username" };
|
||||||
DefaultSortBy = new Dictionary<string, string>() { { "widgetname", "+" } };
|
DefaultSortBy = new Dictionary<string, string>() { { "widgetname", "+" } };
|
||||||
@@ -18,7 +18,7 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
TKey = "WidgetName",
|
TKey = "WidgetName",
|
||||||
FieldKey = "widgetname",
|
FieldKey = "widgetname",
|
||||||
AyaObjectType = (int)AyaType.Widget,
|
AType = (int)AyaType.Widget,
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "awidget.id",
|
SqlIdColumnName = "awidget.id",
|
||||||
SqlValueColumnName = "awidget.name",
|
SqlValueColumnName = "awidget.name",
|
||||||
@@ -87,7 +87,7 @@ namespace AyaNova.DataList
|
|||||||
FieldKey = "username",
|
FieldKey = "username",
|
||||||
TKey = "User",
|
TKey = "User",
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
AyaObjectType = (int)AyaType.User,
|
AType = (int)AyaType.User,
|
||||||
SqlIdColumnName = "auser.id",
|
SqlIdColumnName = "auser.id",
|
||||||
SqlValueColumnName = "auser.name"
|
SqlValueColumnName = "auser.name"
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
public TranslationDataList()
|
public TranslationDataList()
|
||||||
{
|
{
|
||||||
DefaultListObjectType = AyaType.Translation;
|
DefaultListAType = AyaType.Translation;
|
||||||
SQLFrom = "from atranslation";
|
SQLFrom = "from atranslation";
|
||||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
||||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||||
DefaultColumns = new List<string>() { "name", "stock", "cjkindex" };
|
DefaultColumns = new List<string>() { "name", "stock", "cjkindex" };
|
||||||
DefaultSortBy = new Dictionary<string, string>() { { "name", "+" } };
|
DefaultSortBy = new Dictionary<string, string>() { { "name", "+" } };
|
||||||
@@ -18,7 +18,7 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
TKey = "Translation",
|
TKey = "Translation",
|
||||||
FieldKey = "name",
|
FieldKey = "name",
|
||||||
AyaObjectType = (int)AyaType.Translation,
|
AType = (int)AyaType.Translation,
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "atranslation.id",
|
SqlIdColumnName = "atranslation.id",
|
||||||
SqlValueColumnName = "atranslation.name",
|
SqlValueColumnName = "atranslation.name",
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
public TravelRateDataList()
|
public TravelRateDataList()
|
||||||
{
|
{
|
||||||
DefaultListObjectType = AyaType.TravelRate;
|
DefaultListAType = AyaType.TravelRate;
|
||||||
SQLFrom = "from atravelrate";
|
SQLFrom = "from atravelrate";
|
||||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
||||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||||
DefaultColumns = new List<string>() { "Name", "Cost", "RateCharge", "RateUnitChargeDescriptionID", "Active" };
|
DefaultColumns = new List<string>() { "Name", "Cost", "RateCharge", "RateUnitChargeDescriptionID", "Active" };
|
||||||
DefaultSortBy = new Dictionary<string, string>() { { "Name", "+" } };
|
DefaultSortBy = new Dictionary<string, string>() { { "Name", "+" } };
|
||||||
@@ -18,7 +18,7 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
TKey = "Name",
|
TKey = "Name",
|
||||||
FieldKey = "Name",
|
FieldKey = "Name",
|
||||||
AyaObjectType = (int)AyaType.TravelRate,
|
AType = (int)AyaType.TravelRate,
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "atravelrate.id",
|
SqlIdColumnName = "atravelrate.id",
|
||||||
SqlValueColumnName = "atravelrate.name",
|
SqlValueColumnName = "atravelrate.name",
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
public UnitDataList()
|
public UnitDataList()
|
||||||
{
|
{
|
||||||
DefaultListObjectType = AyaType.Unit;
|
DefaultListAType = AyaType.Unit;
|
||||||
SQLFrom = "from aunit as amainunit "
|
SQLFrom = "from aunit as amainunit "
|
||||||
+ "left join acustomer on (amainunit.customerid=acustomer.id) "
|
+ "left join acustomer on (amainunit.customerid=acustomer.id) "
|
||||||
+ "left join aunit as aparentunit on (amainunit.parentunitid=aparentunit.id) "
|
+ "left join aunit as aparentunit on (amainunit.parentunitid=aparentunit.id) "
|
||||||
@@ -15,7 +15,7 @@ namespace AyaNova.DataList
|
|||||||
+ "left join aunit as areplacedbyunit on (amainunit.replacedbyunitid=areplacedbyunit.id) "
|
+ "left join aunit as areplacedbyunit on (amainunit.replacedbyunitid=areplacedbyunit.id) "
|
||||||
+ "left join acontract on (amainunit.contractid=acontract.id)";
|
+ "left join acontract on (amainunit.contractid=acontract.id)";
|
||||||
|
|
||||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
||||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||||
DefaultColumns = new List<string>() { "UnitSerial", "UnitModel", "Customer", "Active" };
|
DefaultColumns = new List<string>() { "UnitSerial", "UnitModel", "Customer", "Active" };
|
||||||
DefaultSortBy = new Dictionary<string, string>() { { "UnitSerial", "+" } };
|
DefaultSortBy = new Dictionary<string, string>() { { "UnitSerial", "+" } };
|
||||||
@@ -25,7 +25,7 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
TKey = "UnitSerial",
|
TKey = "UnitSerial",
|
||||||
FieldKey = "UnitSerial",
|
FieldKey = "UnitSerial",
|
||||||
AyaObjectType = (int)AyaType.Unit,
|
AType = (int)AyaType.Unit,
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "amainunit.id",
|
SqlIdColumnName = "amainunit.id",
|
||||||
SqlValueColumnName = "amainunit.serial",
|
SqlValueColumnName = "amainunit.serial",
|
||||||
@@ -61,7 +61,7 @@ namespace AyaNova.DataList
|
|||||||
FieldKey = "Customer",
|
FieldKey = "Customer",
|
||||||
TKey = "Customer",
|
TKey = "Customer",
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
AyaObjectType = (int)AyaType.Customer,
|
AType = (int)AyaType.Customer,
|
||||||
SqlIdColumnName = "acustomer.id",
|
SqlIdColumnName = "acustomer.id",
|
||||||
SqlValueColumnName = "acustomer.name"
|
SqlValueColumnName = "acustomer.name"
|
||||||
});
|
});
|
||||||
@@ -71,7 +71,7 @@ namespace AyaNova.DataList
|
|||||||
FieldKey = "UnitParentUnitID",
|
FieldKey = "UnitParentUnitID",
|
||||||
TKey = "UnitParentUnitID",
|
TKey = "UnitParentUnitID",
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
AyaObjectType = (int)AyaType.Unit,
|
AType = (int)AyaType.Unit,
|
||||||
SqlIdColumnName = "aparentunit.id",
|
SqlIdColumnName = "aparentunit.id",
|
||||||
SqlValueColumnName = "aparentunit.serial"
|
SqlValueColumnName = "aparentunit.serial"
|
||||||
});
|
});
|
||||||
@@ -81,7 +81,7 @@ namespace AyaNova.DataList
|
|||||||
FieldKey = "UnitReplacedByUnitID",
|
FieldKey = "UnitReplacedByUnitID",
|
||||||
TKey = "UnitReplacedByUnitID",
|
TKey = "UnitReplacedByUnitID",
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
AyaObjectType = (int)AyaType.Unit,
|
AType = (int)AyaType.Unit,
|
||||||
SqlIdColumnName = "areplacedbyunit.id",
|
SqlIdColumnName = "areplacedbyunit.id",
|
||||||
SqlValueColumnName = "areplacedbyunit.serial"
|
SqlValueColumnName = "areplacedbyunit.serial"
|
||||||
});
|
});
|
||||||
@@ -91,7 +91,7 @@ namespace AyaNova.DataList
|
|||||||
FieldKey = "UnitModel",
|
FieldKey = "UnitModel",
|
||||||
TKey = "UnitModel",
|
TKey = "UnitModel",
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
AyaObjectType = (int)AyaType.UnitModel,
|
AType = (int)AyaType.UnitModel,
|
||||||
SqlIdColumnName = "aunitmodel.id",
|
SqlIdColumnName = "aunitmodel.id",
|
||||||
SqlValueColumnName = "aunitmodel.number"
|
SqlValueColumnName = "aunitmodel.number"
|
||||||
});
|
});
|
||||||
@@ -117,7 +117,7 @@ namespace AyaNova.DataList
|
|||||||
FieldKey = "UnitPurchaseFromID",
|
FieldKey = "UnitPurchaseFromID",
|
||||||
TKey = "UnitPurchaseFromID",
|
TKey = "UnitPurchaseFromID",
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
AyaObjectType = (int)AyaType.Vendor,
|
AType = (int)AyaType.Vendor,
|
||||||
SqlIdColumnName = "avendor.id",
|
SqlIdColumnName = "avendor.id",
|
||||||
SqlValueColumnName = "avendor.name"
|
SqlValueColumnName = "avendor.name"
|
||||||
});
|
});
|
||||||
@@ -183,7 +183,7 @@ namespace AyaNova.DataList
|
|||||||
TKey = "Contract",
|
TKey = "Contract",
|
||||||
FieldKey = "unitcontract",
|
FieldKey = "unitcontract",
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
AyaObjectType = (int)AyaType.Contract,
|
AType = (int)AyaType.Contract,
|
||||||
SqlIdColumnName = "acontract.id",
|
SqlIdColumnName = "acontract.id",
|
||||||
SqlValueColumnName = "acontract.name"
|
SqlValueColumnName = "acontract.name"
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
public UnitModelDataList()
|
public UnitModelDataList()
|
||||||
{
|
{
|
||||||
DefaultListObjectType = AyaType.UnitModel;
|
DefaultListAType = AyaType.UnitModel;
|
||||||
SQLFrom = "from aunitmodel left join avendor on (aunitmodel.vendorid=avendor.id)";
|
SQLFrom = "from aunitmodel left join avendor on (aunitmodel.vendorid=avendor.id)";
|
||||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
||||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||||
DefaultColumns = new List<string>() { "UnitModelModelNumber", "Name", "UnitModelVendorID", "Active" };
|
DefaultColumns = new List<string>() { "UnitModelModelNumber", "Name", "UnitModelVendorID", "Active" };
|
||||||
DefaultSortBy = new Dictionary<string, string>() { { "UnitModelModelNumber", "+" } };
|
DefaultSortBy = new Dictionary<string, string>() { { "UnitModelModelNumber", "+" } };
|
||||||
@@ -18,7 +18,7 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
TKey = "UnitModelModelNumber",
|
TKey = "UnitModelModelNumber",
|
||||||
FieldKey = "UnitModelModelNumber",
|
FieldKey = "UnitModelModelNumber",
|
||||||
AyaObjectType = (int)AyaType.UnitModel,
|
AType = (int)AyaType.UnitModel,
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "aunitmodel.id",
|
SqlIdColumnName = "aunitmodel.id",
|
||||||
SqlValueColumnName = "aunitmodel.number",
|
SqlValueColumnName = "aunitmodel.number",
|
||||||
@@ -54,7 +54,7 @@ namespace AyaNova.DataList
|
|||||||
FieldKey = "UnitModelVendorID",
|
FieldKey = "UnitModelVendorID",
|
||||||
TKey = "UnitModelVendorID",
|
TKey = "UnitModelVendorID",
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
AyaObjectType = (int)AyaType.Vendor,
|
AType = (int)AyaType.Vendor,
|
||||||
SqlIdColumnName = "avendor.id",
|
SqlIdColumnName = "avendor.id",
|
||||||
SqlValueColumnName = "avendor.name"
|
SqlValueColumnName = "avendor.name"
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
public VendorDataList()
|
public VendorDataList()
|
||||||
{
|
{
|
||||||
DefaultListObjectType = AyaType.Vendor;
|
DefaultListAType = AyaType.Vendor;
|
||||||
SQLFrom = "from avendor";
|
SQLFrom = "from avendor";
|
||||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
|
||||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||||
DefaultColumns = new List<string>() { "vendorname", "vendorphone1", "vendoremail", "vendortags" };
|
DefaultColumns = new List<string>() { "vendorname", "vendorphone1", "vendoremail", "vendortags" };
|
||||||
DefaultSortBy = new Dictionary<string, string>() { { "vendorname", "+" } };
|
DefaultSortBy = new Dictionary<string, string>() { { "vendorname", "+" } };
|
||||||
@@ -18,7 +18,7 @@ namespace AyaNova.DataList
|
|||||||
{
|
{
|
||||||
TKey = "VendorName",
|
TKey = "VendorName",
|
||||||
FieldKey = "vendorname",
|
FieldKey = "vendorname",
|
||||||
AyaObjectType = (int)AyaType.Vendor,
|
AType = (int)AyaType.Vendor,
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "avendor.id",
|
SqlIdColumnName = "avendor.id",
|
||||||
SqlValueColumnName = "avendor.name",
|
SqlValueColumnName = "avendor.name",
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ namespace AyaNova.PickList
|
|||||||
public string SQLFrom { get; set; }
|
public string SQLFrom { get; set; }
|
||||||
public List<AyaPickListFieldDefinition> ColumnDefinitions { get; set; }
|
public List<AyaPickListFieldDefinition> ColumnDefinitions { get; set; }
|
||||||
public AuthorizationRoles AllowedRoles { get; set; }
|
public AuthorizationRoles AllowedRoles { get; set; }
|
||||||
public AyaType DefaultListObjectType { get; set; }
|
public AyaType DefaultListAType { get; set; }
|
||||||
public string DefaultTemplate { get; set; }
|
public string DefaultTemplate { get; set; }
|
||||||
//return array of field keys in list view
|
//return array of field keys in list view
|
||||||
public List<string> GetFieldListFromTemplate(JArray template)
|
public List<string> GetFieldListFromTemplate(JArray template)
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ namespace AyaNova.PickList
|
|||||||
public ContractPickList()
|
public ContractPickList()
|
||||||
{
|
{
|
||||||
|
|
||||||
DefaultListObjectType = AyaType.Contract;
|
DefaultListAType = AyaType.Contract;
|
||||||
SQLFrom = "from acontract";
|
SQLFrom = "from acontract";
|
||||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListObjectType).Select;
|
AllowedRoles = BizRoles.GetRoleSet(DefaultListAType).Select;
|
||||||
dynamic dTemplate = new JArray();
|
dynamic dTemplate = new JArray();
|
||||||
|
|
||||||
dynamic cm = new JObject();
|
dynamic cm = new JObject();
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ namespace AyaNova.PickList
|
|||||||
public CustomerPickList()
|
public CustomerPickList()
|
||||||
{
|
{
|
||||||
|
|
||||||
DefaultListObjectType = AyaType.Customer;
|
DefaultListAType = AyaType.Customer;
|
||||||
SQLFrom = "from acustomer";
|
SQLFrom = "from acustomer";
|
||||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListObjectType).Select;
|
AllowedRoles = BizRoles.GetRoleSet(DefaultListAType).Select;
|
||||||
dynamic dTemplate = new JArray();
|
dynamic dTemplate = new JArray();
|
||||||
|
|
||||||
dynamic cm = new JObject();
|
dynamic cm = new JObject();
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ namespace AyaNova.PickList
|
|||||||
public HeadOfficePickList()
|
public HeadOfficePickList()
|
||||||
{
|
{
|
||||||
|
|
||||||
DefaultListObjectType = AyaType.HeadOffice;
|
DefaultListAType = AyaType.HeadOffice;
|
||||||
SQLFrom = "from aheadoffice";
|
SQLFrom = "from aheadoffice";
|
||||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListObjectType).Select;
|
AllowedRoles = BizRoles.GetRoleSet(DefaultListAType).Select;
|
||||||
dynamic dTemplate = new JArray();
|
dynamic dTemplate = new JArray();
|
||||||
|
|
||||||
dynamic cm = new JObject();
|
dynamic cm = new JObject();
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace AyaNova.PickList
|
|||||||
//allowed roles to access this list
|
//allowed roles to access this list
|
||||||
AuthorizationRoles AllowedRoles { get; set; }
|
AuthorizationRoles AllowedRoles { get; set; }
|
||||||
//Default object type to open for rows of this list (use no object if no)
|
//Default object type to open for rows of this list (use no object if no)
|
||||||
AyaType DefaultListObjectType { get; set; }
|
AyaType DefaultListAType { get; set; }
|
||||||
//Default / STOCK template when none is specified
|
//Default / STOCK template when none is specified
|
||||||
string DefaultTemplate { get; set; }
|
string DefaultTemplate { get; set; }
|
||||||
List<string> GetFieldListFromTemplate(JArray fieldListArray);
|
List<string> GetFieldListFromTemplate(JArray fieldListArray);
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ namespace AyaNova.PickList
|
|||||||
public LoanUnitPickList()
|
public LoanUnitPickList()
|
||||||
{
|
{
|
||||||
|
|
||||||
DefaultListObjectType = AyaType.LoanUnit;
|
DefaultListAType = AyaType.LoanUnit;
|
||||||
SQLFrom = "from aloanunit";
|
SQLFrom = "from aloanunit";
|
||||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListObjectType).Select;
|
AllowedRoles = BizRoles.GetRoleSet(DefaultListAType).Select;
|
||||||
dynamic dTemplate = new JArray();
|
dynamic dTemplate = new JArray();
|
||||||
dynamic cm = null;
|
dynamic cm = null;
|
||||||
|
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ namespace AyaNova.PickList
|
|||||||
public PartAssemblyPickList()
|
public PartAssemblyPickList()
|
||||||
{
|
{
|
||||||
|
|
||||||
DefaultListObjectType = AyaType.PartAssembly;
|
DefaultListAType = AyaType.PartAssembly;
|
||||||
SQLFrom = "from apartassembly";
|
SQLFrom = "from apartassembly";
|
||||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListObjectType).Select;
|
AllowedRoles = BizRoles.GetRoleSet(DefaultListAType).Select;
|
||||||
dynamic dTemplate = new JArray();
|
dynamic dTemplate = new JArray();
|
||||||
dynamic cm = null;
|
dynamic cm = null;
|
||||||
|
|
||||||
|
|||||||
@@ -8,12 +8,12 @@ namespace AyaNova.PickList
|
|||||||
public PartPickList()
|
public PartPickList()
|
||||||
{
|
{
|
||||||
|
|
||||||
DefaultListObjectType = AyaType.Part;
|
DefaultListAType = AyaType.Part;
|
||||||
SQLFrom = "from apart "
|
SQLFrom = "from apart "
|
||||||
+ "left join avendor as amanufacturer on (apart.manufacturerid = amanufacturer.id) "
|
+ "left join avendor as amanufacturer on (apart.manufacturerid = amanufacturer.id) "
|
||||||
+ "left join avendor as awholesaler on (apart.wholesalerid = awholesaler.id) "
|
+ "left join avendor as awholesaler on (apart.wholesalerid = awholesaler.id) "
|
||||||
+ "left join avendor as aalternativewholesaler on (apart.alternativewholesalerid = aalternativewholesaler.id) ";
|
+ "left join avendor as aalternativewholesaler on (apart.alternativewholesalerid = aalternativewholesaler.id) ";
|
||||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListObjectType).Select;
|
AllowedRoles = BizRoles.GetRoleSet(DefaultListAType).Select;
|
||||||
dynamic dTemplate = new JArray();
|
dynamic dTemplate = new JArray();
|
||||||
dynamic cm = null;
|
dynamic cm = null;
|
||||||
|
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ namespace AyaNova.PickList
|
|||||||
public PartWarehousePickList()
|
public PartWarehousePickList()
|
||||||
{
|
{
|
||||||
|
|
||||||
DefaultListObjectType = AyaType.PartWarehouse;
|
DefaultListAType = AyaType.PartWarehouse;
|
||||||
SQLFrom = "from apartwarehouse";
|
SQLFrom = "from apartwarehouse";
|
||||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListObjectType).Select;
|
AllowedRoles = BizRoles.GetRoleSet(DefaultListAType).Select;
|
||||||
dynamic dTemplate = new JArray();
|
dynamic dTemplate = new JArray();
|
||||||
dynamic cm = null;
|
dynamic cm = null;
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ namespace AyaNova.PickList
|
|||||||
//Sort out effective Template
|
//Sort out effective Template
|
||||||
string Template = null;
|
string Template = null;
|
||||||
//Attempt to fetch custom template
|
//Attempt to fetch custom template
|
||||||
var t = await ct.PickListTemplate.FirstOrDefaultAsync(z => z.Id == ((long)PickList.DefaultListObjectType));
|
var t = await ct.PickListTemplate.FirstOrDefaultAsync(z => z.Id == ((long)PickList.DefaultListAType));
|
||||||
if (t == null)
|
if (t == null)
|
||||||
{
|
{
|
||||||
Template = PickList.DefaultTemplate;
|
Template = PickList.DefaultTemplate;
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ namespace AyaNova.PickList
|
|||||||
AyaPickListFieldDefinition rowIdColumn = pickList.ColumnDefinitions.FirstOrDefault(z => z.IsRowId == true);
|
AyaPickListFieldDefinition rowIdColumn = pickList.ColumnDefinitions.FirstOrDefault(z => z.IsRowId == true);
|
||||||
//this should only happen with a development error
|
//this should only happen with a development error
|
||||||
if (rowIdColumn == null)
|
if (rowIdColumn == null)
|
||||||
throw new System.ArgumentNullException($"DEV ERROR in PickListSqlBuilder.cs: picklist for {pickList.DefaultListObjectType.ToString()} has no rowId column specified in columnDefinitions list");
|
throw new System.ArgumentNullException($"DEV ERROR in PickListSqlBuilder.cs: picklist for {pickList.DefaultListAType.ToString()} has no rowId column specified in columnDefinitions list");
|
||||||
PlIdSelectFragment = rowIdColumn.SqlIdColumnName + " as plId";
|
PlIdSelectFragment = rowIdColumn.SqlIdColumnName + " as plId";
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ namespace AyaNova.PickList
|
|||||||
public ProjectPickList()
|
public ProjectPickList()
|
||||||
{
|
{
|
||||||
|
|
||||||
DefaultListObjectType = AyaType.Project;
|
DefaultListAType = AyaType.Project;
|
||||||
SQLFrom = "from aproject";
|
SQLFrom = "from aproject";
|
||||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListObjectType).Select;
|
AllowedRoles = BizRoles.GetRoleSet(DefaultListAType).Select;
|
||||||
dynamic dTemplate = new JArray();
|
dynamic dTemplate = new JArray();
|
||||||
dynamic cm = null;
|
dynamic cm = null;
|
||||||
|
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace AyaNova.PickList
|
|||||||
public ServiceRatePickList()
|
public ServiceRatePickList()
|
||||||
{
|
{
|
||||||
|
|
||||||
DefaultListObjectType = AyaType.ServiceRate;
|
DefaultListAType = AyaType.ServiceRate;
|
||||||
SQLFrom = "from aservicerate";
|
SQLFrom = "from aservicerate";
|
||||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListObjectType).Select;
|
AllowedRoles = BizRoles.GetRoleSet(DefaultListAType).Select;
|
||||||
dynamic dTemplate = new JArray();
|
dynamic dTemplate = new JArray();
|
||||||
|
|
||||||
dynamic cm = new JObject();
|
dynamic cm = new JObject();
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ namespace AyaNova.PickList
|
|||||||
public TaxCodePickList()
|
public TaxCodePickList()
|
||||||
{
|
{
|
||||||
|
|
||||||
DefaultListObjectType = AyaType.TaxCode;
|
DefaultListAType = AyaType.TaxCode;
|
||||||
SQLFrom = "from ataxcode";
|
SQLFrom = "from ataxcode";
|
||||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListObjectType).Select;
|
AllowedRoles = BizRoles.GetRoleSet(DefaultListAType).Select;
|
||||||
dynamic dTemplate = new JArray();
|
dynamic dTemplate = new JArray();
|
||||||
|
|
||||||
dynamic cm = new JObject();
|
dynamic cm = new JObject();
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ namespace AyaNova.PickList
|
|||||||
public TravelRatePickList()
|
public TravelRatePickList()
|
||||||
{
|
{
|
||||||
|
|
||||||
DefaultListObjectType = AyaType.TravelRate;
|
DefaultListAType = AyaType.TravelRate;
|
||||||
SQLFrom = "from atravelrate";
|
SQLFrom = "from atravelrate";
|
||||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListObjectType).Select;
|
AllowedRoles = BizRoles.GetRoleSet(DefaultListAType).Select;
|
||||||
dynamic dTemplate = new JArray();
|
dynamic dTemplate = new JArray();
|
||||||
|
|
||||||
dynamic cm = new JObject();
|
dynamic cm = new JObject();
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ namespace AyaNova.PickList
|
|||||||
public UnitModelPickList()
|
public UnitModelPickList()
|
||||||
{
|
{
|
||||||
|
|
||||||
DefaultListObjectType = AyaType.UnitModel;
|
DefaultListAType = AyaType.UnitModel;
|
||||||
SQLFrom = "from aunitmodel left join avendor on (aunitmodel.vendorid=avendor.id)";
|
SQLFrom = "from aunitmodel left join avendor on (aunitmodel.vendorid=avendor.id)";
|
||||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListObjectType).Select;
|
AllowedRoles = BizRoles.GetRoleSet(DefaultListAType).Select;
|
||||||
dynamic dTemplate = new JArray();
|
dynamic dTemplate = new JArray();
|
||||||
dynamic cm = null;
|
dynamic cm = null;
|
||||||
|
|
||||||
|
|||||||
@@ -8,12 +8,12 @@ namespace AyaNova.PickList
|
|||||||
public UnitPickList()
|
public UnitPickList()
|
||||||
{
|
{
|
||||||
|
|
||||||
DefaultListObjectType = AyaType.Unit;
|
DefaultListAType = AyaType.Unit;
|
||||||
SQLFrom = "from aunit "
|
SQLFrom = "from aunit "
|
||||||
+ "left join aunitmodel on (aunit.unitmodelid=aunitmodel.id) "
|
+ "left join aunitmodel on (aunit.unitmodelid=aunitmodel.id) "
|
||||||
+ "left join avendor on (aunitmodel.vendorid=avendor.id) ";
|
+ "left join avendor on (aunitmodel.vendorid=avendor.id) ";
|
||||||
|
|
||||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListObjectType).Select;
|
AllowedRoles = BizRoles.GetRoleSet(DefaultListAType).Select;
|
||||||
dynamic dTemplate = new JArray();
|
dynamic dTemplate = new JArray();
|
||||||
dynamic cm = null;
|
dynamic cm = null;
|
||||||
|
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ namespace AyaNova.PickList
|
|||||||
public UserPickList()
|
public UserPickList()
|
||||||
{
|
{
|
||||||
|
|
||||||
DefaultListObjectType = AyaType.User;
|
DefaultListAType = AyaType.User;
|
||||||
SQLFrom = "from auser";
|
SQLFrom = "from auser";
|
||||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListObjectType).Select;
|
AllowedRoles = BizRoles.GetRoleSet(DefaultListAType).Select;
|
||||||
dynamic dTemplate = new JArray();
|
dynamic dTemplate = new JArray();
|
||||||
|
|
||||||
dynamic cm = new JObject();
|
dynamic cm = new JObject();
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ namespace AyaNova.PickList
|
|||||||
public VendorPickList()
|
public VendorPickList()
|
||||||
{
|
{
|
||||||
|
|
||||||
DefaultListObjectType = AyaType.Vendor;
|
DefaultListAType = AyaType.Vendor;
|
||||||
SQLFrom = "from avendor";
|
SQLFrom = "from avendor";
|
||||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListObjectType).Select;
|
AllowedRoles = BizRoles.GetRoleSet(DefaultListAType).Select;
|
||||||
dynamic dTemplate = new JArray();
|
dynamic dTemplate = new JArray();
|
||||||
|
|
||||||
dynamic cm = new JObject();
|
dynamic cm = new JObject();
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ namespace AyaNova.PickList
|
|||||||
{
|
{
|
||||||
public WidgetPickList()
|
public WidgetPickList()
|
||||||
{
|
{
|
||||||
DefaultListObjectType = AyaType.Widget;
|
DefaultListAType = AyaType.Widget;
|
||||||
SQLFrom = "from awidget left join auser on (awidget.userid=auser.id)";
|
SQLFrom = "from awidget left join auser on (awidget.userid=auser.id)";
|
||||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListObjectType).Select;
|
AllowedRoles = BizRoles.GetRoleSet(DefaultListAType).Select;
|
||||||
|
|
||||||
//Default template
|
//Default template
|
||||||
dynamic dTemplate = new JArray();
|
dynamic dTemplate = new JArray();
|
||||||
@@ -47,7 +47,7 @@ namespace AyaNova.PickList
|
|||||||
{
|
{
|
||||||
TKey = "WidgetName",
|
TKey = "WidgetName",
|
||||||
FieldKey = "widgetname",
|
FieldKey = "widgetname",
|
||||||
//AyaObjectType = AyaType.Widget,
|
//AType = AyaType.Widget,
|
||||||
ColumnDataType = UiFieldDataType.Text,
|
ColumnDataType = UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "awidget.id",
|
SqlIdColumnName = "awidget.id",
|
||||||
SqlValueColumnName = "awidget.name",
|
SqlValueColumnName = "awidget.name",
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ namespace AyaNova.PickList
|
|||||||
public WorkOrderTemplatePickList()
|
public WorkOrderTemplatePickList()
|
||||||
{
|
{
|
||||||
|
|
||||||
DefaultListObjectType = AyaType.WorkOrderTemplate;
|
DefaultListAType = AyaType.WorkOrderTemplate;
|
||||||
SQLFrom = "from aworkordertemplate";
|
SQLFrom = "from aworkordertemplate";
|
||||||
AllowedRoles = BizRoles.GetRoleSet(DefaultListObjectType).Select;
|
AllowedRoles = BizRoles.GetRoleSet(DefaultListAType).Select;
|
||||||
dynamic dTemplate = new JArray();
|
dynamic dTemplate = new JArray();
|
||||||
|
|
||||||
dynamic cm = new JObject();
|
dynamic cm = new JObject();
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ namespace AyaNova.Biz
|
|||||||
var FullPathName = FileUtil.GetPermanentAttachmentFilePath(i.StoredFileName);
|
var FullPathName = FileUtil.GetPermanentAttachmentFilePath(i.StoredFileName);
|
||||||
AllDBFileFullPath.Add(FullPathName);
|
AllDBFileFullPath.Add(FullPathName);
|
||||||
var FileExistsInReality = AllAttachmentFilesOnDisk.Contains(FullPathName);
|
var FileExistsInReality = AllAttachmentFilesOnDisk.Contains(FullPathName);
|
||||||
var ParentBizObjectExistsInReality = await BizObjectExistsInDatabase.ExistsAsync(i.AttachToObjectType, i.AttachToObjectId, ct);
|
var ParentBizObjectExistsInReality = await BizObjectExistsInDatabase.ExistsAsync(i.AttachToAType, i.AttachToObjectId, ct);
|
||||||
//does the db record reflect the same status as reality?
|
//does the db record reflect the same status as reality?
|
||||||
if (FileExistsInReality != i.Exists || !ParentBizObjectExistsInReality)
|
if (FileExistsInReality != i.Exists || !ParentBizObjectExistsInReality)
|
||||||
{
|
{
|
||||||
@@ -101,7 +101,7 @@ namespace AyaNova.Biz
|
|||||||
if (!ParentBizObjectExistsInReality)
|
if (!ParentBizObjectExistsInReality)
|
||||||
{
|
{
|
||||||
//switch it to notype
|
//switch it to notype
|
||||||
f.AttachToObjectType = AyaType.NoType;
|
f.AttachToAType = AyaType.NoType;
|
||||||
f.AttachToObjectId = 0;
|
f.AttachToObjectId = 0;
|
||||||
}
|
}
|
||||||
await ct.SaveChangesAsync();
|
await ct.SaveChangesAsync();
|
||||||
@@ -121,10 +121,10 @@ namespace AyaNova.Biz
|
|||||||
// //also, potentiallly
|
// //also, potentiallly
|
||||||
// //iterate orphaned file attachments to NOTHING type, if found to be attached to any other object remove the orphaned object attachment record in db
|
// //iterate orphaned file attachments to NOTHING type, if found to be attached to any other object remove the orphaned object attachment record in db
|
||||||
// //but keeping the physical file since it's attached to something else
|
// //but keeping the physical file since it's attached to something else
|
||||||
// var AllOrphansInDb = await ct.FileAttachment.Where(z => z.AttachToObjectType == AyaType.NoType).ToListAsync();
|
// var AllOrphansInDb = await ct.FileAttachment.Where(z => z.AttachToAType == AyaType.NoType).ToListAsync();
|
||||||
// foreach (FileAttachment OrphanInDb in AllOrphansInDb)
|
// foreach (FileAttachment OrphanInDb in AllOrphansInDb)
|
||||||
// {
|
// {
|
||||||
// if (await ct.FileAttachment.AnyAsync(z => z.StoredFileName==OrphanInDb.StoredFileName && z.AttachToObjectType != AyaType.NoType))
|
// if (await ct.FileAttachment.AnyAsync(z => z.StoredFileName==OrphanInDb.StoredFileName && z.AttachToAType != AyaType.NoType))
|
||||||
// {
|
// {
|
||||||
// //It is also attached to something else so remove it from the nothing type
|
// //It is also attached to something else so remove it from the nothing type
|
||||||
// ct.FileAttachment.Remove(OrphanInDb);
|
// ct.FileAttachment.Remove(OrphanInDb);
|
||||||
@@ -158,7 +158,7 @@ namespace AyaNova.Biz
|
|||||||
{
|
{
|
||||||
FileAttachment fa = new FileAttachment();
|
FileAttachment fa = new FileAttachment();
|
||||||
fa.AttachToObjectId = 0;
|
fa.AttachToObjectId = 0;
|
||||||
fa.AttachToObjectType = AyaType.NoType;
|
fa.AttachToAType = AyaType.NoType;
|
||||||
fa.ContentType = "application/octet-stream";//most generic type, we don't know what it is
|
fa.ContentType = "application/octet-stream";//most generic type, we don't know what it is
|
||||||
fa.DisplayFileName = "FOUND" + FileUtil.GetSafeDateFileName();
|
fa.DisplayFileName = "FOUND" + FileUtil.GetSafeDateFileName();
|
||||||
fa.LastModified = DateTime.UtcNow;
|
fa.LastModified = DateTime.UtcNow;
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ namespace AyaNova.Biz
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public AyaType ObjectType
|
public AyaType AType
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
@@ -25,7 +25,7 @@ namespace AyaNova.Biz
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int ObjectTypeAsInt
|
public int ATypeAsInt
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
@@ -33,20 +33,20 @@ namespace AyaNova.Biz
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public AyaTypeId(AyaType ObjectType, long Id)
|
public AyaTypeId(AyaType aType, long Id)
|
||||||
{
|
{
|
||||||
_id = Id;
|
_id = Id;
|
||||||
_ayaType = ObjectType;
|
_ayaType = aType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public AyaTypeId(string sObjectTypeNumeral, string sId)
|
public AyaTypeId(string sATypeNumeral, string sId)
|
||||||
{
|
{
|
||||||
_id = long.Parse(sId);
|
_id = long.Parse(sId);
|
||||||
int nType = int.Parse(sObjectTypeNumeral);
|
int nType = int.Parse(sATypeNumeral);
|
||||||
if (!AyaTypeExists(nType))
|
if (!AyaTypeExists(nType))
|
||||||
_ayaType = AyaType.NoType;
|
_ayaType = AyaType.NoType;
|
||||||
else
|
else
|
||||||
_ayaType = (AyaType)Enum.Parse(typeof(AyaType), sObjectTypeNumeral);
|
_ayaType = (AyaType)Enum.Parse(typeof(AyaType), sATypeNumeral);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool Equals(AyaTypeId x, AyaTypeId y)
|
public bool Equals(AyaTypeId x, AyaTypeId y)
|
||||||
@@ -60,7 +60,7 @@ namespace AyaNova.Biz
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
//Check whether the products' properties are equal.
|
//Check whether the products' properties are equal.
|
||||||
return x.ObjectId == y.ObjectId && x.ObjectType == y.ObjectType;
|
return x.ObjectId == y.ObjectId && x.AType == y.AType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsEmpty
|
public bool IsEmpty
|
||||||
@@ -95,7 +95,7 @@ namespace AyaNova.Biz
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return this.ObjectType.HasAttribute(typeof(CoreBizObjectAttribute));
|
return this.AType.HasAttribute(typeof(CoreBizObjectAttribute));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,11 +15,11 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
//Returns existance status of object type and id specified in database
|
//Returns existance status of object type and id specified in database
|
||||||
|
|
||||||
internal static async Task<bool> ExistsAsync(AyaType objectType, long id, AyContext ct)
|
internal static async Task<bool> ExistsAsync(AyaType aType, long id, AyContext ct)
|
||||||
{
|
{
|
||||||
//new up a context??
|
//new up a context??
|
||||||
|
|
||||||
switch (objectType)
|
switch (aType)
|
||||||
{
|
{
|
||||||
//CoreBizObject add here
|
//CoreBizObject add here
|
||||||
case AyaType.NoType://no type always exists and this is used by orphaned attachments
|
case AyaType.NoType://no type always exists and this is used by orphaned attachments
|
||||||
@@ -123,7 +123,7 @@ namespace AyaNova.Biz
|
|||||||
case AyaType.CustomerServiceRequest:
|
case AyaType.CustomerServiceRequest:
|
||||||
return await ct.CustomerServiceRequest.AnyAsync(z => z.Id == id);
|
return await ct.CustomerServiceRequest.AnyAsync(z => z.Id == id);
|
||||||
default:
|
default:
|
||||||
throw new System.NotSupportedException($"AyaNova.Biz.BizObjectExistsInDatabase::ExistsAsync type {objectType.ToString()} is not supported");
|
throw new System.NotSupportedException($"AyaNova.Biz.BizObjectExistsInDatabase::ExistsAsync type {aType.ToString()} is not supported");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ namespace AyaNova.Biz
|
|||||||
{
|
{
|
||||||
|
|
||||||
Date = z.Created,
|
Date = z.Created,
|
||||||
ObjectType = z.AyaType,
|
AType = z.AyaType,
|
||||||
ObjectId = z.AyId,
|
ObjectId = z.AyId,
|
||||||
Event = z.AyEvent,
|
Event = z.AyEvent,
|
||||||
Textra = z.Textra,
|
Textra = z.Textra,
|
||||||
|
|||||||
@@ -311,7 +311,7 @@ namespace AyaNova.Biz
|
|||||||
case JobType.BatchCoreObjectOperation:
|
case JobType.BatchCoreObjectOperation:
|
||||||
//batch op, hand off to biz object to deal with
|
//batch op, hand off to biz object to deal with
|
||||||
//note, convention is that there is an idList in job.jobinfo json if preselected else it's all objects of type
|
//note, convention is that there is an idList in job.jobinfo json if preselected else it's all objects of type
|
||||||
o = (IJobObject)BizObjectFactory.GetBizObject(job.ObjectType, ct);
|
o = (IJobObject)BizObjectFactory.GetBizObject(job.AType, ct);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new System.NotSupportedException($"ProcessJobAsync type {job.JobType.ToString()} is not supported");
|
throw new System.NotSupportedException($"ProcessJobAsync type {job.JobType.ToString()} is not supported");
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ namespace AyaNova.Biz
|
|||||||
// newObject.JsHelpers = (string)o["JsHelpers"];
|
// newObject.JsHelpers = (string)o["JsHelpers"];
|
||||||
// newObject.JsPrerender = (string)o["JsPrerender"];
|
// newObject.JsPrerender = (string)o["JsPrerender"];
|
||||||
// newObject.Notes = (string)o["Notes"];
|
// newObject.Notes = (string)o["Notes"];
|
||||||
// newObject.ObjectType = (AyaType)(int)o["ObjectType"];
|
// newObject.AType = (AyaType)(int)o["AType"];
|
||||||
// newObject.RenderType = (ReportRenderType)(int)o["RenderType"];
|
// newObject.RenderType = (ReportRenderType)(int)o["RenderType"];
|
||||||
// newObject.Roles = (AuthorizationRoles)(int)o["Roles"];
|
// newObject.Roles = (AuthorizationRoles)(int)o["Roles"];
|
||||||
// newObject.Style = (string)o["Style"];
|
// newObject.Style = (string)o["Style"];
|
||||||
@@ -239,9 +239,9 @@ namespace AyaNova.Biz
|
|||||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
//GET LIST
|
//GET LIST
|
||||||
//
|
//
|
||||||
internal async Task<List<NameIdItem>> GetReportListAsync(AyaType ayType)
|
internal async Task<List<NameIdItem>> GetReportListAsync(AyaType aType)
|
||||||
{
|
{
|
||||||
var rpts = await ct.Report.AsNoTracking().Where(z => z.ObjectType == ayType && z.Active == true).Select(z => new { id = z.Id, name = z.Name, roles = z.Roles }).ToListAsync();
|
var rpts = await ct.Report.AsNoTracking().Where(z => z.AType == aType && z.Active == true).Select(z => new { id = z.Id, name = z.Name, roles = z.Roles }).ToListAsync();
|
||||||
var ret = new List<NameIdItem>();
|
var ret = new List<NameIdItem>();
|
||||||
foreach (var item in rpts)
|
foreach (var item in rpts)
|
||||||
{
|
{
|
||||||
@@ -341,15 +341,15 @@ namespace AyaNova.Biz
|
|||||||
var log = AyaNova.Util.ApplicationLogging.CreateLogger("ReportBiz::GetReportData");
|
var log = AyaNova.Util.ApplicationLogging.CreateLogger("ReportBiz::GetReportData");
|
||||||
AuthorizationRoles effectiveRoles = CurrentUserRoles;
|
AuthorizationRoles effectiveRoles = CurrentUserRoles;
|
||||||
|
|
||||||
if (selectedRequest.ObjectType == AyaType.NoType)
|
if (selectedRequest.AType == AyaType.NoType)
|
||||||
{
|
{
|
||||||
AddError(ApiErrorCode.VALIDATION_REQUIRED, null, $"ObjectType is required");
|
AddError(ApiErrorCode.VALIDATION_REQUIRED, null, $"AType is required");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!AyaNova.Api.ControllerHelpers.Authorized.HasReadFullRole(effectiveRoles, selectedRequest.ObjectType))
|
if (!AyaNova.Api.ControllerHelpers.Authorized.HasReadFullRole(effectiveRoles, selectedRequest.AType))
|
||||||
{
|
{
|
||||||
AddError(ApiErrorCode.NOT_AUTHORIZED, null, $"User not authorized for {selectedRequest.ObjectType} type object");
|
AddError(ApiErrorCode.NOT_AUTHORIZED, null, $"User not authorized for {selectedRequest.AType} type object");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -358,9 +358,9 @@ namespace AyaNova.Biz
|
|||||||
selectedRequest.SelectedRowIds = await DataListSelectedProcessingOptions.RehydrateIdList(selectedRequest, ct, effectiveRoles, log, UserId, UserTranslationId);
|
selectedRequest.SelectedRowIds = await DataListSelectedProcessingOptions.RehydrateIdList(selectedRequest, ct, effectiveRoles, log, UserId, UserTranslationId);
|
||||||
|
|
||||||
|
|
||||||
log.LogDebug($"Instantiating biz object handler for {selectedRequest.ObjectType}");
|
log.LogDebug($"Instantiating biz object handler for {selectedRequest.AType}");
|
||||||
var biz = BizObjectFactory.GetBizObject(selectedRequest.ObjectType, ct, UserId, CurrentUserRoles, UserTranslationId);
|
var biz = BizObjectFactory.GetBizObject(selectedRequest.AType, ct, UserId, CurrentUserRoles, UserTranslationId);
|
||||||
log.LogDebug($"Fetching data for {selectedRequest.SelectedRowIds.Length} {selectedRequest.ObjectType} items");
|
log.LogDebug($"Fetching data for {selectedRequest.SelectedRowIds.Length} {selectedRequest.AType} items");
|
||||||
return await ((IReportAbleObject)biz).GetReportData(selectedRequest.SelectedRowIds);
|
return await ((IReportAbleObject)biz).GetReportData(selectedRequest.SelectedRowIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -383,17 +383,17 @@ namespace AyaNova.Biz
|
|||||||
}
|
}
|
||||||
|
|
||||||
//If we get here via the /viewreport url in the client then there is no object type set so we need to set it here from the report
|
//If we get here via the /viewreport url in the client then there is no object type set so we need to set it here from the report
|
||||||
if(reportRequest.ObjectType==AyaType.NoType){
|
if(reportRequest.AType==AyaType.NoType){
|
||||||
reportRequest.ObjectType=report.ObjectType;
|
reportRequest.AType=report.AType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
AuthorizationRoles effectiveRoles = CurrentUserRoles;
|
AuthorizationRoles effectiveRoles = CurrentUserRoles;
|
||||||
|
|
||||||
|
|
||||||
if (!AyaNova.Api.ControllerHelpers.Authorized.HasReadFullRole(effectiveRoles, report.ObjectType))
|
if (!AyaNova.Api.ControllerHelpers.Authorized.HasReadFullRole(effectiveRoles, report.AType))
|
||||||
{
|
{
|
||||||
AddError(ApiErrorCode.NOT_AUTHORIZED, null, $"User not authorized for {report.ObjectType} type object");
|
AddError(ApiErrorCode.NOT_AUTHORIZED, null, $"User not authorized for {report.AType} type object");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -559,14 +559,14 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
//Custom fields definition for report usage
|
//Custom fields definition for report usage
|
||||||
string CustomFieldsTemplate = "null";
|
string CustomFieldsTemplate = "null";
|
||||||
var FormCustomization = await ct.FormCustom.AsNoTracking().SingleOrDefaultAsync(z => z.FormKey == report.ObjectType.ToString());
|
var FormCustomization = await ct.FormCustom.AsNoTracking().SingleOrDefaultAsync(z => z.FormKey == report.AType.ToString());
|
||||||
if (FormCustomization != null)
|
if (FormCustomization != null)
|
||||||
{
|
{
|
||||||
CustomFieldsTemplate = FormCustomization.Template;
|
CustomFieldsTemplate = FormCustomization.Template;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Report meta data
|
//Report meta data
|
||||||
var reportMeta = $"{{Id:{report.Id},Name:`{report.Name}`,Notes:`{report.Notes}`,ObjectType:`{report.ObjectType}`,CustomFieldsDefinition:{CustomFieldsTemplate},DataListKey:`{reportRequest.DataListKey}`,SelectedRowIds: `{string.Join(",", reportRequest.SelectedRowIds)}`}}";
|
var reportMeta = $"{{Id:{report.Id},Name:`{report.Name}`,Notes:`{report.Notes}`,AType:`{report.AType}`,CustomFieldsDefinition:{CustomFieldsTemplate},DataListKey:`{reportRequest.DataListKey}`,SelectedRowIds: `{string.Join(",", reportRequest.SelectedRowIds)}`}}";
|
||||||
|
|
||||||
|
|
||||||
//duplicate meta data in report page wide variable for use by our internal functions
|
//duplicate meta data in report page wide variable for use by our internal functions
|
||||||
|
|||||||
@@ -276,17 +276,17 @@ namespace AyaNova.Biz
|
|||||||
AddError(ApiErrorCode.VALIDATION_NOT_CHANGEABLE, "ObjectId");
|
AddError(ApiErrorCode.VALIDATION_NOT_CHANGEABLE, "ObjectId");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (proposedObj.ObjectType != currentObj.ObjectType)
|
if (proposedObj.AType != currentObj.AType)
|
||||||
{
|
{
|
||||||
AddError(ApiErrorCode.VALIDATION_NOT_CHANGEABLE, "ObjectType");
|
AddError(ApiErrorCode.VALIDATION_NOT_CHANGEABLE, "AType");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Does the object of this Review actually exist?
|
//Does the object of this Review actually exist?
|
||||||
if (!await BizObjectExistsInDatabase.ExistsAsync(proposedObj.ObjectType, proposedObj.ObjectId, ct))
|
if (!await BizObjectExistsInDatabase.ExistsAsync(proposedObj.AType, proposedObj.ObjectId, ct))
|
||||||
{
|
{
|
||||||
AddError(ApiErrorCode.NOT_FOUND, "generalerror", $"LT:ErrorAPI2010 LT:{proposedObj.ObjectType} id {proposedObj.ObjectId}");
|
AddError(ApiErrorCode.NOT_FOUND, "generalerror", $"LT:ErrorAPI2010 LT:{proposedObj.AType} id {proposedObj.ObjectId}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -152,11 +152,11 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
//Of type?
|
//Of type?
|
||||||
if (searchParameters.TypeOnly != AyaType.NoType)
|
if (searchParameters.TypeOnly != AyaType.NoType)
|
||||||
q = q.Where(z => z.ObjectType == searchParameters.TypeOnly);
|
q = q.Where(z => z.AType == searchParameters.TypeOnly);
|
||||||
|
|
||||||
|
|
||||||
//Find the records that have the search terms in searchkey
|
//Find the records that have the search terms in searchkey
|
||||||
var SearchMatches = q.GroupBy(z => new { z.ObjectType, z.ObjectId }).Select(z => new { ObjectId = z.Key.ObjectId, ObjectType = z.Key.ObjectType, ObjectCount = z.LongCount() });
|
var SearchMatches = q.GroupBy(z => new { z.AType, z.ObjectId }).Select(z => new { ObjectId = z.Key.ObjectId, AType = z.Key.AType, ObjectCount = z.LongCount() });
|
||||||
|
|
||||||
|
|
||||||
//PUT THE RESULTS INTO MATCHING OBJECTS LIST
|
//PUT THE RESULTS INTO MATCHING OBJECTS LIST
|
||||||
@@ -164,7 +164,7 @@ namespace AyaNova.Biz
|
|||||||
{
|
{
|
||||||
//keep any object that matches *all* the search terms
|
//keep any object that matches *all* the search terms
|
||||||
if (SearchMatch.ObjectCount == TotalSearchTermsToMatch)
|
if (SearchMatch.ObjectCount == TotalSearchTermsToMatch)
|
||||||
MatchingObjects.Add(new AyaTypeId(SearchMatch.ObjectType, SearchMatch.ObjectId));
|
MatchingObjects.Add(new AyaTypeId(SearchMatch.AType, SearchMatch.ObjectId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -173,19 +173,19 @@ namespace AyaNova.Biz
|
|||||||
List<AyaTypeId> CanReadMatchingObjects = new List<AyaTypeId>();
|
List<AyaTypeId> CanReadMatchingObjects = new List<AyaTypeId>();
|
||||||
foreach (AyaTypeId t in MatchingObjects)
|
foreach (AyaTypeId t in MatchingObjects)
|
||||||
{
|
{
|
||||||
if (t.ObjectType == AyaType.FileAttachment)
|
if (t.AType == AyaType.FileAttachment)
|
||||||
{
|
{
|
||||||
//have to look up the actual underlying object type and id here
|
//have to look up the actual underlying object type and id here
|
||||||
//check if it's readable for user
|
//check if it's readable for user
|
||||||
//then add the PARENT object type and id to the CanREadMatchingObjects list
|
//then add the PARENT object type and id to the CanREadMatchingObjects list
|
||||||
//this means user will not see it return as an attachment, just as the object
|
//this means user will not see it return as an attachment, just as the object
|
||||||
FileAttachment f = await ct.FileAttachment.AsNoTracking().FirstOrDefaultAsync(z => z.Id == t.ObjectId);
|
FileAttachment f = await ct.FileAttachment.AsNoTracking().FirstOrDefaultAsync(z => z.Id == t.ObjectId);
|
||||||
if (AyaNova.Api.ControllerHelpers.Authorized.HasReadFullRole(currentUserRoles, f.AttachToObjectType))
|
if (AyaNova.Api.ControllerHelpers.Authorized.HasReadFullRole(currentUserRoles, f.AttachToAType))
|
||||||
{
|
{
|
||||||
CanReadMatchingObjects.Add(new AyaTypeId(f.AttachToObjectType, f.AttachToObjectId));
|
CanReadMatchingObjects.Add(new AyaTypeId(f.AttachToAType, f.AttachToObjectId));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (t.ObjectType == AyaType.Memo)
|
else if (t.AType == AyaType.Memo)
|
||||||
{
|
{
|
||||||
//Users are only permitted to search their own memo's
|
//Users are only permitted to search their own memo's
|
||||||
if (await ct.Memo.AsNoTracking().AnyAsync(z => z.Id == t.ObjectId && z.ToId == currentUserId))
|
if (await ct.Memo.AsNoTracking().AnyAsync(z => z.Id == t.ObjectId && z.ToId == currentUserId))
|
||||||
@@ -193,7 +193,7 @@ namespace AyaNova.Biz
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (AyaNova.Api.ControllerHelpers.Authorized.HasReadFullRole(currentUserRoles, t.ObjectType))
|
if (AyaNova.Api.ControllerHelpers.Authorized.HasReadFullRole(currentUserRoles, t.AType))
|
||||||
{
|
{
|
||||||
CanReadMatchingObjects.Add(t);
|
CanReadMatchingObjects.Add(t);
|
||||||
}
|
}
|
||||||
@@ -217,7 +217,7 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
//Sort and group the matching objects list in return order
|
//Sort and group the matching objects list in return order
|
||||||
//zCzustomer.OrderBy(z => z.LastName).ThenBy(z => z.FirstName)
|
//zCzustomer.OrderBy(z => z.LastName).ThenBy(z => z.FirstName)
|
||||||
var OrderedMatchingObjects = MatchingObjects.OrderBy(z => z.ObjectType).ThenByDescending(z => z.ObjectId);
|
var OrderedMatchingObjects = MatchingObjects.OrderBy(z => z.AType).ThenByDescending(z => z.ObjectId);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -233,11 +233,11 @@ namespace AyaNova.Biz
|
|||||||
foreach (AyaTypeId i in OrderedMatchingObjects)
|
foreach (AyaTypeId i in OrderedMatchingObjects)
|
||||||
{
|
{
|
||||||
SearchResult SR = new SearchResult();
|
SearchResult SR = new SearchResult();
|
||||||
SR.Name = BizObjectNameFetcherDirect.Name(i.ObjectType,
|
SR.Name = BizObjectNameFetcherDirect.Name(i.AType,
|
||||||
i.ObjectId,
|
i.ObjectId,
|
||||||
command);
|
command);
|
||||||
SR.Id = i.ObjectId;
|
SR.Id = i.ObjectId;
|
||||||
SR.Type = i.ObjectType;
|
SR.Type = i.AType;
|
||||||
ReturnObject.SearchResults.Add(SR);
|
ReturnObject.SearchResults.Add(SR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -581,16 +581,16 @@ namespace AyaNova.Biz
|
|||||||
{
|
{
|
||||||
public long TranslationId { get; set; }
|
public long TranslationId { get; set; }
|
||||||
public long ObjectId { get; set; }
|
public long ObjectId { get; set; }
|
||||||
public AyaType ObjectType { get; set; }
|
public AyaType AType { get; set; }
|
||||||
public List<string> Words { get; set; }
|
public List<string> Words { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public SearchIndexProcessObjectParameters(long translationId, long objectID, AyaType objectType)
|
public SearchIndexProcessObjectParameters(long translationId, long objectID, AyaType aType)
|
||||||
{
|
{
|
||||||
Words = new List<string>();
|
Words = new List<string>();
|
||||||
TranslationId = translationId;
|
TranslationId = translationId;
|
||||||
ObjectId = objectID;
|
ObjectId = objectID;
|
||||||
ObjectType = objectType;
|
AType = aType;
|
||||||
}
|
}
|
||||||
|
|
||||||
//format used for getsummmary by biz objects
|
//format used for getsummmary by biz objects
|
||||||
@@ -599,7 +599,7 @@ namespace AyaNova.Biz
|
|||||||
Words = new List<string>();
|
Words = new List<string>();
|
||||||
TranslationId = 0;
|
TranslationId = 0;
|
||||||
ObjectId = 0;
|
ObjectId = 0;
|
||||||
ObjectType = 0;
|
AType = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SearchIndexProcessObjectParameters AddText(string s)
|
public SearchIndexProcessObjectParameters AddText(string s)
|
||||||
@@ -663,11 +663,11 @@ namespace AyaNova.Biz
|
|||||||
await ProcessKeywordsAsync(searchIndexObjectParameters, false);
|
await ProcessKeywordsAsync(searchIndexObjectParameters, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async Task ProcessDeletedObjectKeywordsAsync(long objectID, AyaType objectType, AyContext ct)
|
public static async Task ProcessDeletedObjectKeywordsAsync(long objectID, AyaType aType, AyContext ct)
|
||||||
{
|
{
|
||||||
//Be careful in future, if you put ToString at the end of each object in the string interpolation
|
//Be careful in future, if you put ToString at the end of each object in the string interpolation
|
||||||
//npgsql driver will assume it's a string and put quotes around it triggering an error that a string can't be compared to an int
|
//npgsql driver will assume it's a string and put quotes around it triggering an error that a string can't be compared to an int
|
||||||
await ct.Database.ExecuteSqlInterpolatedAsync($"delete from asearchkey where objectid={objectID} and objecttype={(int)objectType}");
|
await ct.Database.ExecuteSqlInterpolatedAsync($"delete from asearchkey where objectid={objectID} and aType={(int)aType}");
|
||||||
//nothing to save here, it's a direct command already executed
|
//nothing to save here, it's a direct command already executed
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -678,15 +678,15 @@ namespace AyaNova.Biz
|
|||||||
private static async Task ProcessKeywordsAsync(SearchIndexProcessObjectParameters p, bool newRecord)
|
private static async Task ProcessKeywordsAsync(SearchIndexProcessObjectParameters p, bool newRecord)
|
||||||
{
|
{
|
||||||
// #if (DEBUG)
|
// #if (DEBUG)
|
||||||
// if (!p.ObjectType.HasAttribute(typeof(CoreBizObjectAttribute)))
|
// if (!p.AType.HasAttribute(typeof(CoreBizObjectAttribute)))
|
||||||
// throw new System.NotSupportedException($"Search::ProcessKeywords - Invalid type presented {p.ObjectType}");
|
// throw new System.NotSupportedException($"Search::ProcessKeywords - Invalid type presented {p.AType}");
|
||||||
// #endif
|
// #endif
|
||||||
List<string> KeyWordList = await BreakAsync(p.TranslationId, p.Words);
|
List<string> KeyWordList = await BreakAsync(p.TranslationId, p.Words);
|
||||||
|
|
||||||
if (KeyWordList.Count == 0) return;
|
if (KeyWordList.Count == 0) return;
|
||||||
//call stored procedure to do the work right at the server (fastest method by far)
|
//call stored procedure to do the work right at the server (fastest method by far)
|
||||||
using (AyContext ct = ServiceProviderProvider.DBContext)
|
using (AyContext ct = ServiceProviderProvider.DBContext)
|
||||||
await ct.Database.ExecuteSqlInterpolatedAsync($"call aydosearchindex({KeyWordList},{p.ObjectId},{p.ObjectType},{!newRecord})");
|
await ct.Database.ExecuteSqlInterpolatedAsync($"call aydosearchindex({KeyWordList},{p.ObjectId},{p.AType},{!newRecord})");
|
||||||
return;
|
return;
|
||||||
}//eoc
|
}//eoc
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@@ -45,12 +45,12 @@ namespace AyaNova.Biz
|
|||||||
using (var transaction = await ct.Database.BeginTransactionAsync())
|
using (var transaction = await ct.Database.BeginTransactionAsync())
|
||||||
{
|
{
|
||||||
//get the last record
|
//get the last record
|
||||||
var LastEntry = await ct.ServiceBank.OrderByDescending(m => m.EntryDate).FirstOrDefaultAsync(m => m.ObjectId == newDtObject.ObjectId && m.ObjectType == newDtObject.ObjectType);
|
var LastEntry = await ct.ServiceBank.OrderByDescending(m => m.EntryDate).FirstOrDefaultAsync(m => m.ObjectId == newDtObject.ObjectId && m.AType == newDtObject.AType);
|
||||||
ServiceBank newObject = new ServiceBank();
|
ServiceBank newObject = new ServiceBank();
|
||||||
newObject.Name = newDtObject.Name;
|
newObject.Name = newDtObject.Name;
|
||||||
newObject.EntryDate = DateTime.UtcNow;
|
newObject.EntryDate = DateTime.UtcNow;
|
||||||
newObject.ObjectId = newDtObject.ObjectId;
|
newObject.ObjectId = newDtObject.ObjectId;
|
||||||
newObject.ObjectType = newDtObject.ObjectType;
|
newObject.AType = newDtObject.AType;
|
||||||
newObject.SourceId = newDtObject.SourceId;
|
newObject.SourceId = newDtObject.SourceId;
|
||||||
newObject.SourceType = newDtObject.SourceType;
|
newObject.SourceType = newDtObject.SourceType;
|
||||||
newObject.Incidents = newDtObject.Incidents;
|
newObject.Incidents = newDtObject.Incidents;
|
||||||
@@ -126,10 +126,10 @@ namespace AyaNova.Biz
|
|||||||
// ////////////////////////////////////////////////////////////////////////////////////////////////
|
// ////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// //GET LAST
|
// //GET LAST
|
||||||
// //
|
// //
|
||||||
// internal async Task<ServiceBank> GetLastForObjectAsync(AyaType objectType, long objectId)
|
// internal async Task<ServiceBank> GetLastForObjectAsync(AyaType aType, long objectId)
|
||||||
// {
|
// {
|
||||||
|
|
||||||
// var ret = await ct.ServiceBank.OrderByDescending(m => m.EntryDate).SingleOrDefaultAsync(m => m.ObjectId == objectId && m.ObjectType == objectType);
|
// var ret = await ct.ServiceBank.OrderByDescending(m => m.EntryDate).SingleOrDefaultAsync(m => m.ObjectId == objectId && m.AType == aType);
|
||||||
|
|
||||||
// return ret;
|
// return ret;
|
||||||
// }
|
// }
|
||||||
@@ -179,15 +179,15 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
|
|
||||||
//Object exists?
|
//Object exists?
|
||||||
if (!await BizObjectExistsInDatabase.ExistsAsync(proposedObj.ObjectType, proposedObj.ObjectId, ct))
|
if (!await BizObjectExistsInDatabase.ExistsAsync(proposedObj.AType, proposedObj.ObjectId, ct))
|
||||||
{
|
{
|
||||||
AddError(ApiErrorCode.NOT_FOUND, "generalerror", $"Bankable source object specified doesn't exist [type:{proposedObj.ObjectType}, id:{proposedObj.ObjectId}]");
|
AddError(ApiErrorCode.NOT_FOUND, "generalerror", $"Bankable source object specified doesn't exist [type:{proposedObj.AType}, id:{proposedObj.ObjectId}]");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
"CONSTRAINT UNQ_ServiceBank UNIQUE (entrydate, objectid, objecttype, incidentsbalance, hoursbalance, currencybalance), " +
|
"CONSTRAINT UNQ_ServiceBank UNIQUE (entrydate, objectid, aType, incidentsbalance, hoursbalance, currencybalance), " +
|
||||||
"CONSTRAINT UNQ_ServiceBank_Previous_values UNIQUE (lastentrydate, objectid, objecttype, lastincidentsbalance, lasthoursbalance, lastcurrencybalance), " +
|
"CONSTRAINT UNQ_ServiceBank_Previous_values UNIQUE (lastentrydate, objectid, aType, lastincidentsbalance, lasthoursbalance, lastcurrencybalance), " +
|
||||||
"CONSTRAINT fk_ServiceBank_self FOREIGN KEY (lastentrydate, objectid, objecttype, lastincidentsbalance, lasthoursbalance, lastcurrencybalance) references aservicebank(entrydate, objectid, objecttype, incidentsbalance, hoursbalance, currencybalance), " +
|
"CONSTRAINT fk_ServiceBank_self FOREIGN KEY (lastentrydate, objectid, aType, lastincidentsbalance, lasthoursbalance, lastcurrencybalance) references aservicebank(entrydate, objectid, aType, incidentsbalance, hoursbalance, currencybalance), " +
|
||||||
"CONSTRAINT CHK_Servicebank_Valid_IncidentBalance CHECK(incidentsbalance = COALESCE(lastincidentsbalance, 0) + incidents), " +
|
"CONSTRAINT CHK_Servicebank_Valid_IncidentBalance CHECK(incidentsbalance = COALESCE(lastincidentsbalance, 0) + incidents), " +
|
||||||
"CONSTRAINT CHK_Servicebank_Valid_CurrencyBalance CHECK(currencybalance = COALESCE(lastcurrencybalance, 0) + currency), " +
|
"CONSTRAINT CHK_Servicebank_Valid_CurrencyBalance CHECK(currencybalance = COALESCE(lastcurrencybalance, 0) + currency), " +
|
||||||
"CONSTRAINT CHK_Servicebank_Valid_HoursBalance CHECK(hoursbalance = COALESCE(lasthoursbalance, 0) + hours), " +
|
"CONSTRAINT CHK_Servicebank_Valid_HoursBalance CHECK(hoursbalance = COALESCE(lasthoursbalance, 0) + hours), " +
|
||||||
@@ -323,7 +323,7 @@ namespace AyaNova.Biz
|
|||||||
var subs = await ct.NotifySubscription.Where(z => z.EventType == NotifyEventType.ServiceBankDepleted).ToListAsync();
|
var subs = await ct.NotifySubscription.Where(z => z.EventType == NotifyEventType.ServiceBankDepleted).ToListAsync();
|
||||||
string SourceName = string.Empty;
|
string SourceName = string.Empty;
|
||||||
if (subs.Count > 0)
|
if (subs.Count > 0)
|
||||||
SourceName = BizObjectNameFetcherDirect.Name(o.ObjectType, o.ObjectId, ct);
|
SourceName = BizObjectNameFetcherDirect.Name(o.AType, o.ObjectId, ct);
|
||||||
|
|
||||||
foreach (var sub in subs)
|
foreach (var sub in subs)
|
||||||
{
|
{
|
||||||
@@ -343,7 +343,7 @@ namespace AyaNova.Biz
|
|||||||
{
|
{
|
||||||
EventType = NotifyEventType.ServiceBankDepleted,
|
EventType = NotifyEventType.ServiceBankDepleted,
|
||||||
UserId = sub.UserId,
|
UserId = sub.UserId,
|
||||||
AyaType = o.ObjectType,
|
AyaType = o.AType,
|
||||||
ObjectId = o.ObjectId,
|
ObjectId = o.ObjectId,
|
||||||
NotifySubscriptionId = sub.Id,
|
NotifySubscriptionId = sub.Id,
|
||||||
Name = SourceName
|
Name = SourceName
|
||||||
|
|||||||
@@ -2575,7 +2575,7 @@ namespace AyaNova.Biz
|
|||||||
ICoreBizObjectModel o = null;
|
ICoreBizObjectModel o = null;
|
||||||
//save a fetch if it's a delete
|
//save a fetch if it's a delete
|
||||||
if (job.SubType != JobSubType.Delete)
|
if (job.SubType != JobSubType.Delete)
|
||||||
o = await GetWorkOrderGraphItem(job.ObjectType, id);
|
o = await GetWorkOrderGraphItem(job.AType, id);
|
||||||
switch (job.SubType)
|
switch (job.SubType)
|
||||||
{
|
{
|
||||||
case JobSubType.TagAddAny:
|
case JobSubType.TagAddAny:
|
||||||
@@ -2587,7 +2587,7 @@ namespace AyaNova.Biz
|
|||||||
SaveIt = TagBiz.ProcessBatchTagOperation(o.Tags, (string)jobData["tag"], jobData.ContainsKey("toTag") ? (string)jobData["toTag"] : null, job.SubType);
|
SaveIt = TagBiz.ProcessBatchTagOperation(o.Tags, (string)jobData["tag"], jobData.ContainsKey("toTag") ? (string)jobData["toTag"] : null, job.SubType);
|
||||||
break;
|
break;
|
||||||
case JobSubType.Delete:
|
case JobSubType.Delete:
|
||||||
if (!await DeleteWorkOrderGraphItem(job.ObjectType, id))
|
if (!await DeleteWorkOrderGraphItem(job.AType, id))
|
||||||
{
|
{
|
||||||
await JobsBiz.LogJobAsync(job.GId, $"LT:Errors {GetErrorsAsString()} id {id}");
|
await JobsBiz.LogJobAsync(job.GId, $"LT:Errors {GetErrorsAsString()} id {id}");
|
||||||
FailedObjectCount++;
|
FailedObjectCount++;
|
||||||
@@ -2598,7 +2598,7 @@ namespace AyaNova.Biz
|
|||||||
}
|
}
|
||||||
if (SaveIt)
|
if (SaveIt)
|
||||||
{
|
{
|
||||||
o = await PutWorkOrderGraphItem(job.ObjectType, o);
|
o = await PutWorkOrderGraphItem(job.AType, o);
|
||||||
if (o == null)
|
if (o == null)
|
||||||
{
|
{
|
||||||
await JobsBiz.LogJobAsync(job.GId, $"LT:Errors {GetErrorsAsString()} id {id}");
|
await JobsBiz.LogJobAsync(job.GId, $"LT:Errors {GetErrorsAsString()} id {id}");
|
||||||
|
|||||||
@@ -326,7 +326,7 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
//Open object url
|
//Open object url
|
||||||
//### NOTE: If this is required anywhere else, move it to a central BizUtils class in Biz folder callable from here and there
|
//### NOTE: If this is required anywhere else, move it to a central BizUtils class in Biz folder callable from here and there
|
||||||
private static string OpenObjectUrlBuilder(AyaType otype, long id, NotifyEventType net)
|
private static string OpenObjectUrlBuilder(AyaType aType, long id, NotifyEventType net)
|
||||||
{
|
{
|
||||||
var ServerUrl = ServerGlobalOpsSettingsCache.Notify.AyaNovaServerURL;
|
var ServerUrl = ServerGlobalOpsSettingsCache.Notify.AyaNovaServerURL;
|
||||||
if (string.IsNullOrWhiteSpace(ServerUrl))
|
if (string.IsNullOrWhiteSpace(ServerUrl))
|
||||||
@@ -344,7 +344,7 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
|
|
||||||
//Might not have a type or id in which case nothing directly to open
|
//Might not have a type or id in which case nothing directly to open
|
||||||
if (otype == AyaType.NoType || id == 0)
|
if (aType == AyaType.NoType || id == 0)
|
||||||
{
|
{
|
||||||
return ServerUrl;
|
return ServerUrl;
|
||||||
}
|
}
|
||||||
@@ -353,11 +353,11 @@ namespace AyaNova.Biz
|
|||||||
{
|
{
|
||||||
//goto event log for item
|
//goto event log for item
|
||||||
// path: "/history/:ayatype/:recordid/:userlog?",
|
// path: "/history/:ayatype/:recordid/:userlog?",
|
||||||
return $"{ServerUrl}/history/{(int)otype}/{id}";
|
return $"{ServerUrl}/history/{(int)aType}/{id}";
|
||||||
}
|
}
|
||||||
|
|
||||||
//default is to open the object in question directly
|
//default is to open the object in question directly
|
||||||
return $"{ServerUrl}/open/{(int)otype}/{id}";
|
return $"{ServerUrl}/open/{(int)aType}/{id}";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ namespace AyaNova.Biz
|
|||||||
{
|
{
|
||||||
//OPSMETRIC
|
//OPSMETRIC
|
||||||
await JobsBiz.LogJobAsync(j.GId, "LT:JobFailed LT:TimedOut");
|
await JobsBiz.LogJobAsync(j.GId, "LT:JobFailed LT:TimedOut");
|
||||||
log.LogError($"Job found job stuck in running status and set to failed: deadline={dtRunningDeadline.ToString()}, jobId={j.GId.ToString()}, jobname={j.Name}, jobtype={j.JobType.ToString()}, jobObjectType={j.ObjectType.ToString()}, jobObjectId={j.ObjectId.ToString()}");
|
log.LogError($"Job found job stuck in running status and set to failed: deadline={dtRunningDeadline.ToString()}, jobId={j.GId.ToString()}, jobname={j.Name}, jobtype={j.JobType.ToString()}, jobAType={j.AType.ToString()}, jobObjectId={j.ObjectId.ToString()}");
|
||||||
await JobsBiz.UpdateJobStatusAsync(j.GId, JobStatus.Failed);
|
await JobsBiz.UpdateJobStatusAsync(j.GId, JobStatus.Failed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,6 @@ namespace AyaNova.Models
|
|||||||
REQUEST
|
REQUEST
|
||||||
BASE: DataListKey, ClientCriteria, FilterId
|
BASE: DataListKey, ClientCriteria, FilterId
|
||||||
TABLEVERSION: Limit, Offset : base
|
TABLEVERSION: Limit, Offset : base
|
||||||
REPORT/BULK OPS VERSION: ObjectType(ayatype),SelectedRowIds(long[]) : base
|
REPORT/BULK OPS VERSION: AType(ayatype),SelectedRowIds(long[]) : base
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ namespace AyaNova.Models
|
|||||||
//handles posts from client
|
//handles posts from client
|
||||||
public class DataListSelectedRequest : DataListRequestBase
|
public class DataListSelectedRequest : DataListRequestBase
|
||||||
{
|
{
|
||||||
public AyaType ObjectType { get; set; }
|
public AyaType AType { get; set; }
|
||||||
public long[] SelectedRowIds { get; set; }
|
public long[] SelectedRowIds { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ namespace AyaNova.Models
|
|||||||
[Required]
|
[Required]
|
||||||
public long AttachToObjectId { get; set; }
|
public long AttachToObjectId { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public AyaType AttachToObjectType { get; set; }//int
|
public AyaType AttachToAType { get; set; }//int
|
||||||
[Required]
|
[Required]
|
||||||
public string StoredFileName { get; set; }
|
public string StoredFileName { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ namespace AyaNova.Models
|
|||||||
public JobType JobType { get; set; }
|
public JobType JobType { get; set; }
|
||||||
public JobSubType SubType { get; set; }
|
public JobSubType SubType { get; set; }
|
||||||
public long ObjectId { get; set; }
|
public long ObjectId { get; set; }
|
||||||
public AyaType ObjectType { get; set; }
|
public AyaType AType { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public JobStatus JobStatus { get; set; }
|
public JobStatus JobStatus { get; set; }
|
||||||
|
|
||||||
@@ -50,7 +50,7 @@ namespace AyaNova.Models
|
|||||||
JobType = JobType.NotSet;
|
JobType = JobType.NotSet;
|
||||||
SubType = JobSubType.NotSet;
|
SubType = JobSubType.NotSet;
|
||||||
ObjectId = 0;
|
ObjectId = 0;
|
||||||
ObjectType = AyaType.NoType;
|
AType = AyaType.NoType;
|
||||||
JobStatus = JobStatus.Sleeping;
|
JobStatus = JobStatus.Sleeping;
|
||||||
JobInfo = null;
|
JobInfo = null;
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ namespace AyaNova.Models
|
|||||||
public string Notes { get; set; }
|
public string Notes { get; set; }
|
||||||
public AuthorizationRoles Roles { get; set; }
|
public AuthorizationRoles Roles { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public AyaType ObjectType { get; set; }
|
public AyaType AType { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public string Template { get; set; }
|
public string Template { get; set; }
|
||||||
@@ -47,7 +47,7 @@ namespace AyaNova.Models
|
|||||||
public Report()
|
public Report()
|
||||||
{
|
{
|
||||||
RenderType = ReportRenderType.PDF;
|
RenderType = ReportRenderType.PDF;
|
||||||
ObjectType = AyaType.NoType;
|
AType = AyaType.NoType;
|
||||||
Roles = AuthorizationRoles.All;
|
Roles = AuthorizationRoles.All;
|
||||||
Active = true;
|
Active = true;
|
||||||
//these are pdf option defaults as per PuppeteerSharp
|
//these are pdf option defaults as per PuppeteerSharp
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ namespace AyaNova.Models
|
|||||||
[Required]
|
[Required]
|
||||||
public long ObjectId { get; set; }
|
public long ObjectId { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public AyaType ObjectType { get; set; }//int
|
public AyaType AType { get; set; }//int
|
||||||
|
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
public bool OverDue
|
public bool OverDue
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ namespace AyaNova.Models
|
|||||||
[Required]
|
[Required]
|
||||||
public long ObjectId { get; set; }
|
public long ObjectId { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public AyaType ObjectType { get; set; }
|
public AyaType AType { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ namespace AyaNova.Models
|
|||||||
[Required]
|
[Required]
|
||||||
public long ObjectId { get; set; }
|
public long ObjectId { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public AyaType ObjectType { get; set; }
|
public AyaType AType { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public long SourceId { get; set; }
|
public long SourceId { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
@@ -71,7 +71,7 @@ namespace AyaNova.Models
|
|||||||
[Required]
|
[Required]
|
||||||
public long ObjectId { get; set; }
|
public long ObjectId { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public AyaType ObjectType { get; set; }
|
public AyaType AType { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public long SourceId { get; set; }
|
public long SourceId { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"Name":"EXAMPLE API use and meta data","Active":true,"Notes":"","Roles":124927,"ObjectType":2,"Template":"<html>\n\n<body>\n\t<h2>Example: Meta data and API usage</h2>\n\t<p>See help documentation for details</p>\n\t\n\t<div>\n\t\t<h4>ayServerMetaData</h4>\n\t\t{{ ayJSON ayServerMetaData }}\n\t</div>\n\n\t<div>\n\t\t<h4>ayClientMetaData</h4>\n\t\t{{ ayJSON ayClientMetaData }}\n\t</div>\n\n\t<div>\n\t\t<h4>ayReportMetaData</h4>\n\t\t{{ ayJSON ayReportMetaData }}\n\t</div>\n\n\n\t<div>\n\t\t<h4>myData</h4>\n\t\t<h5>(Fetched dynamically from API route <strong>enum-list/list/AyaType</strong>)</h5>\n\t\t{{ ayJSON myData }}\n\t</div>\n\n\t<div>\n\t\t<h4>ayReportData</h4>\n\t\t{{#each ayReportData}}\n\t\t<h2>{{ Name }}</h2>\n\t\t<div>Notes: <span class=\"example\">{{ Notes }}</span></div>\n\t\t{{/each}}\n\t</div>\n</body>\n\n</html>","Style":".example {\n color: blue;\n}","JsPrerender":"async function ayPrepareData(reportData) {\n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders \n\n //Example of using API GET method to fetch data from API server and make it available to the report template\n\n //Put the data into the main report data object so it's available to the template\n reportData.myData={ServerInfo:await ayGetFromAPI(\"server-info\")};\n\n //Example API POST method to fetch data from api server\n let searchPostData={phrase: \"Fresh\"};\n reportData.myData.SearchResults=await ayPostToAPI(\"search\", searchPostData);\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0}
|
{"Name":"EXAMPLE API use and meta data","Active":true,"Notes":"","Roles":124927,"AType":2,"Template":"<html>\n\n<body>\n\t<h2>Example: Meta data and API usage</h2>\n\t<p>See help documentation for details</p>\n\t\n\t<div>\n\t\t<h4>ayServerMetaData</h4>\n\t\t{{ ayJSON ayServerMetaData }}\n\t</div>\n\n\t<div>\n\t\t<h4>ayClientMetaData</h4>\n\t\t{{ ayJSON ayClientMetaData }}\n\t</div>\n\n\t<div>\n\t\t<h4>ayReportMetaData</h4>\n\t\t{{ ayJSON ayReportMetaData }}\n\t</div>\n\n\n\t<div>\n\t\t<h4>myData</h4>\n\t\t<h5>(Fetched dynamically from API route <strong>enum-list/list/AyaType</strong>)</h5>\n\t\t{{ ayJSON myData }}\n\t</div>\n\n\t<div>\n\t\t<h4>ayReportData</h4>\n\t\t{{#each ayReportData}}\n\t\t<h2>{{ Name }}</h2>\n\t\t<div>Notes: <span class=\"example\">{{ Notes }}</span></div>\n\t\t{{/each}}\n\t</div>\n</body>\n\n</html>","Style":".example {\n color: blue;\n}","JsPrerender":"async function ayPrepareData(reportData) {\n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders \n\n //Example of using API GET method to fetch data from API server and make it available to the report template\n\n //Put the data into the main report data object so it's available to the template\n reportData.myData={ServerInfo:await ayGetFromAPI(\"server-info\")};\n\n //Example API POST method to fetch data from api server\n let searchPostData={phrase: \"Fresh\"};\n reportData.myData.SearchResults=await ayPostToAPI(\"search\", searchPostData);\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0}
|
||||||
@@ -1 +1 @@
|
|||||||
{"Name":"EXAMPLE Bar code helper","Active":true,"Notes":"","Roles":124927,"ObjectType":2,"Template":"<html>\n\n<body>\n\t<h2>Example: Bar code helper </h2>\n\t<p>See Report editor help documentation for details</p>\n\n\t{{#each ayReportData}}\n\t<h2>{{ Name }}</h2>\n\t<div>\n\t\tSerial as \"CODE-128\" BarCode:<br/>\n\t\t{{ ayBC Serial '{ \"bcid\": \"code128\",\"includetext\":true, \"scale\":1}' }}\n\t</div>\n\t<br/>\n\t<div>\n\t\tSerial as \"QR\" Code:<br/>\n\t\t{{ ayBC Serial '{ \"bcid\": \"qrcode\",\"includetext\":true, \"scale\":3}' }}\n\t</div>\n\t<br/>\n\t<div>\n\t\tSample \"UPC-A\" Code (Serial wouldn't be a valid UPC code so hard coded here):<br/>\n\t\t{{ ayBC \"712345678904\" '{ \"bcid\": \"upca\",\"includetext\":true, \"scale\":1}' }}\n\t</div>\n\t<br/>\n\t<br/>\n\t<hr/>\n\t{{/each}}\n</body>\n\n</html>","Style":".example {\n color: blue;\n}","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0}
|
{"Name":"EXAMPLE Bar code helper","Active":true,"Notes":"","Roles":124927,"AType":2,"Template":"<html>\n\n<body>\n\t<h2>Example: Bar code helper </h2>\n\t<p>See Report editor help documentation for details</p>\n\n\t{{#each ayReportData}}\n\t<h2>{{ Name }}</h2>\n\t<div>\n\t\tSerial as \"CODE-128\" BarCode:<br/>\n\t\t{{ ayBC Serial '{ \"bcid\": \"code128\",\"includetext\":true, \"scale\":1}' }}\n\t</div>\n\t<br/>\n\t<div>\n\t\tSerial as \"QR\" Code:<br/>\n\t\t{{ ayBC Serial '{ \"bcid\": \"qrcode\",\"includetext\":true, \"scale\":3}' }}\n\t</div>\n\t<br/>\n\t<div>\n\t\tSample \"UPC-A\" Code (Serial wouldn't be a valid UPC code so hard coded here):<br/>\n\t\t{{ ayBC \"712345678904\" '{ \"bcid\": \"upca\",\"includetext\":true, \"scale\":1}' }}\n\t</div>\n\t<br/>\n\t<br/>\n\t<hr/>\n\t{{/each}}\n</body>\n\n</html>","Style":".example {\n color: blue;\n}","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0}
|
||||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
|||||||
{"Name":"EXAMPLE Logo helper","Active":true,"Notes":"","Roles":124927,"ObjectType":2,"Template":"<html>\n\n<body>\n\t<h2>Example: LOGO </h2>\n\t<p>See Report editor help documentation for details</p>\n\t<p>Note: you must upload a logo via the Global Settings form in order to see them here</p>\n\n\t<h4>Small logo</h4>\n\t{{ ayLogo \"small\" }}\n\n\t<h4>Medium logo</h4>\n\t{{ ayLogo \"medium\" }}\n\n\t<h4>Large logo</h4>\n\t{{ ayLogo \"large\" }}\n\n\n\t{{#each ayReportData}}\n\t<h2>{{ Name }}</h2>\n\t<div>Notes: <span class='example'>{{ Notes }}</span></div>\n\t{{/each}}\n</body>\n\n</html>","Style":".example {\n color: blue;\n}","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0}
|
{"Name":"EXAMPLE Logo helper","Active":true,"Notes":"","Roles":124927,"AType":2,"Template":"<html>\n\n<body>\n\t<h2>Example: LOGO </h2>\n\t<p>See Report editor help documentation for details</p>\n\t<p>Note: you must upload a logo via the Global Settings form in order to see them here</p>\n\n\t<h4>Small logo</h4>\n\t{{ ayLogo \"small\" }}\n\n\t<h4>Medium logo</h4>\n\t{{ ayLogo \"medium\" }}\n\n\t<h4>Large logo</h4>\n\t{{ ayLogo \"large\" }}\n\n\n\t{{#each ayReportData}}\n\t<h2>{{ Name }}</h2>\n\t<div>Notes: <span class='example'>{{ Notes }}</span></div>\n\t{{/each}}\n</body>\n\n</html>","Style":".example {\n color: blue;\n}","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0}
|
||||||
@@ -1 +1 @@
|
|||||||
{"Name":"EXAMPLE PDF Options page number","Active":true,"Notes":"","Roles":124927,"ObjectType":2,"Template":"<html>\n\n<body>\n\t{{#each ayReportData}}\n\t<h2>{{ Name }}</h2>\n\t<div>Notes: <span class='example'>{{ Notes }}</span></div>\n\t{{/each}}\n</body>\n\n</html>","Style":"","JsPrerender":"","JsHelpers":"","RenderType":0,"HeaderTemplate":" <span style=\"font-size:12px;color:blue; \"> Header: Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span></span>","FooterTemplate":" <span style=\"font-size:12px;color:green; \"> Footer: Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span></span>","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"40px","MarginOptionsLeft":"40px","MarginOptionsRight":"40px","MarginOptionsTop":"40px","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.0000}
|
{"Name":"EXAMPLE PDF Options page number","Active":true,"Notes":"","Roles":124927,"AType":2,"Template":"<html>\n\n<body>\n\t{{#each ayReportData}}\n\t<h2>{{ Name }}</h2>\n\t<div>Notes: <span class='example'>{{ Notes }}</span></div>\n\t{{/each}}\n</body>\n\n</html>","Style":"","JsPrerender":"","JsHelpers":"","RenderType":0,"HeaderTemplate":" <span style=\"font-size:12px;color:blue; \"> Header: Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span></span>","FooterTemplate":" <span style=\"font-size:12px;color:green; \"> Footer: Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span></span>","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"40px","MarginOptionsLeft":"40px","MarginOptionsRight":"40px","MarginOptionsTop":"40px","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.0000}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user