This commit is contained in:
@@ -161,7 +161,7 @@ namespace AyaNova.PlugIn.V8
|
||||
ImportTag = util.NormalizeTag(dOpt.Tags);
|
||||
util.HTTPCLIENT_TIMEOUT_SECONDS = dOpt.HTTPTimeOut;
|
||||
util.InitClient();
|
||||
|
||||
|
||||
//here because we logged in fine and can proceed
|
||||
|
||||
//MessageBox.Show("Login successful! JWT is " + util.JWT);
|
||||
@@ -377,7 +377,7 @@ namespace AyaNova.PlugIn.V8
|
||||
private bool V7UseInventory = false;
|
||||
private List<long> Allv8WarehouseIds = new List<long>();
|
||||
|
||||
private const long AYANOVA_SERVER_MAX_ATTACH_SIZE_LIMIT=10737418241;
|
||||
private const long AYANOVA_SERVER_MAX_ATTACH_SIZE_LIMIT = 10737418241;
|
||||
private long SmallestFileUploadRejectedAsTooBig = AYANOVA_SERVER_MAX_ATTACH_SIZE_LIMIT;
|
||||
|
||||
private string MaxFileSizeInfo(long lSize)
|
||||
@@ -416,7 +416,7 @@ namespace AyaNova.PlugIn.V8
|
||||
//MIGRATE MODE
|
||||
progress.Append("Setting v8 Server State to 'Migrate Mode'");
|
||||
await util.PostAsync("server-state", "{\"serverState\":\"MigrateMode\"}");
|
||||
|
||||
|
||||
//delay to allow migrate mode to take effect
|
||||
//this is a result of pm's generating in a loop at server causing issues with erasure
|
||||
//this delay should not need to be more time than it takes for a single PM to generate into a workorder
|
||||
@@ -448,7 +448,7 @@ namespace AyaNova.PlugIn.V8
|
||||
|
||||
//ERASE DB
|
||||
progress.Append("Erasing AyaNova 8 data");
|
||||
|
||||
|
||||
var a = await util.PostAsync("license/permanently-erase-all-data", "\"I understand\"");
|
||||
|
||||
|
||||
@@ -550,10 +550,10 @@ namespace AyaNova.PlugIn.V8
|
||||
if (ExceptionDuringMigrate != null)
|
||||
{
|
||||
progress.Append("ERROR, During operation:");
|
||||
progress.Append(progress.LastOp + ", " + progress.LastSubOp);
|
||||
progress.Append(progress.LastOp + ", " + progress.LastSubOp);
|
||||
progress.Append("Export failed with error:");
|
||||
progress.Append(ExceptionDuringMigrate.Message);
|
||||
progress.Append("StackTrace:" );
|
||||
progress.Append("StackTrace:");
|
||||
progress.Append(ExceptionDuringMigrate.StackTrace);
|
||||
if (ExceptionDuringMigrate.InnerException != null)
|
||||
{
|
||||
@@ -3110,6 +3110,17 @@ namespace AyaNova.PlugIn.V8
|
||||
dynamic d = new JObject();
|
||||
progress.Op(ObjectTypeName + " " + c.WorkorderService.ServiceNumber);
|
||||
|
||||
if (c.FromPMID != Guid.Empty)
|
||||
{
|
||||
d.fromPMId = await Getv7v8IdMapNullOk(c.FromPMID, RootObjectTypes.WorkorderPreventiveMaintenance, false, true);
|
||||
}
|
||||
|
||||
if (c.FromQuoteID != Guid.Empty)
|
||||
{
|
||||
d.fromQuoteId = await Getv7v8IdMapNullOk(c.FromQuoteID, RootObjectTypes.WorkorderPreventiveMaintenance, false, true);
|
||||
}
|
||||
|
||||
|
||||
d.serial = c.WorkorderService.ServiceNumber;
|
||||
if (c.WorkorderService.ServiceNumber > _highestWorkOrderNumberExported)
|
||||
_highestWorkOrderNumberExported = c.WorkorderService.ServiceNumber;
|
||||
@@ -3717,6 +3728,7 @@ namespace AyaNova.PlugIn.V8
|
||||
var rMainObject = await util.PostAsync("quote", d);
|
||||
long RavenId = util.IdFromResponse(rMainObject);
|
||||
Addv7v8IdMap(c.ID, RavenId);
|
||||
Addv7v8IdMap(c.WorkorderQuote.ID, RavenId);//some things need this id to link to
|
||||
d = rMainObject.ObjectResponse["data"];
|
||||
|
||||
|
||||
@@ -4085,6 +4097,7 @@ namespace AyaNova.PlugIn.V8
|
||||
|
||||
long RavenId = util.IdFromResponse(rMainObject);
|
||||
Addv7v8IdMap(c.ID, RavenId);
|
||||
Addv7v8IdMap(c.WorkorderPreventiveMaintenance.ID, RavenId);//some things need this id to link to
|
||||
d = rMainObject.ObjectResponse["data"];
|
||||
|
||||
|
||||
@@ -5532,10 +5545,10 @@ namespace AyaNova.PlugIn.V8
|
||||
|
||||
progress.SubOp("Wikifile: \"" + af.Name + "\" " + AyaBizUtils.FileSizeDisplay((decimal)af.FileSize));
|
||||
if (IsDuplicatev7v8IdMapItem(i.LT_O_AyaFile.Value, i.LT_O_AyaFile.Display, progress)) continue;
|
||||
|
||||
|
||||
if (af.FileSize > SmallestFileUploadRejectedAsTooBig)
|
||||
{
|
||||
progress.Append("WIKI Attachment file " + i.LT_O_AyaFile.Display + " too large (" + AyaBizUtils.FileSizeDisplay(af.FileSize) + "). " + MaxFileSizeInfo(af.FileSize));
|
||||
progress.Append("WIKI Attachment file " + i.LT_O_AyaFile.Display + " too large (" + AyaBizUtils.FileSizeDisplay(af.FileSize) + "). " + MaxFileSizeInfo(af.FileSize));
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -5599,7 +5612,7 @@ namespace AyaNova.PlugIn.V8
|
||||
|
||||
try
|
||||
{
|
||||
a=await util.PostFormDataAsync("attachment", formDataContent);
|
||||
a = await util.PostFormDataAsync("attachment", formDataContent);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
|
||||
<!-- Development test MSSQL DB -->
|
||||
<!-- Development test MSSQL DB
|
||||
<ConnectionType>DataBase</ConnectionType>
|
||||
<DataBaseType>MSSQL</DataBaseType>
|
||||
<DataBaseConnectionString>Server=DEV-V7-LAPTOP\SQLEXPRESS;initial catalog=AyaNova;User Id=sa; Password = abraxis;</DataBaseConnectionString>
|
||||
|
||||
-->
|
||||
|
||||
|
||||
<!-- DEVELOPMENT embedded Firebird database
|
||||
<!-- DEVELOPMENT embedded Firebird database -->
|
||||
|
||||
<ConnectionType>DataBase</ConnectionType>
|
||||
<DataBaseType>FireBird</DataBaseType>
|
||||
<DataBaseConnectionString>ServerType=1;DataBase=C:\data\AyaNova\database\AYANOVA.fdb;Dialect=3;</DataBaseConnectionString>
|
||||
-->
|
||||
|
||||
|
||||
|
||||
<!-- DataPortal
|
||||
|
||||
Reference in New Issue
Block a user