This commit is contained in:
169
source/WinFormApp/PurchaseOrderReceiptSelectVendor.cs
Normal file
169
source/WinFormApp/PurchaseOrderReceiptSelectVendor.cs
Normal file
@@ -0,0 +1,169 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
using GZTW.AyaNova.BLL;
|
||||
using log4net;
|
||||
namespace AyaNova
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for PurchaseOrderReceiptSelectVendor.
|
||||
/// </summary>
|
||||
public class PurchaseOrderReceiptSelectVendor : System.Windows.Forms.Form
|
||||
{
|
||||
// Create a logger for use in this class
|
||||
//case 1039 private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private Infragistics.Win.Misc.UltraButton btnCancel;
|
||||
private Infragistics.Win.Misc.UltraButton btnOK;
|
||||
private Infragistics.Win.UltraWinEditors.UltraComboEditor cbVendors;
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.Container components = null;
|
||||
|
||||
public PurchaseOrderReceiptSelectVendor()
|
||||
{
|
||||
//
|
||||
// Required for Windows Form Designer support
|
||||
//
|
||||
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 Windows Form 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.btnCancel = new Infragistics.Win.Misc.UltraButton();
|
||||
this.btnOK = new Infragistics.Win.Misc.UltraButton();
|
||||
this.cbVendors = new Infragistics.Win.UltraWinEditors.UltraComboEditor();
|
||||
((System.ComponentModel.ISupportInitialize)(this.cbVendors)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// btnCancel
|
||||
//
|
||||
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.btnCancel.Location = new System.Drawing.Point(10, 55);
|
||||
this.btnCancel.Name = "btnCancel";
|
||||
this.btnCancel.Size = new System.Drawing.Size(124, 28);
|
||||
this.btnCancel.TabIndex = 50;
|
||||
this.btnCancel.Tag = "";
|
||||
this.btnCancel.Text = "LT:UI.Command.Cancel";
|
||||
//
|
||||
// btnOK
|
||||
//
|
||||
this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.btnOK.Location = new System.Drawing.Point(249, 55);
|
||||
this.btnOK.Name = "btnOK";
|
||||
this.btnOK.Size = new System.Drawing.Size(125, 28);
|
||||
this.btnOK.TabIndex = 49;
|
||||
this.btnOK.Tag = "";
|
||||
this.btnOK.Text = "LT:UI.Command.OK";
|
||||
//
|
||||
// cbVendors
|
||||
//
|
||||
this.cbVendors.Location = new System.Drawing.Point(10, 9);
|
||||
this.cbVendors.Name = "cbVendors";
|
||||
this.cbVendors.Size = new System.Drawing.Size(364, 24);
|
||||
this.cbVendors.TabIndex = 51;
|
||||
//
|
||||
// PurchaseOrderReceiptSelectVendor
|
||||
//
|
||||
this.AcceptButton = this.btnOK;
|
||||
this.AutoScaleBaseSize = new System.Drawing.Size(6, 15);
|
||||
this.CancelButton = this.btnCancel;
|
||||
this.ClientSize = new System.Drawing.Size(401, 106);
|
||||
this.Controls.Add(this.cbVendors);
|
||||
this.Controls.Add(this.btnCancel);
|
||||
this.Controls.Add(this.btnOK);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Name = "PurchaseOrderReceiptSelectVendor";
|
||||
this.ShowInTaskbar = false;
|
||||
this.Text = "LT:UI.Label.SelectVendor";
|
||||
this.Closing += new System.ComponentModel.CancelEventHandler(this.PurchaseOrderReceiptSelectVendor_Closing);
|
||||
this.Load += new System.EventHandler(this.PurchaseOrderReceiptSelectVendor_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.cbVendors)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
// __ _ _ ___ ____ __ __ __ __ __ ___ ___
|
||||
// / _)( )( )/ __)(_ _)/ \( \/ ) / _)/ \( \( _)
|
||||
// ( (_ )()( \__ \ )( ( () )) ( ( (_( () )) ) )) _)
|
||||
// \__) \__/ (___/ (__) \__/(_/\/\_) \__)\__/(___/(___)
|
||||
//
|
||||
|
||||
/// <summary>
|
||||
/// Load form
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void PurchaseOrderReceiptSelectVendor_Load(object sender, System.EventArgs e)
|
||||
{
|
||||
//case 1039 //log.Debug("PurchaseOrderReceiptSelectVendor_Load");
|
||||
|
||||
|
||||
//fetch all the vendors who have open purchase orders
|
||||
//NVCHANGED
|
||||
VendorsWithReceivablePONVList ls=VendorsWithReceivablePONVList.GetList();
|
||||
|
||||
|
||||
foreach(DictionaryEntry d in ls.BindableList)
|
||||
{
|
||||
cbVendors.Items.Add(new Guid(d.Key.ToString()),d.Value.ToString());
|
||||
}
|
||||
|
||||
Util.Localize(this);
|
||||
|
||||
if(cbVendors.Items.Count>0)
|
||||
cbVendors.SelectedIndex=0;
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void PurchaseOrderReceiptSelectVendor_Closing(object sender, System.ComponentModel.CancelEventArgs e)
|
||||
{
|
||||
//case 1039 //log.Debug("PurchaseOrderReceiptSelectVendor_Closing");
|
||||
|
||||
}
|
||||
|
||||
public Guid SelectedVendor
|
||||
{
|
||||
get
|
||||
{
|
||||
if(cbVendors.Value==null)
|
||||
return Guid.Empty;
|
||||
|
||||
return (Guid)cbVendors.Value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user