This commit is contained in:
@@ -35,7 +35,7 @@ namespace AyaNova.PlugIn.V8
|
||||
|
||||
public string PluginVersion
|
||||
{
|
||||
get { return "7.6.1-alpha.95"; }
|
||||
get { return "7.6.1-alpha.96"; }
|
||||
}
|
||||
|
||||
public string About
|
||||
@@ -317,6 +317,8 @@ namespace AyaNova.PlugIn.V8
|
||||
await ExportUnitModels(progress);
|
||||
await ExportVendors(progress);
|
||||
await ExportExternalUsers(progress);//needs vendors, clients and headoffices already exported so needs to be here late
|
||||
await ExportMemos(progress);
|
||||
|
||||
await ExportServiceWorkorders(progress);
|
||||
//todo: these are now invalid and awaiting RAVEN end implementation
|
||||
//after which can copy mostly from service workorder block
|
||||
@@ -1849,6 +1851,58 @@ namespace AyaNova.PlugIn.V8
|
||||
}
|
||||
#endregion Vendors
|
||||
|
||||
|
||||
#region Memos
|
||||
private async System.Threading.Tasks.Task ExportMemos(ProgressForm progress)
|
||||
{
|
||||
if (!progress.KeepGoing) return;
|
||||
progress.Op("Start Memos export");
|
||||
progress.SubOp("");
|
||||
var ObjectTypeName = "Memo";
|
||||
|
||||
//Step 2: export the objects
|
||||
MemoList pl = MemoList.GetListForSingleItem(PluginID);
|
||||
|
||||
progress.Append("Exporting " + pl.Count.ToString() + " " + ObjectTypeName + "s");
|
||||
|
||||
foreach (MemoList.MemoListInfo i in pl)
|
||||
{
|
||||
if (!progress.KeepGoing) return;
|
||||
List<string> tags = new List<string>();
|
||||
tags.Add(ImportTag);
|
||||
|
||||
|
||||
|
||||
dynamic d = new JObject();
|
||||
d.name = i.LT_Memo_Label_Subject.Display;
|
||||
d.notes = i.LT_Memo_Label_Message;
|
||||
//d.customFields = "{}";
|
||||
//d.tags = "[]";
|
||||
d.viewed = i.LT_Memo_Label_Viewed;
|
||||
d.replied = i.LT_Memo_Label_Replied;
|
||||
d.fromId = SafeGetUserMap(i.LT_Memo_Label_FromID.Value);
|
||||
d.sent = i.LT_Memo_Label_Sent;
|
||||
|
||||
progress.Op(ObjectTypeName + " " + i.ID.ToString());
|
||||
|
||||
|
||||
|
||||
var rMainObject = await util.PostAsync("memo", d.ToString());
|
||||
long RavenId = util.IdFromResponse(rMainObject);
|
||||
|
||||
//-----
|
||||
|
||||
d = rMainObject.ObjectResponse["data"];
|
||||
|
||||
//-----
|
||||
|
||||
//Event log fixup
|
||||
await util.EventLog(util.AyaType.Project, RavenId, SafeGetUserMap(i.LT_Memo_Label_FromID.Value), SafeGetUserMap(i.LT_Memo_Label_FromID.Value), i.LT_Memo_Label_Sent.ToString(), i.LT_Memo_Label_Sent.ToString());
|
||||
|
||||
}
|
||||
}
|
||||
#endregion Memos
|
||||
|
||||
#region Service Workorders
|
||||
private async System.Threading.Tasks.Task ExportServiceWorkorders(ProgressForm progress)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user