This commit is contained in:
@@ -19,6 +19,8 @@ namespace AyaNovaQBI
|
||||
|
||||
private void SetQBImportInventoryAccounts_Load(object sender, EventArgs e)
|
||||
{
|
||||
btnCancel.Text = util.AyaTranslations["Cancel"];
|
||||
btnOK.Text = util.AyaTranslations["OK"];
|
||||
//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.DisplayMember = "FullName";
|
||||
@@ -41,5 +43,21 @@ namespace AyaNovaQBI
|
||||
if (!string.IsNullOrEmpty(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user