using System;
using System.Data;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;

namespace JXC_MIS.UserTier.bps
{
	public class frmbps_Plan : JXC_MIS.UserTier.BaseForm.frmReceiptBase
	{
		#region 设计器生成的代码
		private System.ComponentModel.IContainer components = null;

		public frmbps_Plan()
		{
			// 该调用是 Windows 窗体设计器所必需的。
			InitializeComponent();

			// TODO: 在 InitializeComponent 调用后添加任何初始化
		}

		/// <summary>
		/// 清理所有正在使用的资源。
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if (components != null) 
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		/// <summary>
		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
		/// 此方法的内容。
		/// </summary>
		private void InitializeComponent()
		{
			// 
			// btnDown
			// 
			this.btnDown.Name = "btnDown";
			// 
			// TxtTemp
			// 
			this.TxtTemp.Name = "TxtTemp";
			// 
			// grd_Top
			// 
			this.grd_Top.Name = "grd_Top";
			// 
			// grd_Header
			// 
			this.grd_Header.Name = "grd_Header";
			// 
			// grd_Footer
			// 
			this.grd_Footer.Name = "grd_Footer";
			// 
			// grd_Bottom
			// 
			this.grd_Bottom.Name = "grd_Bottom";
			// 
			// grd_Detail
			// 
			this.grd_Detail.Name = "grd_Detail";
			// 
			// grd_Other
			// 
			this.grd_Other.Name = "grd_Other";
			// 
			// sbr_statusBar
			// 
			this.sbr_statusBar.Name = "sbr_statusBar";
			// 
			// tbr_Toolbar
			// 
			this.tbr_Toolbar.Name = "tbr_Toolbar";
			this.tbr_Toolbar.Size = new System.Drawing.Size(712, 42);
			// 
			// CboReceiptNo
			// 
			this.CboReceiptNo.Name = "CboReceiptNo";
			// 
			// cbo_Year
			// 
			this.cbo_Year.Name = "cbo_Year";
			// 
			// cbo_Month
			// 
			this.cbo_Month.Name = "cbo_Month";
			// 
			// frmbps_Plan
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.ClientSize = new System.Drawing.Size(712, 361);
			this.Name = "frmbps_Plan";
			this.Load += new System.EventHandler(this.frmbps_Plan_Load);

		}
		#endregion


		private void frmbps_Plan_Load(object sender, System.EventArgs e)
		{		
			this.ReceiptName="采购计划";
			this.InitInterface();		
			this.IRefertoForm = new JXC_MIS.UserTier.RefertoInput.frmGridRefertoSelect();
	
		}

//		//重写明细表中产品参照
//		protected override void btnDown_Click(object sender, EventArgs e)
//		{
//
//			string strRefertoInputColsList = "1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32";	//参照输入列列表，要与返回列对应
//			string strRefertoReturnColsList = "1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32";	//参照返回列列表
//
//			string[] arrRefertoInputCol = strRefertoInputColsList.Split('|');	//要输入取值的列数组，要与返回列对应
//			string[] strRefertoReturnCol = strRefertoReturnColsList.Split('|');	//参照窗口网格中要返回给原网格取值对应列的列数组
//
//
//
//			if (this.grd_Detail.Col <= 5)
//			{
//				JXC_MIS.UserTier.RefertoInput.frmGridRefertoSelect refertoInput = new JXC_MIS.UserTier.RefertoInput.frmGridRefertoSelect();
//				refertoInput.SetDataSource("up_bps_PlanSelectApplication",CommandType.StoredProcedure);
//				//refertoInput.SetDataSource("Select '选择' As No,fstrDepartmentCode As 代码,fstrDepartmentName As 部门,fstrTelNo As 电话 From I_Department",CommandType.Text);
////				refertoInput.DataSourceKey = "产品库ID";
//				refertoInput.ShowDialog(this.Parent);
//				
//
//				System.Data.DataTable dtRefertoReturn = new System.Data.DataTable();
//				dtRefertoReturn = refertoInput.GetReturnDataTable();
//
//				int rs = dtRefertoReturn.Rows.Count;
//				int row = this.grd_Detail.Row;
//
//				this.grd_Detail.RowInsert("",this.grd_Detail.Row,rs);
//			
//				for (int r=0;r<rs;r++)
//				{
//					if (dtRefertoReturn.Rows[r][1]!=null)
//					{
//						//循环将参照列的数据赋给源对应的网格列
//						for(int i = 0 ; i < arrRefertoInputCol.Length ; i++)
//						{
//							this.grd_Detail.SetCellText(row+r,int.Parse(arrRefertoInputCol[i]),dtRefertoReturn.Rows[r][int.Parse(strRefertoReturnCol[i])].ToString());
//						}
//					}
//				}
//
//				//添加行序列号
//				rs=this.grd_Detail.Rows;
//
//				for (int r=1;r<rs;r++)
//				{
//					this.grd_Detail.SetCellText(r,0,r.ToString());
//				}
//
//			}
//			else
//			{
//				base.btnDown_Click (sender, e);
//			}
//		}


	
	}//End Class
}//End NameSpace

