47 lines
1.4 KiB
C#
47 lines
1.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
|
|
namespace AyaNovaQBI
|
|
{
|
|
public partial class SetQBImportServiceRateAccounts : Form
|
|
{
|
|
public SetQBImportServiceRateAccounts()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void SetQBImportServiceRateAccounts_Load(object sender, EventArgs e)
|
|
{
|
|
btnCancel.Text = util.AyaTranslations["Cancel"];
|
|
btnOK.Text = util.AyaTranslations["OK"];
|
|
|
|
cbIncomeAccount.DisplayMember = "FullName";
|
|
cbIncomeAccount.ValueMember = "ID";
|
|
cbIncomeAccount.DataSource = util.QBAccounts;
|
|
if (!string.IsNullOrEmpty(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();
|
|
}
|
|
}
|
|
}
|