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

140 lines
3.9 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 SetQBTerms : SetBase
{
private Infragistics.Win.Misc.UltraLabel lblItems;
private Infragistics.Win.UltraWinEditors.UltraComboEditor cbQBItems;
private System.ComponentModel.IContainer components = null;
public SetQBTerms()
{
// 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 Invoice terms default";
//
// 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;
//
// SetQBTerms
//
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 = "SetQBTerms";
this.ShowInTaskbar = true;
this.Text = "";
this.Load += new System.EventHandler(this.SetQBTerms_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 _QBTerms;
private void SetQBTerms_Load(object sender, System.EventArgs e)
{
cbQBItems.ValueMember="ID";
cbQBItems.DisplayMember="FullName";
this.cbQBItems.DataSource=_QBTerms;
//Case 237
//cbQBItems.SortStyle=Infragistics.Win.ValueListSortStyle.Ascending;
if(!string.IsNullOrEmpty(_SelectedTerm))
cbQBItems.Value = _SelectedTerm;
else
cbQBItems.SelectedIndex=0;
}
public DataTable QBTerms
{
set
{
_QBTerms=value;
}
}
string _SelectedTerm = "";
public string SelectedQBTerm
{
get
{
return cbQBItems.SelectedItem.DataValue.ToString();
}
set
{
_SelectedTerm = value;
}
}
public override void btnOK_Click(object sender, EventArgs e)
{
base.ClosingHandled=true;
this.DialogResult=DialogResult.OK;
this.Close();
}
//---------------
}
}