Files
ayanova7/source/Plugins/AyaNova.Plugin.QBI/SetQBImportServiceRateAccounts.cs
2018-06-29 19:47:36 +00:00

49 lines
1.4 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace AyaNova.PlugIn.QBI
{
public partial class SetQBImportServiceRateAccounts : Form
{
public SetQBImportServiceRateAccounts()
{
InitializeComponent();
}
private void SetQBImportServiceRateAccounts_Load(object sender, EventArgs e)
{
this.btnCancel.Image = Util.AyaImage("Cancel24");
this.btnOK.Image = Util.AyaImage("OK24");
this.Icon = Util.AyaIcon("Rates16icon");
//Fill combo's and select defaults
// cbIncomeAccount.BindingContext = new BindingContext();
cbIncomeAccount.DisplayMember = "FullName";
cbIncomeAccount.ValueMember = "ID";
cbIncomeAccount.DataSource = Util.QBAccounts;
if (!string.IsNullOrEmpty(Util.QDat.QBServiceIncomeAccountRef))
cbIncomeAccount.SelectedValue = Util.QDat.QBServiceIncomeAccountRef;
}
private void btnOK_Click(object sender, EventArgs e)
{
Util.QDat.QBServiceIncomeAccountRef = cbIncomeAccount.SelectedValue.ToString();
Util.SaveQBIData();
this.DialogResult = DialogResult.OK;
this.Close();
}
}
}