This commit is contained in:
2022-07-03 21:23:42 +00:00
parent 384a78535c
commit d1c4eb7cc8
2 changed files with 119 additions and 187 deletions

View File

@@ -28,10 +28,10 @@
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.objectToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.customersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@@ -43,21 +43,21 @@
this.allItemsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.linkedItemsOnlyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.unlinkedItemsOnlyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.linkSelectedItemsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.importSelectedItemsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.autoLinkToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.updateAyaNovaPricesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.gridAya = new System.Windows.Forms.DataGridView();
this.AyaName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.linked = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.id = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.gridQB = new System.Windows.Forms.DataGridView();
this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.importSelectedItemsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.linkSelectedItemsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.AyaName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.linked = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.id = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.menuStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.gridAya)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.gridQB)).BeginInit();
@@ -100,7 +100,7 @@
this.customersToolStripMenuItem.CheckOnClick = true;
this.customersToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked;
this.customersToolStripMenuItem.Name = "customersToolStripMenuItem";
this.customersToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.customersToolStripMenuItem.Size = new System.Drawing.Size(139, 22);
this.customersToolStripMenuItem.Text = "&Customers";
this.customersToolStripMenuItem.Click += new System.EventHandler(this.customersToolStripMenuItem_Click);
//
@@ -108,7 +108,7 @@
//
this.serviceRatesToolStripMenuItem.CheckOnClick = true;
this.serviceRatesToolStripMenuItem.Name = "serviceRatesToolStripMenuItem";
this.serviceRatesToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.serviceRatesToolStripMenuItem.Size = new System.Drawing.Size(139, 22);
this.serviceRatesToolStripMenuItem.Text = "&Service rates";
this.serviceRatesToolStripMenuItem.Click += new System.EventHandler(this.serviceRatesToolStripMenuItem_Click);
//
@@ -116,7 +116,7 @@
//
this.travelRatesToolStripMenuItem.CheckOnClick = true;
this.travelRatesToolStripMenuItem.Name = "travelRatesToolStripMenuItem";
this.travelRatesToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.travelRatesToolStripMenuItem.Size = new System.Drawing.Size(139, 22);
this.travelRatesToolStripMenuItem.Text = "&Travel rates";
this.travelRatesToolStripMenuItem.Click += new System.EventHandler(this.travelRatesToolStripMenuItem_Click);
//
@@ -124,7 +124,7 @@
//
this.partsToolStripMenuItem.CheckOnClick = true;
this.partsToolStripMenuItem.Name = "partsToolStripMenuItem";
this.partsToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.partsToolStripMenuItem.Size = new System.Drawing.Size(139, 22);
this.partsToolStripMenuItem.Text = "&Parts";
this.partsToolStripMenuItem.Click += new System.EventHandler(this.partsToolStripMenuItem_Click);
//
@@ -132,7 +132,7 @@
//
this.vendorsToolStripMenuItem.CheckOnClick = true;
this.vendorsToolStripMenuItem.Name = "vendorsToolStripMenuItem";
this.vendorsToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.vendorsToolStripMenuItem.Size = new System.Drawing.Size(139, 22);
this.vendorsToolStripMenuItem.Text = "&Vendors";
this.vendorsToolStripMenuItem.Click += new System.EventHandler(this.vendorsToolStripMenuItem_Click);
//
@@ -152,7 +152,7 @@
this.allItemsToolStripMenuItem.CheckOnClick = true;
this.allItemsToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked;
this.allItemsToolStripMenuItem.Name = "allItemsToolStripMenuItem";
this.allItemsToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.allItemsToolStripMenuItem.Size = new System.Drawing.Size(179, 22);
this.allItemsToolStripMenuItem.Text = "&All items";
this.allItemsToolStripMenuItem.Click += new System.EventHandler(this.showSubItemToolStripMenuItem_Click);
//
@@ -160,7 +160,7 @@
//
this.linkedItemsOnlyToolStripMenuItem.CheckOnClick = true;
this.linkedItemsOnlyToolStripMenuItem.Name = "linkedItemsOnlyToolStripMenuItem";
this.linkedItemsOnlyToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.linkedItemsOnlyToolStripMenuItem.Size = new System.Drawing.Size(179, 22);
this.linkedItemsOnlyToolStripMenuItem.Text = "&Linked items only";
this.linkedItemsOnlyToolStripMenuItem.Click += new System.EventHandler(this.showSubItemToolStripMenuItem_Click);
//
@@ -168,10 +168,24 @@
//
this.unlinkedItemsOnlyToolStripMenuItem.CheckOnClick = true;
this.unlinkedItemsOnlyToolStripMenuItem.Name = "unlinkedItemsOnlyToolStripMenuItem";
this.unlinkedItemsOnlyToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.unlinkedItemsOnlyToolStripMenuItem.Size = new System.Drawing.Size(179, 22);
this.unlinkedItemsOnlyToolStripMenuItem.Text = "&Unlinked items only";
this.unlinkedItemsOnlyToolStripMenuItem.Click += new System.EventHandler(this.showSubItemToolStripMenuItem_Click);
//
// linkSelectedItemsToolStripMenuItem
//
this.linkSelectedItemsToolStripMenuItem.Name = "linkSelectedItemsToolStripMenuItem";
this.linkSelectedItemsToolStripMenuItem.Size = new System.Drawing.Size(119, 20);
this.linkSelectedItemsToolStripMenuItem.Text = "&Link selected items";
this.linkSelectedItemsToolStripMenuItem.Click += new System.EventHandler(this.linkSelectedItemsToolStripMenuItem_Click);
//
// importSelectedItemsToolStripMenuItem
//
this.importSelectedItemsToolStripMenuItem.Name = "importSelectedItemsToolStripMenuItem";
this.importSelectedItemsToolStripMenuItem.Size = new System.Drawing.Size(133, 20);
this.importSelectedItemsToolStripMenuItem.Text = "&Import selected items";
this.importSelectedItemsToolStripMenuItem.Click += new System.EventHandler(this.importSelectedItemsToolStripMenuItem_Click);
//
// autoLinkToolStripMenuItem
//
this.autoLinkToolStripMenuItem.Name = "autoLinkToolStripMenuItem";
@@ -190,17 +204,17 @@
this.gridAya.AllowUserToAddRows = false;
this.gridAya.AllowUserToDeleteRows = false;
this.gridAya.AllowUserToResizeRows = false;
dataGridViewCellStyle9.BackColor = System.Drawing.Color.WhiteSmoke;
this.gridAya.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle9;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
this.gridAya.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.gridAya.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle10.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.gridAya.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle10;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.gridAya.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.gridAya.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.gridAya.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.AyaName,
@@ -216,47 +230,23 @@
this.gridAya.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.gridAya_CellClick);
this.gridAya.SelectionChanged += new System.EventHandler(this.gridAya_SelectionChanged);
//
// AyaName
//
this.AyaName.DataPropertyName = "name";
this.AyaName.HeaderText = "Name";
this.AyaName.Name = "AyaName";
this.AyaName.ReadOnly = true;
this.AyaName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// linked
//
this.linked.DataPropertyName = "linked";
this.linked.HeaderText = "Linked";
this.linked.Name = "linked";
this.linked.ReadOnly = true;
this.linked.Resizable = System.Windows.Forms.DataGridViewTriState.True;
//
// id
//
this.id.DataPropertyName = "id";
this.id.HeaderText = "id";
this.id.Name = "id";
this.id.ReadOnly = true;
this.id.Visible = false;
//
// gridQB
//
this.gridQB.AllowDrop = true;
this.gridQB.AllowUserToAddRows = false;
this.gridQB.AllowUserToDeleteRows = false;
this.gridQB.AllowUserToResizeRows = false;
dataGridViewCellStyle11.BackColor = System.Drawing.Color.WhiteSmoke;
this.gridQB.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle11;
dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke;
this.gridQB.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3;
this.gridQB.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle12.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
dataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.gridQB.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle12;
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.gridQB.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4;
this.gridQB.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.gridQB.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.dataGridViewTextBoxColumn1,
@@ -272,30 +262,6 @@
this.gridQB.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.gridQB_CellClick);
this.gridQB.SelectionChanged += new System.EventHandler(this.gridQB_SelectionChanged);
//
// dataGridViewTextBoxColumn1
//
this.dataGridViewTextBoxColumn1.DataPropertyName = "name";
this.dataGridViewTextBoxColumn1.HeaderText = "Name";
this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
this.dataGridViewTextBoxColumn1.ReadOnly = true;
this.dataGridViewTextBoxColumn1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// dataGridViewTextBoxColumn2
//
this.dataGridViewTextBoxColumn2.DataPropertyName = "linked";
this.dataGridViewTextBoxColumn2.HeaderText = "Linked";
this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
this.dataGridViewTextBoxColumn2.ReadOnly = true;
this.dataGridViewTextBoxColumn2.Resizable = System.Windows.Forms.DataGridViewTriState.True;
//
// dataGridViewTextBoxColumn3
//
this.dataGridViewTextBoxColumn3.DataPropertyName = "id";
this.dataGridViewTextBoxColumn3.HeaderText = "id";
this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
this.dataGridViewTextBoxColumn3.ReadOnly = true;
this.dataGridViewTextBoxColumn3.Visible = false;
//
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
@@ -339,19 +305,54 @@
this.label2.TabIndex = 6;
this.label2.Text = "QuickBooks";
//
// importSelectedItemsToolStripMenuItem
// AyaName
//
this.importSelectedItemsToolStripMenuItem.Name = "importSelectedItemsToolStripMenuItem";
this.importSelectedItemsToolStripMenuItem.Size = new System.Drawing.Size(133, 20);
this.importSelectedItemsToolStripMenuItem.Text = "&Import selected items";
this.importSelectedItemsToolStripMenuItem.Click += new System.EventHandler(this.importSelectedItemsToolStripMenuItem_Click);
this.AyaName.DataPropertyName = "name";
this.AyaName.HeaderText = "Name";
this.AyaName.Name = "AyaName";
this.AyaName.ReadOnly = true;
this.AyaName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// linkSelectedItemsToolStripMenuItem
// linked
//
this.linkSelectedItemsToolStripMenuItem.Name = "linkSelectedItemsToolStripMenuItem";
this.linkSelectedItemsToolStripMenuItem.Size = new System.Drawing.Size(119, 20);
this.linkSelectedItemsToolStripMenuItem.Text = "&Link selected items";
this.linkSelectedItemsToolStripMenuItem.Click += new System.EventHandler(this.linkSelectedItemsToolStripMenuItem_Click);
this.linked.DataPropertyName = "linked";
this.linked.HeaderText = "Linked to";
this.linked.Name = "linked";
this.linked.ReadOnly = true;
this.linked.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.linked.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// id
//
this.id.DataPropertyName = "id";
this.id.HeaderText = "id";
this.id.Name = "id";
this.id.ReadOnly = true;
this.id.Visible = false;
//
// dataGridViewTextBoxColumn1
//
this.dataGridViewTextBoxColumn1.DataPropertyName = "name";
this.dataGridViewTextBoxColumn1.HeaderText = "Name";
this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
this.dataGridViewTextBoxColumn1.ReadOnly = true;
this.dataGridViewTextBoxColumn1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// dataGridViewTextBoxColumn2
//
this.dataGridViewTextBoxColumn2.DataPropertyName = "linked";
this.dataGridViewTextBoxColumn2.HeaderText = "Linked";
this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
this.dataGridViewTextBoxColumn2.ReadOnly = true;
this.dataGridViewTextBoxColumn2.Resizable = System.Windows.Forms.DataGridViewTriState.True;
//
// dataGridViewTextBoxColumn3
//
this.dataGridViewTextBoxColumn3.DataPropertyName = "id";
this.dataGridViewTextBoxColumn3.HeaderText = "id";
this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
this.dataGridViewTextBoxColumn3.ReadOnly = true;
this.dataGridViewTextBoxColumn3.Visible = false;
//
// Map
//
@@ -398,13 +399,13 @@
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.ToolStripMenuItem importSelectedItemsToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem linkSelectedItemsToolStripMenuItem;
private System.Windows.Forms.DataGridViewTextBoxColumn AyaName;
private System.Windows.Forms.DataGridViewCheckBoxColumn linked;
private System.Windows.Forms.DataGridViewTextBoxColumn linked;
private System.Windows.Forms.DataGridViewTextBoxColumn id;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;
private System.Windows.Forms.DataGridViewCheckBoxColumn dataGridViewTextBoxColumn2;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn3;
private System.Windows.Forms.ToolStripMenuItem importSelectedItemsToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem linkSelectedItemsToolStripMenuItem;
}
}

