From 6c331fec74e1c1b89507a7452ea2b391edf5d837 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Sat, 2 Jul 2022 19:35:52 +0000 Subject: [PATCH] --- AyaNovaQBI/Map.Designer.cs | 234 +++++++++++++++++++++++++++---------- AyaNovaQBI/Map.cs | 49 ++++---- AyaNovaQBI/Map.resx | 12 +- 3 files changed, 208 insertions(+), 87 deletions(-) diff --git a/AyaNovaQBI/Map.Designer.cs b/AyaNovaQBI/Map.Designer.cs index daf36b6..0f46f5c 100644 --- a/AyaNovaQBI/Map.Designer.cs +++ b/AyaNovaQBI/Map.Designer.cs @@ -30,6 +30,8 @@ { 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(); @@ -44,13 +46,24 @@ this.autoLinkToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.updateAyaNovaPricesToolStripMenuItem = 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.QBName = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.qbid = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.ayaid = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.linked = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.id = new System.Windows.Forms.DataGridViewTextBoxColumn(); 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(); // // menuStrip1 @@ -63,7 +76,7 @@ this.mapSelectedItemsToolStripMenuItem}); this.menuStrip1.Location = new System.Drawing.Point(0, 0); 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.Text = "menuStrip1"; // @@ -82,35 +95,35 @@ // 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.Click += new System.EventHandler(this.customersToolStripMenuItem_Click); // // 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.Click += new System.EventHandler(this.serviceRatesToolStripMenuItem_Click); // // 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.Click += new System.EventHandler(this.travelRatesToolStripMenuItem_Click); // // 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.Click += new System.EventHandler(this.partsToolStripMenuItem_Click); // // 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.Click += new System.EventHandler(this.vendorsToolStripMenuItem_Click); // @@ -170,14 +183,14 @@ this.mapSelectedItemsToolStripMenuItem.Visible = false; this.mapSelectedItemsToolStripMenuItem.Click += new System.EventHandler(this.mapSelectedItemsToolStripMenuItem_Click); // - // grid + // gridAya // - this.grid.AllowUserToAddRows = false; - this.grid.AllowUserToDeleteRows = false; - this.grid.AllowUserToResizeRows = false; + this.gridAya.AllowUserToAddRows = false; + this.gridAya.AllowUserToDeleteRows = false; + this.gridAya.AllowUserToResizeRows = false; dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke; - this.grid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; - this.grid.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.gridAya.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + this.gridAya.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; 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))); @@ -185,61 +198,149 @@ dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Control; dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.WindowText; dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.grid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; - this.grid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.grid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.gridAya.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; + this.gridAya.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.gridAya.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.AyaName, - this.QBName, - this.qbid, - this.ayaid}); - this.grid.Dock = System.Windows.Forms.DockStyle.Fill; - this.grid.EnableHeadersVisualStyles = false; - this.grid.Location = new System.Drawing.Point(0, 24); - this.grid.Name = "grid"; - this.grid.ReadOnly = true; - this.grid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.grid.Size = new System.Drawing.Size(800, 426); - this.grid.TabIndex = 4; - this.grid.SelectionChanged += new System.EventHandler(this.grid_SelectionChanged); + this.linked, + this.id}); + this.gridAya.Dock = System.Windows.Forms.DockStyle.Fill; + this.gridAya.EnableHeadersVisualStyles = false; + this.gridAya.Location = new System.Drawing.Point(0, 0); + this.gridAya.Name = "gridAya"; + this.gridAya.ReadOnly = true; + this.gridAya.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.gridAya.Size = new System.Drawing.Size(370, 533); + this.gridAya.TabIndex = 4; + this.gridAya.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 // - this.AyaName.DataPropertyName = "AyaName"; - this.AyaName.HeaderText = "AyaNova name"; + this.AyaName.DataPropertyName = "name"; + this.AyaName.HeaderText = "Name"; this.AyaName.Name = "AyaName"; this.AyaName.ReadOnly = true; this.AyaName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; // - // QBName + // linked // - this.QBName.DataPropertyName = "QBname"; - this.QBName.HeaderText = "Linked to QB object"; - this.QBName.Name = "QBName"; - this.QBName.ReadOnly = true; - this.QBName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; + this.linked.DataPropertyName = "linked"; + this.linked.HeaderText = "Linked"; + this.linked.Name = "linked"; + this.linked.ReadOnly = true; + this.linked.Resizable = System.Windows.Forms.DataGridViewTriState.True; // - // qbid + // id // - this.qbid.DataPropertyName = "qbid"; - this.qbid.HeaderText = "qbid"; - this.qbid.Name = "qbid"; - this.qbid.ReadOnly = true; - this.qbid.Visible = false; - // - // ayaid - // - this.ayaid.DataPropertyName = "ayaid"; - this.ayaid.HeaderText = "ayaid"; - this.ayaid.Name = "ayaid"; - this.ayaid.ReadOnly = true; - this.ayaid.Visible = false; + this.id.DataPropertyName = "id"; + this.id.HeaderText = "id"; + this.id.Name = "id"; + this.id.ReadOnly = true; + this.id.Visible = false; // // Map // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(800, 450); - this.Controls.Add(this.grid); + this.ClientSize = new System.Drawing.Size(783, 557); + this.Controls.Add(this.splitContainer1); this.Controls.Add(this.menuStrip1); this.MainMenuStrip = this.menuStrip1; this.Name = "Map"; @@ -247,7 +348,12 @@ this.Load += new System.EventHandler(this.Map_Load); this.menuStrip1.ResumeLayout(false); 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.PerformLayout(); @@ -268,11 +374,17 @@ private System.Windows.Forms.ToolStripMenuItem unlinkedItemsOnlyToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem autoLinkToolStripMenuItem; 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.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 QBName; - private System.Windows.Forms.DataGridViewTextBoxColumn qbid; - private System.Windows.Forms.DataGridViewTextBoxColumn ayaid; + private System.Windows.Forms.DataGridViewCheckBoxColumn 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; } } \ No newline at end of file diff --git a/AyaNovaQBI/Map.cs b/AyaNovaQBI/Map.cs index 724fbbe..c14f7ca 100644 --- a/AyaNovaQBI/Map.cs +++ b/AyaNovaQBI/Map.cs @@ -34,25 +34,28 @@ namespace AyaNovaQBI this.Icon = AyaNovaQBI.Properties.Resources.logo; _aya = new DataTable("AyaNova"); - _aya.Columns.Add("ayaid", typeof(long)); - _aya.Columns.Add("qbid", typeof(string)); - _aya.Columns.Add("AyaName", typeof(string)); - _aya.Columns.Add("QBName", typeof(string)); + _aya.Columns.Add("name", typeof(string)); + _aya.Columns.Add("linked", typeof(bool)); + _aya.Columns.Add("id", typeof(long)); //Case 339 - _aya.DefaultView.Sort = "AyaName asc"; + _aya.DefaultView.Sort = "name asc"; + gridAya.DataSource = _aya; _qb = new DataTable("QuickBooks"); - _qb.Columns.Add("ID", typeof(string)); - _qb.Columns.Add("FullName", typeof(string)); + _qb.Columns.Add("name", typeof(string)); + _qb.Columns.Add("linked", typeof(bool)); + _qb.Columns.Add("id", typeof(string)); + //Case 339 - _qb.DefaultView.Sort = "FullName asc"; - grid.DataSource = _aya; + _qb.DefaultView.Sort = "name asc"; + gridQB.DataSource = _qb; + } private void Map_Load(object sender, EventArgs e) { Initialize(); - grid.ClearSelection(); + gridAya.ClearSelection(); } /// @@ -123,7 +126,7 @@ namespace AyaNovaQBI { //bool bLinked = util.QBIntegration.Items.Any(z => z.AType == _Type && z.IntegrationItemId == dr["ID"].ToString()); //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 break; @@ -150,7 +153,7 @@ namespace AyaNovaQBI { //bool bLinked = util.QBIntegration.Items.Any(z => z.AType == _Type && z.IntegrationItemId == dr["ID"].ToString()); //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 break; @@ -191,7 +194,7 @@ namespace AyaNovaQBI { //bool bLinked = util.QBIntegration.Items.Any(z => z.AType == _Type && z.IntegrationItemId == dr["ID"].ToString()); //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 @@ -234,7 +237,7 @@ namespace AyaNovaQBI { //bool bLinked = util.QBIntegration.Items.Any(z => z.AType == _Type && z.IntegrationItemId == dr["ID"].ToString()); //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 @@ -270,7 +273,7 @@ namespace AyaNovaQBI { //bool bLinked = util.QBIntegration.Items.Any(z => z.AType == _Type && z.IntegrationItemId == dr["ID"].ToString()); //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 @@ -308,30 +311,30 @@ namespace AyaNovaQBI 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 MapSelectQBItem s = new MapSelectQBItem(); - + s.QBItems = _qb; string SelectedQBItem = string.Empty; if (s.ShowDialog() == DialogResult.Cancel) - return ; + return; else - SelectedQBItem = s.SelectedQBItem; + SelectedQBItem = s.SelectedQBItem; s.Dispose(); var selectedAyaNovaIndexes = new List(); - foreach(DataGridViewRow r in grid.SelectedRows) + foreach (DataGridViewRow r in gridAya.SelectedRows) { selectedAyaNovaIndexes.Add((long)r.Cells[0].Value); } //todo: here we need to update the linking (and save right away or wait??) var v = SelectedQBItem; - + } - + private void customersToolStripMenuItem_Click(object sender, EventArgs e) { @@ -360,7 +363,7 @@ namespace AyaNovaQBI private void grid_SelectionChanged(object sender, EventArgs e) { - var hasSelection = grid.SelectedRows.Count > 0; + var hasSelection = gridAya.SelectedRows.Count > 0; mapSelectedItemsToolStripMenuItem.Visible = hasSelection; } diff --git a/AyaNovaQBI/Map.resx b/AyaNovaQBI/Map.resx index 99e0cb7..61c6fc0 100644 --- a/AyaNovaQBI/Map.resx +++ b/AyaNovaQBI/Map.resx @@ -123,13 +123,19 @@ True - + True - + True - + + True + + + True + + True \ No newline at end of file