This commit is contained in:
2022-07-03 20:06:06 +00:00
parent 7c32e9767e
commit a86fb4838b
3 changed files with 25 additions and 14 deletions

View File

@@ -44,6 +44,7 @@
this.btnOK.TabIndex = 16;
this.btnOK.Text = "OK";
this.btnOK.UseVisualStyleBackColor = true;
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// btnCancel
//
@@ -54,13 +55,15 @@
this.btnCancel.TabIndex = 15;
this.btnCancel.Text = "Cancel";
this.btnCancel.UseVisualStyleBackColor = true;
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// edAyaObjects
//
this.edAyaObjects.Enabled = false;
this.edAyaObjects.BackColor = System.Drawing.SystemColors.Window;
this.edAyaObjects.Location = new System.Drawing.Point(12, 33);
this.edAyaObjects.Multiline = true;
this.edAyaObjects.Name = "edAyaObjects";
this.edAyaObjects.ReadOnly = true;
this.edAyaObjects.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.edAyaObjects.Size = new System.Drawing.Size(613, 224);
this.edAyaObjects.TabIndex = 17;
@@ -85,9 +88,10 @@
//
// edQBItem
//
this.edQBItem.Enabled = false;
this.edQBItem.BackColor = System.Drawing.SystemColors.Window;
this.edQBItem.Location = new System.Drawing.Point(12, 303);
this.edQBItem.Name = "edQBItem";
this.edQBItem.ReadOnly = true;
this.edQBItem.Size = new System.Drawing.Size(610, 20);
this.edQBItem.TabIndex = 20;
//

View File

@@ -18,5 +18,18 @@ namespace AyaNovaQBI
btnCancel.Text = util.AyaTranslations["Cancel"];
btnOK.Text = util.AyaTranslations["OK"];
}
private void btnOK_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.OK;
Close();
}
private void btnCancel_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.Cancel;
Close();
}
}
}

View File

@@ -89,30 +89,24 @@ namespace AyaNovaQBI
s.Dispose();
var selectedAyaNovaIds = new List<long>();
StringBuilder selectedAyaNovaNames = new StringBuilder();
foreach (DataGridViewRow r in gridAya.SelectedRows)
{
selectedAyaNovaNames.AppendLine(r.Cells[1].Value.ToString());
selectedAyaNovaNames.AppendLine(r.Cells[0].Value.ToString());
selectedAyaNovaIds.Add((long)r.Cells[1].Value);
}
//todo: here we need to update the linking (and save right away or wait??)
//#################################
//LINKING
LinkAyaObjectToQBConfirm d = new LinkAyaObjectToQBConfirm();
d.QBItem = QBItemName;
d.AyaItems = selectedAyaNovaNames.ToString();
if (d.ShowDialog() != DialogResult.OK) return;
////
//// QBNameID q=(QBNameID)moveData.Rows[0];
//// if(MessageBox.Show(
//// "Link the AyaNova object(s): " + q.Name + "\r\n" +
//// "to the QuickBooks object: " + + "\r\n\r\n" +
//// "Are you sure?","Link QuickBooks object",MessageBoxButtons.YesNo,MessageBoxIcon.Question)
//// ==DialogResult.No) return;
if (d.ShowDialog() != DialogResult.OK)
return;
////ok, link away...
//foreach (object o in moveData.Rows)
//{