This commit is contained in:
2
AyaNovaQBI/MainForm.Designer.cs
generated
2
AyaNovaQBI/MainForm.Designer.cs
generated
@@ -144,7 +144,7 @@
|
|||||||
//
|
//
|
||||||
this.mapAndImportToolStripMenuItem.Name = "mapAndImportToolStripMenuItem";
|
this.mapAndImportToolStripMenuItem.Name = "mapAndImportToolStripMenuItem";
|
||||||
this.mapAndImportToolStripMenuItem.Size = new System.Drawing.Size(245, 22);
|
this.mapAndImportToolStripMenuItem.Size = new System.Drawing.Size(245, 22);
|
||||||
this.mapAndImportToolStripMenuItem.Text = "&LInk and import";
|
this.mapAndImportToolStripMenuItem.Text = "&Link and synchronize";
|
||||||
this.mapAndImportToolStripMenuItem.Click += new System.EventHandler(this.mapAndImportToolStripMenuItem_Click);
|
this.mapAndImportToolStripMenuItem.Click += new System.EventHandler(this.mapAndImportToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
// invoiceDescriptiveTextTemplateToolStripMenuItem
|
// invoiceDescriptiveTextTemplateToolStripMenuItem
|
||||||
|
|||||||
@@ -1022,7 +1022,7 @@ namespace AyaNovaQBI
|
|||||||
w.Ops = $"Updating {sTo} {sType} from {sFrom}...";
|
w.Ops = $"Updating {sTo} {sType} from {sFrom}...";
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
menuStrip1.Enabled = gridQB.Enabled = gridAya.Enabled = false;
|
||||||
|
|
||||||
bool SaveIntegration = false;
|
bool SaveIntegration = false;
|
||||||
|
|
||||||
@@ -1047,12 +1047,13 @@ namespace AyaNovaQBI
|
|||||||
{
|
{
|
||||||
string AyaName = r.Cells[0].Value.ToString();
|
string AyaName = r.Cells[0].Value.ToString();
|
||||||
long AyaId = (long)r.Cells[1].Value;
|
long AyaId = (long)r.Cells[1].Value;
|
||||||
w.Step = AyaName;
|
|
||||||
|
|
||||||
//only linked items can be updated
|
//only linked items can be updated
|
||||||
IntegrationItem im = util.QBIntegration.Items.FirstOrDefault(z => z.ObjectId == AyaId && z.AType == _Type);
|
IntegrationItem im = util.QBIntegration.Items.FirstOrDefault(z => z.ObjectId == AyaId && z.AType == _Type);
|
||||||
if (im != null)
|
if (im != null)
|
||||||
{
|
{
|
||||||
|
w.Step = AyaName;
|
||||||
switch (_Type)
|
switch (_Type)
|
||||||
{
|
{
|
||||||
case AyaType.Customer:
|
case AyaType.Customer:
|
||||||
@@ -1072,12 +1073,15 @@ namespace AyaNovaQBI
|
|||||||
{
|
{
|
||||||
|
|
||||||
case AyaType.Customer:
|
case AyaType.Customer:
|
||||||
|
w.Step = "Refreshing AyaNova Customers cache";
|
||||||
await util.PopulateAyaClientList();
|
await util.PopulateAyaClientList();
|
||||||
break;
|
break;
|
||||||
case AyaType.Vendor:
|
case AyaType.Vendor:
|
||||||
|
w.Step = "Refreshing AyaNova Vendors cache";
|
||||||
await util.PopulateAyaVendorList();
|
await util.PopulateAyaVendorList();
|
||||||
break;
|
break;
|
||||||
case AyaType.Part:
|
case AyaType.Part:
|
||||||
|
w.Step = "Refreshing AyaNova Parts cache";
|
||||||
await util.PopulateAyaPartList();
|
await util.PopulateAyaPartList();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1090,14 +1094,15 @@ namespace AyaNovaQBI
|
|||||||
|
|
||||||
foreach (DataGridViewRow r in gridQB.SelectedRows)
|
foreach (DataGridViewRow r in gridQB.SelectedRows)
|
||||||
{
|
{
|
||||||
var QBItemName = gridQB.SelectedRows[0].Cells[0].Value.ToString();
|
var QBItemName = r.Cells[0].Value.ToString();
|
||||||
var QBItemId = r.Cells[1].Value.ToString();
|
var QBItemId = r.Cells[1].Value.ToString();
|
||||||
w.Step = QBItemName;
|
|
||||||
|
|
||||||
//only linked items can be updated
|
//only linked items can be updated
|
||||||
IntegrationItem im = util.QBIntegration.Items.FirstOrDefault(z => z.IntegrationItemId == QBItemId && z.AType == _Type);
|
IntegrationItem im = util.QBIntegration.Items.FirstOrDefault(z => z.IntegrationItemId == QBItemId && z.AType == _Type);
|
||||||
if (im != null)
|
if (im != null)
|
||||||
{
|
{
|
||||||
|
w.Step = QBItemName;
|
||||||
switch (_Type)
|
switch (_Type)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -1115,17 +1120,21 @@ namespace AyaNovaQBI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
switch (_Type)
|
switch (_Type)
|
||||||
{
|
{
|
||||||
case AyaType.Customer:
|
case AyaType.Customer:
|
||||||
|
w.Step = "Refreshing QB Customers cache";
|
||||||
await util.PopulateQBClientCacheAsync();
|
await util.PopulateQBClientCacheAsync();
|
||||||
break;
|
break;
|
||||||
case AyaType.Vendor:
|
case AyaType.Vendor:
|
||||||
|
w.Step = "Refreshing QB Vendors cache";
|
||||||
await util.PopulateQBVendorCacheAsync();
|
await util.PopulateQBVendorCacheAsync();
|
||||||
break;
|
break;
|
||||||
case AyaType.ServiceRate:
|
case AyaType.ServiceRate:
|
||||||
case AyaType.TravelRate:
|
case AyaType.TravelRate:
|
||||||
case AyaType.Part:
|
case AyaType.Part:
|
||||||
|
w.Step = "Refreshing QB Items cache";
|
||||||
await util.PopulateQBItemCacheAsync();
|
await util.PopulateQBItemCacheAsync();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1147,6 +1156,7 @@ namespace AyaNovaQBI
|
|||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
w.Close();
|
w.Close();
|
||||||
|
menuStrip1.Enabled = gridQB.Enabled = gridAya.Enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user