View File

@@ -36,7 +36,7 @@ namespace AyaNovaQBI
_aya = new DataTable("AyaNova");
_aya.Columns.Add("name", typeof(string));
_aya.Columns.Add("id", typeof(long));
_aya.Columns.Add("linked", typeof(bool));
_aya.Columns.Add("linked", typeof(string));
//Case 339
_aya.DefaultView.Sort = "name asc";
@@ -226,44 +226,13 @@ namespace AyaNovaQBI
#region client
/*
foreach(ClientPickList.ClientPickListInfo i in Util.AyaClientList)
{
if(i.Active)
{
bool bLinked=Util.QBI.Maps.Contains(i.ID);
if(DisplayRow(bLinked))
_aya.Rows.Add(new object[] {i.ID,i.Name,bLinked});
}
}
//Fill QB table with QB Customers from prefetched table
foreach(DataRow dr in Util.QBClients.Rows)
{
bool bLinked=Util.QBI.Maps.Contains(dr["ID"].ToString(),RootObjectTypes.Client);
if(DisplayRow(bLinked))
_qb.Rows.Add(new object[] {dr["ID"].ToString(),dr["FullName"].ToString(),bLinked});
}
*/
foreach (var i in util.AyaClientList)
{
if (i.Active)
{
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();
//}
_aya.Rows.Add(new object[] { i.Name, i.Id, bLinked });
}
var v = util.QBIntegration.Items.FirstOrDefault(z => z.AType == _Type && z.ObjectId == i.Id);
if (DisplayRow(v != null))
_aya.Rows.Add(new object[] { i.Name, i.Id, v == null ? null : v.IntegrationItemName });
}
}
@@ -284,13 +253,9 @@ namespace AyaNovaQBI
{
if (i.Active)
{
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);
_aya.Rows.Add(new object[] { i.Name, i.Id, bLinked });
}
var v = util.QBIntegration.Items.FirstOrDefault(z => z.AType == _Type && z.ObjectId == i.Id);
if (DisplayRow(v != null))
_aya.Rows.Add(new object[] { i.Name, i.Id, v == null ? null : v.IntegrationItemName });
}
}
@@ -312,23 +277,9 @@ namespace AyaNovaQBI
{
if (i.Active)
{
// //Determine the most likely description for purposes
// //of importing a rate from QB later by picking the first one
// //in the existing rate list that is non-empty
// //typically this will just be hours and every rate will
// //probably use the same one or for travel "miles" or "km's" etc
// if(_MostLikelyRateUnitChargeDescriptionID==Guid.Empty && i.RateUnitChargeDescriptionID!=Guid.Empty)
// _MostLikelyRateUnitChargeDescriptionID=i.RateUnitChargeDescriptionID;
//After discussion we decided to not us any rate unit charge description
//so leaving the code in but defaulted to guid.empty for now.
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);
_aya.Rows.Add(new object[] { i.Name, i.Id, bLinked });
}
var v = util.QBIntegration.Items.FirstOrDefault(z => z.AType == _Type && z.ObjectId == i.Id);
if (DisplayRow(v != null))
_aya.Rows.Add(new object[] { i.Name, i.Id, v == null ? null : v.IntegrationItemName });
}
}
@@ -355,24 +306,9 @@ namespace AyaNovaQBI
{
if (i.Active)
{
// //Determine the most likely description for purposes
// //of importing a rate from QB later by picking the first one
// //in the existing rate list that is non-empty
// //typically this will just be hours and every rate will
// //probably use the same one or for travel "miles" or "km's" etc
// if(_MostLikelyRateUnitChargeDescriptionID==Guid.Empty && i.RateUnitChargeDescriptionID!=Guid.Empty)
// _MostLikelyRateUnitChargeDescriptionID=i.RateUnitChargeDescriptionID;
//After discussion we decided to not us any rate unit charge description
//so leaving the code in but defaulted to guid.empty for now.
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);
_aya.Rows.Add(new object[] { i.Name, i.Id, bLinked });
}
var v = util.QBIntegration.Items.FirstOrDefault(z => z.AType == _Type && z.ObjectId == i.Id);
if (DisplayRow(v != null))
_aya.Rows.Add(new object[] { i.Name, i.Id, v == null ? null : v.IntegrationItemName });
}
}
@@ -401,14 +337,9 @@ namespace AyaNovaQBI
{
if (i.Active)
{
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);
_aya.Rows.Add(new object[] { i.Name, i.Id, bLinked });
}
var v = util.QBIntegration.Items.FirstOrDefault(z => z.AType == _Type && z.ObjectId == i.Id);
if (DisplayRow(v != null))
_aya.Rows.Add(new object[] { i.Name, i.Id, v == null ? null : v.IntegrationItemName });
}
}