This commit is contained in:
@@ -117,7 +117,7 @@ namespace AyaNovaQBI
|
||||
|
||||
|
||||
//Is AyaNova object already mapped?
|
||||
IntegrationItem m = util.QBIntegration.Items.FirstOrDefault(z => z.Id == AyaId && z.AType == _Type);
|
||||
IntegrationItem m = util.QBIntegration.Items.FirstOrDefault(z => z.ObjectId == AyaId && z.AType == _Type);
|
||||
if (m != null)
|
||||
{
|
||||
//Is it already linked to the selected qb object?
|
||||
@@ -148,7 +148,7 @@ namespace AyaNovaQBI
|
||||
else
|
||||
{
|
||||
//user is removing mapping so remove the integrationitem entirely from the collection
|
||||
util.QBIntegration.Items.Remove(m);
|
||||
var didremove=util.QBIntegration.Items.Remove(m);
|
||||
SaveIntegration = true;
|
||||
}
|
||||
|
||||
@@ -256,11 +256,11 @@ namespace AyaNovaQBI
|
||||
bool bLinked = util.QBIntegration.Items.Any(z => z.AType == _Type && z.ObjectId == i.Id);
|
||||
if (DisplayRow(bLinked))
|
||||
{
|
||||
var qbItem = util.QBIntegration.Items.FirstOrDefault(z => z.AType == _Type && z.Id == i.Id);
|
||||
if (qbItem == null)
|
||||
{
|
||||
qbItem = new IntegrationItem();
|
||||
}
|
||||
//var qbItem = util.QBIntegration.Items.FirstOrDefault(z => z.AType == _Type && z.Id == i.Id);
|
||||
//if (qbItem == null)
|
||||
//{
|
||||
// qbItem = new IntegrationItem();
|
||||
//}
|
||||
_aya.Rows.Add(new object[] { i.Name, i.Id, bLinked });
|
||||
}
|
||||
|
||||
@@ -287,7 +287,7 @@ namespace AyaNovaQBI
|
||||
bool bLinked = util.QBIntegration.Items.Any(z => z.AType == _Type && z.ObjectId == i.Id);
|
||||
if (DisplayRow(bLinked))
|
||||
{
|
||||
var qbItem = util.QBIntegration.Items.FirstOrDefault(z => z.AType == _Type && z.Id == i.Id);
|
||||
//var qbItem = util.QBIntegration.Items.FirstOrDefault(z => z.AType == _Type && z.Id == i.Id);
|
||||
_aya.Rows.Add(new object[] { i.Name, i.Id, bLinked });
|
||||
}
|
||||
|
||||
@@ -326,7 +326,7 @@ namespace AyaNovaQBI
|
||||
bool bLinked = util.QBIntegration.Items.Any(z => z.AType == _Type && z.ObjectId == i.Id);
|
||||
if (DisplayRow(bLinked))
|
||||
{
|
||||
var qbItem = util.QBIntegration.Items.FirstOrDefault(z => z.AType == _Type && z.Id == i.Id);
|
||||
// var qbItem = util.QBIntegration.Items.FirstOrDefault(z => z.AType == _Type && z.Id == i.Id);
|
||||
_aya.Rows.Add(new object[] { i.Name, i.Id, bLinked });
|
||||
}
|
||||
|
||||
@@ -369,7 +369,7 @@ namespace AyaNovaQBI
|
||||
bool bLinked = util.QBIntegration.Items.Any(z => z.AType == _Type && z.ObjectId == i.Id);
|
||||
if (DisplayRow(bLinked))
|
||||
{
|
||||
var qbItem = util.QBIntegration.Items.FirstOrDefault(z => z.AType == _Type && z.Id == i.Id);
|
||||
// var qbItem = util.QBIntegration.Items.FirstOrDefault(z => z.AType == _Type && z.Id == i.Id);
|
||||
_aya.Rows.Add(new object[] { i.Name, i.Id, bLinked });
|
||||
}
|
||||
|
||||
@@ -405,7 +405,7 @@ namespace AyaNovaQBI
|
||||
bool bLinked = util.QBIntegration.Items.Any(z => z.AType == _Type && z.ObjectId == i.Id);
|
||||
if (DisplayRow(bLinked))
|
||||
{
|
||||
var qbItem = util.QBIntegration.Items.FirstOrDefault(z => z.AType == _Type && z.Id == i.Id);
|
||||
//var qbItem = util.QBIntegration.Items.FirstOrDefault(z => z.AType == _Type && z.Id == i.Id);
|
||||
_aya.Rows.Add(new object[] { i.Name, i.Id, bLinked });
|
||||
}
|
||||
|
||||
|
||||
8
AyaNovaQBI/MapSelectQBItem.Designer.cs
generated
8
AyaNovaQBI/MapSelectQBItem.Designer.cs
generated
@@ -42,7 +42,7 @@
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(715, 13);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "Map selected AyaNova items to:";
|
||||
this.label1.Text = "Link selected AyaNova items to:";
|
||||
//
|
||||
// cbQBItems
|
||||
//
|
||||
@@ -78,11 +78,11 @@
|
||||
// ckNothing
|
||||
//
|
||||
this.ckNothing.AutoSize = true;
|
||||
this.ckNothing.Location = new System.Drawing.Point(16, 56);
|
||||
this.ckNothing.Location = new System.Drawing.Point(16, 59);
|
||||
this.ckNothing.Name = "ckNothing";
|
||||
this.ckNothing.Size = new System.Drawing.Size(80, 17);
|
||||
this.ckNothing.Size = new System.Drawing.Size(133, 17);
|
||||
this.ckNothing.TabIndex = 15;
|
||||
this.ckNothing.Text = "checkBox1";
|
||||
this.ckNothing.Text = "Nothing / Remove link";
|
||||
this.ckNothing.UseVisualStyleBackColor = true;
|
||||
this.ckNothing.CheckedChanged += new System.EventHandler(this.ckNothing_CheckedChanged);
|
||||
//
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace AyaNovaQBI
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ckNothing.Checked) return "<nothing / remove link>";
|
||||
if (ckNothing.Checked) return "Nothing / Remove link";
|
||||
return ((DataRowView)cbQBItems.SelectedItem).Row[0].ToString();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user