This commit is contained in:
2022-07-02 19:35:52 +00:00
parent 104c90724f
commit 6c331fec74
3 changed files with 208 additions and 87 deletions

View File

@@ -30,6 +30,8 @@
{ {
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = 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 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.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.objectToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.objectToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.customersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.customersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@@ -44,13 +46,24 @@
this.autoLinkToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.autoLinkToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.updateAyaNovaPricesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.updateAyaNovaPricesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.mapSelectedItemsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.mapSelectedItemsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.grid = new System.Windows.Forms.DataGridView(); this.gridAya = new System.Windows.Forms.DataGridView();
this.gridQB = new System.Windows.Forms.DataGridView();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.AyaName = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.AyaName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.QBName = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.linked = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.qbid = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.id = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ayaid = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.menuStrip1.SuspendLayout(); this.menuStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.grid)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.gridAya)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.gridQB)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// menuStrip1 // menuStrip1
@@ -63,7 +76,7 @@
this.mapSelectedItemsToolStripMenuItem}); this.mapSelectedItemsToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0); this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1"; this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(800, 24); this.menuStrip1.Size = new System.Drawing.Size(783, 24);
this.menuStrip1.TabIndex = 0; this.menuStrip1.TabIndex = 0;
this.menuStrip1.Text = "menuStrip1"; this.menuStrip1.Text = "menuStrip1";
// //
@@ -82,35 +95,35 @@
// customersToolStripMenuItem // customersToolStripMenuItem
// //
this.customersToolStripMenuItem.Name = "customersToolStripMenuItem"; 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.Text = "&Customers";
this.customersToolStripMenuItem.Click += new System.EventHandler(this.customersToolStripMenuItem_Click); this.customersToolStripMenuItem.Click += new System.EventHandler(this.customersToolStripMenuItem_Click);
// //
// serviceRatesToolStripMenuItem // serviceRatesToolStripMenuItem
// //
this.serviceRatesToolStripMenuItem.Name = "serviceRatesToolStripMenuItem"; 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.Text = "&Service rates";
this.serviceRatesToolStripMenuItem.Click += new System.EventHandler(this.serviceRatesToolStripMenuItem_Click); this.serviceRatesToolStripMenuItem.Click += new System.EventHandler(this.serviceRatesToolStripMenuItem_Click);
// //
// travelRatesToolStripMenuItem // travelRatesToolStripMenuItem
// //
this.travelRatesToolStripMenuItem.Name = "travelRatesToolStripMenuItem"; 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.Text = "&Travel rates";
this.travelRatesToolStripMenuItem.Click += new System.EventHandler(this.travelRatesToolStripMenuItem_Click); this.travelRatesToolStripMenuItem.Click += new System.EventHandler(this.travelRatesToolStripMenuItem_Click);
// //
// partsToolStripMenuItem // partsToolStripMenuItem
// //
this.partsToolStripMenuItem.Name = "partsToolStripMenuItem"; 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.Text = "&Parts";
this.partsToolStripMenuItem.Click += new System.EventHandler(this.partsToolStripMenuItem_Click); this.partsToolStripMenuItem.Click += new System.EventHandler(this.partsToolStripMenuItem_Click);
// //
// vendorsToolStripMenuItem // vendorsToolStripMenuItem
// //
this.vendorsToolStripMenuItem.Name = "vendorsToolStripMenuItem"; 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.Text = "&Vendors";
this.vendorsToolStripMenuItem.Click += new System.EventHandler(this.vendorsToolStripMenuItem_Click); this.vendorsToolStripMenuItem.Click += new System.EventHandler(this.vendorsToolStripMenuItem_Click);
// //
@@ -170,14 +183,14 @@
this.mapSelectedItemsToolStripMenuItem.Visible = false; this.mapSelectedItemsToolStripMenuItem.Visible = false;
this.mapSelectedItemsToolStripMenuItem.Click += new System.EventHandler(this.mapSelectedItemsToolStripMenuItem_Click); this.mapSelectedItemsToolStripMenuItem.Click += new System.EventHandler(this.mapSelectedItemsToolStripMenuItem_Click);
// //
// grid // gridAya
// //
this.grid.AllowUserToAddRows = false; this.gridAya.AllowUserToAddRows = false;
this.grid.AllowUserToDeleteRows = false; this.gridAya.AllowUserToDeleteRows = false;
this.grid.AllowUserToResizeRows = false; this.gridAya.AllowUserToResizeRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke; dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
this.grid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; this.gridAya.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.grid.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; this.gridAya.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control; 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.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
@@ -185,61 +198,149 @@
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Control; dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.WindowText; dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True; dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.grid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; this.gridAya.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.grid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.gridAya.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.grid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.gridAya.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.AyaName, this.AyaName,
this.QBName, this.linked,
this.qbid, this.id});
this.ayaid}); this.gridAya.Dock = System.Windows.Forms.DockStyle.Fill;
this.grid.Dock = System.Windows.Forms.DockStyle.Fill; this.gridAya.EnableHeadersVisualStyles = false;
this.grid.EnableHeadersVisualStyles = false; this.gridAya.Location = new System.Drawing.Point(0, 0);
this.grid.Location = new System.Drawing.Point(0, 24); this.gridAya.Name = "gridAya";
this.grid.Name = "grid"; this.gridAya.ReadOnly = true;
this.grid.ReadOnly = true; this.gridAya.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.grid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.gridAya.Size = new System.Drawing.Size(370, 533);
this.grid.Size = new System.Drawing.Size(800, 426); this.gridAya.TabIndex = 4;
this.grid.TabIndex = 4; this.gridAya.SelectionChanged += new System.EventHandler(this.grid_SelectionChanged);
this.grid.SelectionChanged += new System.EventHandler(this.grid_SelectionChanged); //
// gridQB
//
this.gridQB.AllowUserToAddRows = false;
this.gridQB.AllowUserToDeleteRows = false;
this.gridQB.AllowUserToResizeRows = false;
dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke;
this.gridQB.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3;
this.gridQB.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
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,
this.dataGridViewTextBoxColumn2,
this.dataGridViewTextBoxColumn3});
this.gridQB.Dock = System.Windows.Forms.DockStyle.Fill;
this.gridQB.EnableHeadersVisualStyles = false;
this.gridQB.Location = new System.Drawing.Point(0, 0);
this.gridQB.Name = "gridQB";
this.gridQB.ReadOnly = true;
this.gridQB.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.gridQB.Size = new System.Drawing.Size(381, 533);
this.gridQB.TabIndex = 5;
//
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.IsSplitterFixed = true;
this.splitContainer1.Location = new System.Drawing.Point(0, 24);
this.splitContainer1.Name = "splitContainer1";
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.label1);
this.splitContainer1.Panel1.Controls.Add(this.gridAya);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.label2);
this.splitContainer1.Panel2.Controls.Add(this.gridQB);
this.splitContainer1.Size = new System.Drawing.Size(783, 533);
this.splitContainer1.SplitterDistance = 370;
this.splitContainer1.SplitterWidth = 32;
this.splitContainer1.TabIndex = 6;
//
// label1
//
this.label1.Dock = System.Windows.Forms.DockStyle.Top;
this.label1.Font = new System.Drawing.Font("Tahoma", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.ForeColor = System.Drawing.Color.Navy;
this.label1.Location = new System.Drawing.Point(0, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(370, 23);
this.label1.TabIndex = 5;
this.label1.Text = "AyaNova";
//
// label2
//
this.label2.Dock = System.Windows.Forms.DockStyle.Top;
this.label2.Font = new System.Drawing.Font("Tahoma", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label2.ForeColor = System.Drawing.Color.ForestGreen;
this.label2.Location = new System.Drawing.Point(0, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(381, 23);
this.label2.TabIndex = 6;
this.label2.Text = "QuickBooks";
//
// 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;
// //
// AyaName // AyaName
// //
this.AyaName.DataPropertyName = "AyaName"; this.AyaName.DataPropertyName = "name";
this.AyaName.HeaderText = "AyaNova name"; this.AyaName.HeaderText = "Name";
this.AyaName.Name = "AyaName"; this.AyaName.Name = "AyaName";
this.AyaName.ReadOnly = true; this.AyaName.ReadOnly = true;
this.AyaName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; this.AyaName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
// //
// QBName // linked
// //
this.QBName.DataPropertyName = "QBname"; this.linked.DataPropertyName = "linked";
this.QBName.HeaderText = "Linked to QB object"; this.linked.HeaderText = "Linked";
this.QBName.Name = "QBName"; this.linked.Name = "linked";
this.QBName.ReadOnly = true; this.linked.ReadOnly = true;
this.QBName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; this.linked.Resizable = System.Windows.Forms.DataGridViewTriState.True;
// //
// qbid // id
// //
this.qbid.DataPropertyName = "qbid"; this.id.DataPropertyName = "id";
this.qbid.HeaderText = "qbid"; this.id.HeaderText = "id";
this.qbid.Name = "qbid"; this.id.Name = "id";
this.qbid.ReadOnly = true; this.id.ReadOnly = true;
this.qbid.Visible = false; this.id.Visible = false;
//
// ayaid
//
this.ayaid.DataPropertyName = "ayaid";
this.ayaid.HeaderText = "ayaid";
this.ayaid.Name = "ayaid";
this.ayaid.ReadOnly = true;
this.ayaid.Visible = false;
// //
// Map // Map
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450); this.ClientSize = new System.Drawing.Size(783, 557);
this.Controls.Add(this.grid); this.Controls.Add(this.splitContainer1);
this.Controls.Add(this.menuStrip1); this.Controls.Add(this.menuStrip1);
this.MainMenuStrip = this.menuStrip1; this.MainMenuStrip = this.menuStrip1;
this.Name = "Map"; this.Name = "Map";
@@ -247,7 +348,12 @@
this.Load += new System.EventHandler(this.Map_Load); this.Load += new System.EventHandler(this.Map_Load);
this.menuStrip1.ResumeLayout(false); this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout(); this.menuStrip1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.grid)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.gridAya)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.gridQB)).EndInit();
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
@@ -268,11 +374,17 @@
private System.Windows.Forms.ToolStripMenuItem unlinkedItemsOnlyToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem unlinkedItemsOnlyToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem autoLinkToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem autoLinkToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem updateAyaNovaPricesToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem updateAyaNovaPricesToolStripMenuItem;
private System.Windows.Forms.DataGridView grid; private System.Windows.Forms.DataGridView gridAya;
private System.Windows.Forms.ToolStripMenuItem mapSelectedItemsToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem mapSelectedItemsToolStripMenuItem;
private System.Windows.Forms.DataGridView gridQB;
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.DataGridViewTextBoxColumn AyaName; private System.Windows.Forms.DataGridViewTextBoxColumn AyaName;
private System.Windows.Forms.DataGridViewTextBoxColumn QBName; private System.Windows.Forms.DataGridViewCheckBoxColumn linked;
private System.Windows.Forms.DataGridViewTextBoxColumn qbid; private System.Windows.Forms.DataGridViewTextBoxColumn id;
private System.Windows.Forms.DataGridViewTextBoxColumn ayaid; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;
private System.Windows.Forms.DataGridViewCheckBoxColumn dataGridViewTextBoxColumn2;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn3;
} }
} }

