This commit is contained in:
2022-09-23 23:52:18 +00:00
parent abc6230834
commit 810a7a7c50
5 changed files with 34 additions and 8 deletions

View File

@@ -35,7 +35,7 @@ namespace AyaNova.PlugIn.V8
public string PluginVersion
{
get { return "8.0.2"; }
get { return "8.0.3"; }
}
public string About
@@ -162,11 +162,12 @@ namespace AyaNova.PlugIn.V8
ImportTag = util.NormalizeTag(dOpt.Tags);
util.HTTPCLIENT_TIMEOUT_SECONDS = dOpt.HTTPTimeOut;
util.InitClient();
MessageBox.Show("Migration will stop and fail immediately if you login to the AyaNova 8 server before migration has completed.", "Beware");
//here because we logged in fine and can proceed
if (MessageBox.Show("Warning: if you continue the AyaNova 8 destination server's database will be erased.\r\nAre you sure you want to continue?", "Erase data warning", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes) return;
if (MessageBox.Show("Last chance: the next step will start migration and the AyaNova 8 target server's data will be erased.\r\nAre you sure you want to proceed?", "Continue migration", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes) return;
//Only one command
DoExport();
}
@@ -431,7 +432,7 @@ namespace AyaNova.PlugIn.V8
progress.Show();
progress.StartedImport();
progress.Append("Exporting data to AyaNova server @ " + util.ApiBaseUrl);
progress.Append(util.RELEASE_VERSION_STRING);
progress.Append("V8-Migrate plugin version: " + util.RELEASE_VERSION_STRING);
progress.Append("Option HTTP Timeout: " + util.HTTPCLIENT_TIMEOUT_SECONDS);
progress.Append("Option Migrate assigned docs: " + ExportAssignedDocs.ToString() + "");
progress.Append("Option Migrate tag: \"" + ImportTag + "\"");
@@ -639,7 +640,7 @@ namespace AyaNova.PlugIn.V8
progress.Append("###################################");
progress.Append("###################################");
if (ExceptionDuringMigrate != null)
if (ExceptionDuringMigrate == null)
progress.Append("Export completed");
else
progress.Append("Export ** FAILED **");
@@ -1904,6 +1905,7 @@ namespace AyaNova.PlugIn.V8
dynamic d = new JObject();
if (IsDuplicatev7v8IdMapItem(c.ID, c.PartNumber, progress)) continue;
//string MigrateToPartName = string.Empty;
if (PartNumberNameCombined)
{
string newName = string.Empty;
@@ -1924,6 +1926,9 @@ namespace AyaNova.PlugIn.V8
}
//string sTemp = d.name;
if (string.IsNullOrWhiteSpace(d.name.ToString()))
d.name = GetUniqueName("No name Part");
progress.SubOp("");
progress.Op(ObjectTypeName + " " + d.partNumber + " " + d.name);
d.manufacturerId = await Getv7v8IdMapNullOk(c.ManufacturerID, RootObjectTypes.Vendor);