This commit is contained in:
@@ -163,6 +163,7 @@ namespace AyaNova.PlugIn.V8
|
||||
/// </summary>
|
||||
private async void DoExport()
|
||||
{
|
||||
Cursor.Current = Cursors.WaitCursor;
|
||||
//Show progress form
|
||||
ProgressForm progress = new ProgressForm();
|
||||
progress.Show();
|
||||
@@ -201,7 +202,7 @@ namespace AyaNova.PlugIn.V8
|
||||
//ERASE DB
|
||||
progress.Op("Erasing AyaNova 8 data");
|
||||
var a = await util.PostAsync("License/PermanentlyEraseAllData", "\"I understand\"");
|
||||
|
||||
|
||||
//TAGS
|
||||
progress.Op("Compiling tags");
|
||||
ExportUnitModelCategories(progress);
|
||||
@@ -242,15 +243,17 @@ namespace AyaNova.PlugIn.V8
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
progress.Append("ERROR, During operation: " + progress.LastOp + "\n"+progress.LastSubOp);
|
||||
progress.Append("ERROR, During operation: " + progress.LastOp + "\n" + progress.LastSubOp);
|
||||
progress.Append("\n************\nExport failed with error:");
|
||||
progress.Append(ex.Message);
|
||||
progress.Append("stack:\n" + ex.StackTrace);
|
||||
}
|
||||
finally {
|
||||
progress.FinishedImport();
|
||||
finally
|
||||
{
|
||||
progress.FinishedImport();
|
||||
Cursor.Current = Cursors.Default;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//-----------------------------------
|
||||
//endof method
|
||||
@@ -261,7 +264,7 @@ namespace AyaNova.PlugIn.V8
|
||||
|
||||
#region Object Export methods
|
||||
|
||||
|
||||
|
||||
|
||||
#region users
|
||||
private async System.Threading.Tasks.Task ExportUsers(ProgressForm progress)
|
||||
@@ -372,7 +375,7 @@ namespace AyaNova.PlugIn.V8
|
||||
d.customFields = CustomFieldData(c, DateCustomFields);
|
||||
}
|
||||
|
||||
|
||||
|
||||
var a = await util.PostAsync("User", d.ToString());
|
||||
long RavenId = util.IdFromResponse(a);
|
||||
Map.Add(c.ID, RavenId);
|
||||
@@ -389,7 +392,7 @@ namespace AyaNova.PlugIn.V8
|
||||
}
|
||||
|
||||
//Attachments / FILES
|
||||
await ExportAttachments(new TypeAndID(RootObjectTypes.User, c.ID),progress);
|
||||
await ExportAttachments(new TypeAndID(RootObjectTypes.User, c.ID), progress);
|
||||
|
||||
}
|
||||
|
||||
@@ -634,7 +637,7 @@ namespace AyaNova.PlugIn.V8
|
||||
}
|
||||
|
||||
#endregion custom fields
|
||||
|
||||
|
||||
#region Attachments exporter
|
||||
private async System.Threading.Tasks.Task ExportAttachments(TypeAndID tid, ProgressForm progress)
|
||||
{
|
||||
@@ -651,7 +654,7 @@ namespace AyaNova.PlugIn.V8
|
||||
var af = AyaFile.GetItem(i.LT_O_AyaFile.Value);
|
||||
if (af == null) continue;
|
||||
|
||||
progress.SubOp("Wikifile: \"" + af.Name + "\" size:" + af.FileSize);
|
||||
progress.SubOp("Wikifile: \"" + af.Name + "\" " + AyaBizUtils.FileSizeDisplay((decimal)af.FileSize));
|
||||
|
||||
//Compile the FileData property
|
||||
var sDate = i.LT_Common_Label_Created.ToString();
|
||||
@@ -695,6 +698,9 @@ namespace AyaNova.PlugIn.V8
|
||||
var ravenId = a.ObjectResponse["data"][0]["id"].Value<long>();
|
||||
Map.Add(af.ID, ravenId);
|
||||
}
|
||||
|
||||
progress.SubOp("");
|
||||
|
||||
}
|
||||
#endregion attachments
|
||||
|
||||
@@ -746,7 +752,7 @@ namespace AyaNova.PlugIn.V8
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endregion wiki
|
||||
|
||||
|
||||
Reference in New Issue
Block a user