This commit is contained in:
@@ -1087,7 +1087,7 @@ namespace AyaNova.PlugIn.V8
|
|||||||
MultipartFormDataContent formDataContent = new MultipartFormDataContent();
|
MultipartFormDataContent formDataContent = new MultipartFormDataContent();
|
||||||
|
|
||||||
//Form data like the bizobject type and id
|
//Form data like the bizobject type and id
|
||||||
formDataContent.Add(new StringContent(util.RootObjectToAyaType(tid.RootObjectType).ToString()), name: "AttachToObjectType");
|
formDataContent.Add(new StringContent(((int)util.RootObjectToAyaType(tid.RootObjectType)).ToString()), name: "AttachToObjectType");
|
||||||
formDataContent.Add(new StringContent(Map[tid.ID].ToString()), name: "AttachToObjectId");
|
formDataContent.Add(new StringContent(Map[tid.ID].ToString()), name: "AttachToObjectId");
|
||||||
formDataContent.Add(new StringContent(ImportTag), name: "Notes");
|
formDataContent.Add(new StringContent(ImportTag), name: "Notes");
|
||||||
formDataContent.Add(new StringContent(dFileData.ToString()), name: "FileData");
|
formDataContent.Add(new StringContent(dFileData.ToString()), name: "FileData");
|
||||||
@@ -1169,7 +1169,7 @@ namespace AyaNova.PlugIn.V8
|
|||||||
MultipartFormDataContent formDataContent = new MultipartFormDataContent();
|
MultipartFormDataContent formDataContent = new MultipartFormDataContent();
|
||||||
|
|
||||||
//Form data like the bizobject type and id
|
//Form data like the bizobject type and id
|
||||||
formDataContent.Add(new StringContent(util.RootObjectToAyaType(tid.RootObjectType).ToString()), name: "AttachToObjectType");
|
formDataContent.Add(new StringContent(((int)util.RootObjectToAyaType(tid.RootObjectType)).ToString()), name: "AttachToObjectType");
|
||||||
formDataContent.Add(new StringContent(Map[tid.ID].ToString()), name: "AttachToObjectId");
|
formDataContent.Add(new StringContent(Map[tid.ID].ToString()), name: "AttachToObjectId");
|
||||||
formDataContent.Add(new StringContent(doc.Description + " (" + ImportTag + ")"), name: "Notes");
|
formDataContent.Add(new StringContent(doc.Description + " (" + ImportTag + ")"), name: "Notes");
|
||||||
formDataContent.Add(new StringContent(dFileData.ToString()), name: "FileData");
|
formDataContent.Add(new StringContent(dFileData.ToString()), name: "FileData");
|
||||||
|
|||||||
@@ -328,112 +328,149 @@ namespace AyaNova.PlugIn.V8
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static int RootObjectToAyaType(biz.RootObjectTypes rot)
|
public static AyaType RootObjectToAyaType(biz.RootObjectTypes rot, biz.WorkorderTypes specificWoType = biz.WorkorderTypes.Unknown)
|
||||||
{
|
{
|
||||||
|
|
||||||
switch (rot)
|
switch (rot)
|
||||||
{
|
{
|
||||||
case biz.RootObjectTypes.User:
|
case biz.RootObjectTypes.User:
|
||||||
return (int)AyaType.User;
|
return AyaType.User;
|
||||||
|
case biz.RootObjectTypes.Client:
|
||||||
|
return AyaType.Customer;
|
||||||
|
case biz.RootObjectTypes.Contract:
|
||||||
|
return AyaType.Contract;
|
||||||
|
case biz.RootObjectTypes.HeadOffice:
|
||||||
|
return AyaType.HeadOffice;
|
||||||
|
case biz.RootObjectTypes.LoanItem:
|
||||||
|
return AyaType.LoanUnit;
|
||||||
|
case biz.RootObjectTypes.Part:
|
||||||
|
return AyaType.Part;
|
||||||
|
case biz.RootObjectTypes.WorkorderPreventiveMaintenance:
|
||||||
|
return AyaType.PM;
|
||||||
|
case biz.RootObjectTypes.WorkorderItem:
|
||||||
|
switch (specificWoType)
|
||||||
|
{
|
||||||
|
case biz.WorkorderTypes.PreventiveMaintenance:
|
||||||
|
return AyaType.PMItem;
|
||||||
|
case biz.WorkorderTypes.Quote:
|
||||||
|
return AyaType.QuoteItem;
|
||||||
|
case biz.WorkorderTypes.Service:
|
||||||
|
return AyaType.WorkOrderItem;
|
||||||
|
default:
|
||||||
|
throw new NotImplementedException("V8:util:RootObjectToAyaType -> type " + rot.ToString() + "," + specificWoType.ToString() + " is not coded yet");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
case biz.RootObjectTypes.Project:
|
||||||
|
return AyaType.Project;
|
||||||
|
case biz.RootObjectTypes.PurchaseOrder:
|
||||||
|
return AyaType.PurchaseOrder;
|
||||||
|
case biz.RootObjectTypes.Unit:
|
||||||
|
return AyaType.Unit;
|
||||||
|
case biz.RootObjectTypes.UnitModel:
|
||||||
|
return AyaType.UnitModel;
|
||||||
|
case biz.RootObjectTypes.Vendor:
|
||||||
|
return AyaType.Vendor;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new NotImplementedException("V8:util:RootObjectToAyaType -> type " + rot.ToString() + " is not coded yet");
|
throw new NotImplementedException("V8:util:RootObjectToAyaType -> type " + rot.ToString() + " is not coded yet");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// All AyaNova types and their attributes indicating what features that type will support (tagging, attachments etc)
|
/// All AyaNova types and their attributes indicating what features that type will support (tagging, attachments etc)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public enum AyaType : int
|
public enum AyaType : int
|
||||||
{
|
{
|
||||||
//COREBIZOBJECT attribute must be set on objects that are:
|
//COREBIZOBJECT attribute must be set on objects that are:
|
||||||
//Attachable objects can have attachments,
|
//Attachable objects can have attachments,
|
||||||
//wikiable objects can have a wiki
|
//wikiable objects can have a wiki
|
||||||
//reviewable objects can have a review which is basically the same as a Reminder but with an object attached (was follow up schedmarker in v7)
|
//reviewable objects can have a review which is basically the same as a Reminder but with an object attached (was follow up schedmarker in v7)
|
||||||
//PIckList-able (has picklist template)
|
//PIckList-able (has picklist template)
|
||||||
//Pretty much everything that represents some kind of real world object is wikiable or attachable as long as it has an ID and a type
|
//Pretty much everything that represents some kind of real world object is wikiable or attachable as long as it has an ID and a type
|
||||||
//exceptions would be utility type objects like datalistview, formcustom etc that are not
|
//exceptions would be utility type objects like datalistview, formcustom etc that are not
|
||||||
|
|
||||||
//NOTE: NEW CORE OBJECTS - All areas of server AND CLIENT code that require adding any new core objects have been tagged with the following comment:
|
//NOTE: NEW CORE OBJECTS - All areas of server AND CLIENT code that require adding any new core objects have been tagged with the following comment:
|
||||||
//CoreBizObject add here
|
//CoreBizObject add here
|
||||||
//Search for that IN SERVER AND CLIENT CODE and you will see all areas that need coding for the new object
|
//Search for that IN SERVER AND CLIENT CODE and you will see all areas that need coding for the new object
|
||||||
|
|
||||||
//***IMPORTANT: Also need to add translations for any new biz objects added that don't match exactly the name here in the key
|
//***IMPORTANT: Also need to add translations for any new biz objects added that don't match exactly the name here in the key
|
||||||
//because enumlist gets it that way, i.e. "Global" would be the expected key
|
//because enumlist gets it that way, i.e. "Global" would be the expected key
|
||||||
|
|
||||||
NoType = 0,
|
NoType = 0,
|
||||||
Global = 1,
|
Global = 1,
|
||||||
//Corebiz
|
//Corebiz
|
||||||
Widget = 2,//attachable, wikiable, reviewable
|
Widget = 2,//attachable, wikiable, reviewable
|
||||||
//Corebiz
|
//Corebiz
|
||||||
User = 3,//attachable, wikiable, reviewable
|
User = 3,//attachable, wikiable, reviewable
|
||||||
ServerState = 4,
|
ServerState = 4,
|
||||||
License = 5,
|
License = 5,
|
||||||
LogFile = 6,
|
LogFile = 6,
|
||||||
PickListTemplate = 7,
|
PickListTemplate = 7,
|
||||||
//Corebiz
|
//Corebiz
|
||||||
Customer = 8,
|
Customer = 8,
|
||||||
ServerJob = 9,
|
ServerJob = 9,
|
||||||
//Corebiz
|
//Corebiz
|
||||||
Contract = 10,
|
Contract = 10,
|
||||||
TrialSeeder = 11,
|
TrialSeeder = 11,
|
||||||
Metrics = 12,
|
Metrics = 12,
|
||||||
Translation = 13,
|
Translation = 13,
|
||||||
UserOptions = 14,
|
UserOptions = 14,
|
||||||
//Corebiz
|
//Corebiz
|
||||||
HeadOffice = 15,
|
HeadOffice = 15,
|
||||||
//Corebiz
|
//Corebiz
|
||||||
LoanUnit = 16,
|
LoanUnit = 16,
|
||||||
FileAttachment = 17,
|
FileAttachment = 17,
|
||||||
DataListView = 18,
|
DataListView = 18,
|
||||||
FormCustom = 19,
|
FormCustom = 19,
|
||||||
//Corebiz
|
//Corebiz
|
||||||
Part = 20,
|
Part = 20,
|
||||||
//Corebiz
|
//Corebiz
|
||||||
PM = 21,
|
PM = 21,
|
||||||
//Corebiz
|
//Corebiz
|
||||||
PMItem = 22,
|
PMItem = 22,
|
||||||
//Corebiz
|
//Corebiz
|
||||||
PMTemplate = 23,
|
PMTemplate = 23,
|
||||||
//Corebiz
|
//Corebiz
|
||||||
PMTemplateItem = 24,
|
PMTemplateItem = 24,
|
||||||
//Corebiz
|
//Corebiz
|
||||||
Project = 25,
|
Project = 25,
|
||||||
//Corebiz
|
//Corebiz
|
||||||
PurchaseOrder = 26,
|
PurchaseOrder = 26,
|
||||||
//Corebiz
|
//Corebiz
|
||||||
Quote = 27,
|
Quote = 27,
|
||||||
//Corebiz
|
//Corebiz
|
||||||
QuoteItem = 28,
|
QuoteItem = 28,
|
||||||
//Corebiz
|
//Corebiz
|
||||||
QuoteTemplate = 29,
|
QuoteTemplate = 29,
|
||||||
//Corebiz
|
//Corebiz
|
||||||
QuoteTemplateItem = 30,
|
QuoteTemplateItem = 30,
|
||||||
//Corebiz
|
//Corebiz
|
||||||
Unit = 31,
|
Unit = 31,
|
||||||
//Corebiz
|
//Corebiz
|
||||||
UnitModel = 32,
|
UnitModel = 32,
|
||||||
//Corebiz
|
//Corebiz
|
||||||
Vendor = 33,
|
Vendor = 33,
|
||||||
//Corebiz
|
//Corebiz
|
||||||
WorkOrder = 34,
|
WorkOrder = 34,
|
||||||
//Corebiz
|
//Corebiz
|
||||||
WorkOrderItem = 35,
|
WorkOrderItem = 35,
|
||||||
//Corebiz
|
//Corebiz
|
||||||
WorkOrderTemplate = 36,
|
WorkOrderTemplate = 36,
|
||||||
//Corebiz
|
//Corebiz
|
||||||
WorkOrderTemplateItem = 37
|
WorkOrderTemplateItem = 37
|
||||||
|
|
||||||
|
|
||||||
//NOTE: New objects added here need to also be added to the following classes:
|
//NOTE: New objects added here need to also be added to the following classes:
|
||||||
//AyaNova.Biz.BizObjectExistsInDatabase
|
//AyaNova.Biz.BizObjectExistsInDatabase
|
||||||
//AyaNova.Biz.BizObjectFactory
|
//AyaNova.Biz.BizObjectFactory
|
||||||
//AyaNova.Biz.BizRoles
|
//AyaNova.Biz.BizRoles
|
||||||
//AyaNova.Biz.BizObjectNameFetcherDIRECT
|
//AyaNova.Biz.BizObjectNameFetcherDIRECT
|
||||||
//and in the CLIENT in ayatype.js
|
//and in the CLIENT in ayatype.js
|
||||||
|
|
||||||
//and need TRANSLATION KEYS because any type could show in the event log at teh client end
|
//and need TRANSLATION KEYS because any type could show in the event log at teh client end
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user