This commit is contained in:
2021-08-13 22:58:09 +00:00
parent 4dc2ecab31
commit 445936b39f

View File

@@ -278,7 +278,6 @@ namespace AyaNova.PlugIn.V8
/// </summary>
private async void DoExport()
{
//Show progress form
ProgressForm progress = new ProgressForm();
progress.Show();
@@ -294,48 +293,15 @@ namespace AyaNova.PlugIn.V8
V7ToV8IdMap.Clear();
V7ToV8WorkOrderItemStatusIdMap.Clear();
TagMap.Clear();
// BankedObjects.Clear();
LocaleMap.Clear();
//add default raven language and codes
LocaleMap.Add("English", 1);
LocaleMap.Add("Español", 2);
LocaleMap.Add("Français", 3);
LocaleMap.Add("Deutsch", 4);
//admin user (not exported but is there already)
V7ToV8IdMap.Add(User.AdministratorID, 1);
//not sure if this is a good idea or not because in some cases would want to know if something is unexpectedly empty but will see for now
//Map.Add(Guid.Empty, 0);
/*
TODO:
NOTIFICATION IMPORT BEFORE OBJECTS
Just remembered most of the notification only works when an object is created or updated so the notification subscriptions need to be there
before the objects are imported or else none of them will have a notification created for them
Global wiki export to user
Regions export wiki to user
todo: export docs, settle on "Export" and edit all references to Import to switch it around as it's probably confusing artifact from dbdump days
todo: User fields need to be rectified: headofficeid, clientid vendorid, phone1, phone2, pagermaxtext
Yeah and a million other things too, this can wait until Stage7 - "Reality"
*/
//if (progress.KeepGoing)
// await ExportLocales(progress);
//return;
//Export in correct order:
//ERASE DB
progress.Op("Erasing AyaNova 8 data");
@@ -391,8 +357,9 @@ namespace AyaNova.PlugIn.V8
await ExportWarehouses(progress);
await ExportParts(progress);
await ExportProjects(progress);
//PURCHASE ORDERS deferred to possibly never if people can live without it
// await ExportPurchaseOrders(progress);
if(V7UseInventory)
await ExportPurchaseOrders(progress);
await ExportUnitModels(progress);
await ExportUnits(progress);
await ExportExternalUsers(progress);//needs vendors, clients and headoffices already exported so needs to be here late
@@ -417,12 +384,10 @@ namespace AyaNova.PlugIn.V8
await ExportClientServiceRequests(progress);
//NOTE: when get to PRIORITY, or WORKORDER STATUS be sure to add color code as per already done in USER export
if (progress.KeepGoing)
{
progress.Append("Export completed");
progress.Op("");
goto End;
}
@@ -442,7 +407,6 @@ namespace AyaNova.PlugIn.V8
finally
{
progress.FinishedImport();
}