Files
ravenqbi/AyaNovaQBI/SetQBChargeAs.cs
2022-07-01 00:31:26 +00:00

83 lines
2.3 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 SetQBChargeAs : Form
{
public SetQBChargeAs()
{
InitializeComponent();
}
public string DialogTitle { get; set; }
public string OptionTitle { get; set; }
public string OptionDescription { get; set; }
public DataTable QBItems { get; set; }
public string SelectedQBItem { get; set; }
private void SetQBChargeAsLoad(object sender, EventArgs e)
{
this.Text = DialogTitle;
this.lblDescription.Text = OptionDescription;
this.lblTitle.Text = OptionTitle;
this.btnCancel.Text = util.AyaTranslations["Cancel"];
this.btnOK.Text = util.AyaTranslations["OK"];
this.cbQBItems.DataSource = QBItems;
this.cbQBItems.DisplayMember = "FullName";
this.cbQBItems.ValueMember = "ID";
if (SelectedQBItem == "")
cbQBItems.SelectedIndex = 0;
else
this.cbQBItems.SelectedValue = SelectedQBItem;
this.lblStatus.Text = "QuickBooks item:";
////NVCHANGED
//GenericNVList ls = GenericNVList.GetList("aWorkorderStatus", "aID", "aName", true, false, false);
//if (_Pre)
// this.cbStatus.SelectedItem = this.cbStatus.Items.Add(Guid.Empty, "< Any status >");
//else
// this.cbStatus.SelectedItem = this.cbStatus.Items.Add(Guid.Empty, "< Do not change status >");
//foreach (DictionaryEntry d in ls.BindableList)
//{
// Guid gItem = new Guid(d.Key.ToString());
// Infragistics.Win.ValueListItem v = this.cbStatus.Items.Add(gItem, d.Value.ToString());
// if (_SelectedStatus == gItem)
// {
// this.cbStatus.SelectedItem = v;
// }
//}
}
private void btnOK_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.OK;
this.Close();
}
}
}