This commit is contained in:
2020-05-04 00:51:47 +00:00
parent d0ad818da4
commit 0e10ea5fad

View File

@@ -1296,7 +1296,7 @@ namespace AyaNova.PlugIn.V8
//Attachments / FILES
await ExportAttachments(ObjectTID, progress, util.AyaType.WorkOrderItem);
await ExportAttachments(ObjectTID, progress, util.AyaType.WorkOrder);
//-----
bool repost = false;
@@ -1924,7 +1924,7 @@ namespace AyaNova.PlugIn.V8
#endregion attachments
#region Assigned docs exporter
private async System.Threading.Tasks.Task<string> ExportDocs(TypeAndID tid, AssignedDocs docs, ProgressForm progress)
private async System.Threading.Tasks.Task<string> ExportDocs(TypeAndID tid, AssignedDocs docs, ProgressForm progress, util.AyaType specificRavenType = util.AyaType.NoType)
{
@@ -1971,7 +1971,12 @@ namespace AyaNova.PlugIn.V8
MultipartFormDataContent formDataContent = new MultipartFormDataContent();
//Form data like the bizobject type and id
formDataContent.Add(new StringContent(((int)util.RootObjectToAyaType(tid.RootObjectType)).ToString()), name: "AttachToObjectType");
string RavenTypeAsString = "";
if (specificRavenType != util.AyaType.NoType)
RavenTypeAsString = ((int)specificRavenType).ToString();
else
RavenTypeAsString = ((int)util.RootObjectToAyaType(tid.RootObjectType)).ToString();
formDataContent.Add(new StringContent(RavenTypeAsString), name: "AttachToObjectType");
formDataContent.Add(new StringContent(Map[tid.ID].ToString()), name: "AttachToObjectId");
formDataContent.Add(new StringContent(doc.Description + " (" + ImportTag + ")"), name: "Notes");
formDataContent.Add(new StringContent(dFileData.ToString()), name: "FileData");