View File

@@ -34,25 +34,28 @@ namespace AyaNovaQBI
this.Icon = AyaNovaQBI.Properties.Resources.logo; this.Icon = AyaNovaQBI.Properties.Resources.logo;
_aya = new DataTable("AyaNova"); _aya = new DataTable("AyaNova");
_aya.Columns.Add("ayaid", typeof(long)); _aya.Columns.Add("name", typeof(string));
_aya.Columns.Add("qbid", typeof(string)); _aya.Columns.Add("linked", typeof(bool));
_aya.Columns.Add("AyaName", typeof(string)); _aya.Columns.Add("id", typeof(long));
_aya.Columns.Add("QBName", typeof(string));
//Case 339 //Case 339
_aya.DefaultView.Sort = "AyaName asc"; _aya.DefaultView.Sort = "name asc";
gridAya.DataSource = _aya;
_qb = new DataTable("QuickBooks"); _qb = new DataTable("QuickBooks");
_qb.Columns.Add("ID", typeof(string)); _qb.Columns.Add("name", typeof(string));
_qb.Columns.Add("FullName", typeof(string)); _qb.Columns.Add("linked", typeof(bool));
_qb.Columns.Add("id", typeof(string));
//Case 339 //Case 339
_qb.DefaultView.Sort = "FullName asc"; _qb.DefaultView.Sort = "name asc";
grid.DataSource = _aya; gridQB.DataSource = _qb;
} }
private void Map_Load(object sender, EventArgs e) private void Map_Load(object sender, EventArgs e)
{ {
Initialize(); Initialize();
grid.ClearSelection(); gridAya.ClearSelection();
} }
/// <summary> /// <summary>
@@ -123,7 +126,7 @@ namespace AyaNovaQBI
{ {
//bool bLinked = util.QBIntegration.Items.Any(z => z.AType == _Type && z.IntegrationItemId == dr["ID"].ToString()); //bool bLinked = util.QBIntegration.Items.Any(z => z.AType == _Type && z.IntegrationItemId == dr["ID"].ToString());
//if (DisplayRow(bLinked)) //if (DisplayRow(bLinked))
_qb.Rows.Add(new object[] { dr["ID"].ToString(), dr["FullName"].ToString() }); _qb.Rows.Add(new object[] { dr["ID"].ToString(), dr["FullName"].ToString() });
} }
#endregion client #endregion client
break; break;
@@ -150,7 +153,7 @@ namespace AyaNovaQBI
{ {
//bool bLinked = util.QBIntegration.Items.Any(z => z.AType == _Type && z.IntegrationItemId == dr["ID"].ToString()); //bool bLinked = util.QBIntegration.Items.Any(z => z.AType == _Type && z.IntegrationItemId == dr["ID"].ToString());
//if (DisplayRow(bLinked)) //if (DisplayRow(bLinked))
_qb.Rows.Add(new object[] { dr["ID"].ToString(), dr["FullName"].ToString() }); _qb.Rows.Add(new object[] { dr["ID"].ToString(), dr["FullName"].ToString() });
} }
#endregion Vendor #endregion Vendor
break; break;
@@ -191,7 +194,7 @@ namespace AyaNovaQBI
{ {
//bool bLinked = util.QBIntegration.Items.Any(z => z.AType == _Type && z.IntegrationItemId == dr["ID"].ToString()); //bool bLinked = util.QBIntegration.Items.Any(z => z.AType == _Type && z.IntegrationItemId == dr["ID"].ToString());
//if (DisplayRow(bLinked)) //if (DisplayRow(bLinked))
_qb.Rows.Add(new object[] { dr["ID"].ToString(), dr["FullName"].ToString() }); _qb.Rows.Add(new object[] { dr["ID"].ToString(), dr["FullName"].ToString() });
} }
} }
#endregion Rate #endregion Rate
@@ -234,7 +237,7 @@ namespace AyaNovaQBI
{ {
//bool bLinked = util.QBIntegration.Items.Any(z => z.AType == _Type && z.IntegrationItemId == dr["ID"].ToString()); //bool bLinked = util.QBIntegration.Items.Any(z => z.AType == _Type && z.IntegrationItemId == dr["ID"].ToString());
//if (DisplayRow(bLinked)) //if (DisplayRow(bLinked))
_qb.Rows.Add(new object[] { dr["ID"].ToString(), dr["FullName"].ToString() }); _qb.Rows.Add(new object[] { dr["ID"].ToString(), dr["FullName"].ToString() });
} }
} }
#endregion Rate #endregion Rate
@@ -270,7 +273,7 @@ namespace AyaNovaQBI
{ {
//bool bLinked = util.QBIntegration.Items.Any(z => z.AType == _Type && z.IntegrationItemId == dr["ID"].ToString()); //bool bLinked = util.QBIntegration.Items.Any(z => z.AType == _Type && z.IntegrationItemId == dr["ID"].ToString());
//if (DisplayRow(bLinked)) //if (DisplayRow(bLinked))
_qb.Rows.Add(new object[] { dr["ID"].ToString(), dr["FullName"].ToString() }); _qb.Rows.Add(new object[] { dr["ID"].ToString(), dr["FullName"].ToString() });
} }
} }
#endregion Part #endregion Part
@@ -308,30 +311,30 @@ namespace AyaNovaQBI
private void mapSelectedItemsToolStripMenuItem_Click(object sender, EventArgs e) private void mapSelectedItemsToolStripMenuItem_Click(object sender, EventArgs e)
{ {
if(grid.SelectedRows.Count==0) return; if (gridAya.SelectedRows.Count == 0) return;
//we have selection now get qb item //we have selection now get qb item
MapSelectQBItem s = new MapSelectQBItem(); MapSelectQBItem s = new MapSelectQBItem();
s.QBItems = _qb; s.QBItems = _qb;
string SelectedQBItem = string.Empty; string SelectedQBItem = string.Empty;
if (s.ShowDialog() == DialogResult.Cancel) if (s.ShowDialog() == DialogResult.Cancel)
return ; return;
else else
SelectedQBItem = s.SelectedQBItem; SelectedQBItem = s.SelectedQBItem;
s.Dispose(); s.Dispose();
var selectedAyaNovaIndexes = new List<long>(); var selectedAyaNovaIndexes = new List<long>();
foreach(DataGridViewRow r in grid.SelectedRows) foreach (DataGridViewRow r in gridAya.SelectedRows)
{ {
selectedAyaNovaIndexes.Add((long)r.Cells[0].Value); selectedAyaNovaIndexes.Add((long)r.Cells[0].Value);
} }
//todo: here we need to update the linking (and save right away or wait??) //todo: here we need to update the linking (and save right away or wait??)
var v = SelectedQBItem; var v = SelectedQBItem;
} }
private void customersToolStripMenuItem_Click(object sender, EventArgs e) private void customersToolStripMenuItem_Click(object sender, EventArgs e)
{ {
@@ -360,7 +363,7 @@ namespace AyaNovaQBI
private void grid_SelectionChanged(object sender, EventArgs e) private void grid_SelectionChanged(object sender, EventArgs e)
{ {
var hasSelection = grid.SelectedRows.Count > 0; var hasSelection = gridAya.SelectedRows.Count > 0;
mapSelectedItemsToolStripMenuItem.Visible = hasSelection; mapSelectedItemsToolStripMenuItem.Visible = hasSelection;
} }

View File

@@ -123,13 +123,19 @@
<metadata name="AyaName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="AyaName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="QBName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="linked.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="qbid.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="ayaid.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="dataGridViewTextBoxColumn1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
</root> </root>