This commit is contained in:
@@ -87,6 +87,7 @@
|
|||||||
this.btnOK.TabIndex = 23;
|
this.btnOK.TabIndex = 23;
|
||||||
this.btnOK.Text = "OK";
|
this.btnOK.Text = "OK";
|
||||||
this.btnOK.UseVisualStyleBackColor = true;
|
this.btnOK.UseVisualStyleBackColor = true;
|
||||||
|
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
|
||||||
//
|
//
|
||||||
// btnCancel
|
// btnCancel
|
||||||
//
|
//
|
||||||
@@ -99,6 +100,7 @@
|
|||||||
this.btnCancel.TabIndex = 22;
|
this.btnCancel.TabIndex = 22;
|
||||||
this.btnCancel.Text = "Cancel";
|
this.btnCancel.Text = "Cancel";
|
||||||
this.btnCancel.UseVisualStyleBackColor = true;
|
this.btnCancel.UseVisualStyleBackColor = true;
|
||||||
|
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
|
||||||
//
|
//
|
||||||
// cbCogs
|
// cbCogs
|
||||||
//
|
//
|
||||||
@@ -154,8 +156,10 @@
|
|||||||
//
|
//
|
||||||
// SetQBImportInventoryAccounts
|
// SetQBImportInventoryAccounts
|
||||||
//
|
//
|
||||||
|
this.AcceptButton = this.btnOK;
|
||||||
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.CancelButton = this.btnCancel;
|
||||||
this.ClientSize = new System.Drawing.Size(435, 445);
|
this.ClientSize = new System.Drawing.Size(435, 445);
|
||||||
this.ControlBox = false;
|
this.ControlBox = false;
|
||||||
this.Controls.Add(this.cbAsset);
|
this.Controls.Add(this.cbAsset);
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ namespace AyaNovaQBI
|
|||||||
|
|
||||||
private void SetQBImportInventoryAccounts_Load(object sender, EventArgs e)
|
private void SetQBImportInventoryAccounts_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
btnCancel.Text = util.AyaTranslations["Cancel"];
|
||||||
|
btnOK.Text = util.AyaTranslations["OK"];
|
||||||
//Fill combo's and select defaults
|
//Fill combo's and select defaults
|
||||||
cbAsset.BindingContext = new BindingContext();//Ensure unique binding context so multiple combo boxes bound to same datasource can be selected independantly
|
cbAsset.BindingContext = new BindingContext();//Ensure unique binding context so multiple combo boxes bound to same datasource can be selected independantly
|
||||||
cbAsset.DisplayMember = "FullName";
|
cbAsset.DisplayMember = "FullName";
|
||||||
@@ -41,5 +43,21 @@ namespace AyaNovaQBI
|
|||||||
if (!string.IsNullOrEmpty(util.QDat.QBInventoryIncomeAccountReference))
|
if (!string.IsNullOrEmpty(util.QDat.QBInventoryIncomeAccountReference))
|
||||||
cbIncome.SelectedValue = util.QDat.QBInventoryIncomeAccountReference;
|
cbIncome.SelectedValue = util.QDat.QBInventoryIncomeAccountReference;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async void btnOK_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
util.QDat.QBInventoryAssetAccountRef = cbAsset.SelectedValue.ToString();
|
||||||
|
util.QDat.QBInventoryCOGSAccountRef = cbCogs.SelectedValue.ToString();
|
||||||
|
util.QDat.QBInventoryIncomeAccountReference = cbIncome.SelectedValue.ToString();
|
||||||
|
await util.SaveIntegrationObject();
|
||||||
|
DialogResult = DialogResult.OK;
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnCancel_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
DialogResult = DialogResult.Cancel;
|
||||||
|
Close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,6 +44,7 @@
|
|||||||
this.btnOK.TabIndex = 16;
|
this.btnOK.TabIndex = 16;
|
||||||
this.btnOK.Text = "OK";
|
this.btnOK.Text = "OK";
|
||||||
this.btnOK.UseVisualStyleBackColor = true;
|
this.btnOK.UseVisualStyleBackColor = true;
|
||||||
|
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
|
||||||
//
|
//
|
||||||
// btnCancel
|
// btnCancel
|
||||||
//
|
//
|
||||||
@@ -54,6 +55,7 @@
|
|||||||
this.btnCancel.TabIndex = 15;
|
this.btnCancel.TabIndex = 15;
|
||||||
this.btnCancel.Text = "Cancel";
|
this.btnCancel.Text = "Cancel";
|
||||||
this.btnCancel.UseVisualStyleBackColor = true;
|
this.btnCancel.UseVisualStyleBackColor = true;
|
||||||
|
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
|
||||||
//
|
//
|
||||||
// label1
|
// label1
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -28,5 +28,19 @@ namespace AyaNovaQBI
|
|||||||
if (!string.IsNullOrEmpty(util.QDat.QBServiceIncomeAccountRef))
|
if (!string.IsNullOrEmpty(util.QDat.QBServiceIncomeAccountRef))
|
||||||
cbIncomeAccount.SelectedValue = util.QDat.QBServiceIncomeAccountRef;
|
cbIncomeAccount.SelectedValue = util.QDat.QBServiceIncomeAccountRef;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void btnCancel_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
DialogResult = DialogResult.Cancel;
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void btnOK_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
util.QDat.QBServiceIncomeAccountRef = cbIncomeAccount.SelectedValue.ToString();
|
||||||
|
await util.SaveIntegrationObject();
|
||||||
|
DialogResult = DialogResult.OK;
|
||||||
|
Close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user