Files
2018-06-29 19:47:36 +00:00

136 lines
3.7 KiB
C#

using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using System.Data;
namespace AyaNova.PlugIn.QBOI
{
public class SetQBClass : SetBase
{
private Infragistics.Win.Misc.UltraLabel lblItems;
private Infragistics.Win.UltraWinEditors.UltraComboEditor cbQBItems;
private System.ComponentModel.IContainer components = null;
public SetQBClass()
{
// This call is required by the Windows Form Designer.
InitializeComponent();
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.lblItems = new Infragistics.Win.Misc.UltraLabel();
this.cbQBItems = new Infragistics.Win.UltraWinEditors.UltraComboEditor();
((System.ComponentModel.ISupportInitialize)(this.cbQBItems)).BeginInit();
this.SuspendLayout();
//
// lblItems
//
this.lblItems.Location = new System.Drawing.Point(13, 299);
this.lblItems.Name = "lblItems";
this.lblItems.Size = new System.Drawing.Size(613, 18);
this.lblItems.TabIndex = 34;
this.lblItems.Text = "QuickBooks transaction class:";
//
// cbQBItems
//
this.cbQBItems.DropDownStyle = Infragistics.Win.DropDownStyle.DropDownList;
this.cbQBItems.LimitToList = true;
this.cbQBItems.Location = new System.Drawing.Point(13, 317);
this.cbQBItems.MaxDropDownItems = 16;
this.cbQBItems.Name = "cbQBItems";
this.cbQBItems.Nullable = false;
this.cbQBItems.Size = new System.Drawing.Size(613, 24);
this.cbQBItems.TabIndex = 33;
//
// SetQBClass
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 15);
this.ClientSize = new System.Drawing.Size(637, 408);
this.Controls.Add(this.lblItems);
this.Controls.Add(this.cbQBItems);
this.Name = "SetQBClass";
this.ShowInTaskbar = true;
this.Text = "";
this.Load += new System.EventHandler(this.SetQBClass_Load);
this.Controls.SetChildIndex(this.cbQBItems, 0);
this.Controls.SetChildIndex(this.lblItems, 0);
((System.ComponentModel.ISupportInitialize)(this.cbQBItems)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private DataTable _QBClasses;
private void SetQBClass_Load(object sender, System.EventArgs e)
{
cbQBItems.ValueMember="ID";
cbQBItems.DisplayMember="FullName";
this.cbQBItems.DataSource=_QBClasses;
//Case 237
//cbQBItems.SortStyle=Infragistics.Win.ValueListSortStyle.Ascending;
cbQBItems.SelectedIndex=0;
}
public DataTable QBClasses
{
set
{
_QBClasses=value;
}
}
public string SelectedQBClass
{
get
{
return cbQBItems.SelectedItem.DataValue.ToString();
}
set
{
cbQBItems.Value=value;
}
}
public override void btnOK_Click(object sender, EventArgs e)
{
base.ClosingHandled=true;
this.DialogResult=DialogResult.OK;
this.Close();
}
//---------------
}
}