⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 instructiondetail.aspx.cs

📁 可供共享学习.net环境下生产管理的实现
💻 CS
字号:
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using Botheighten.Yanghui.BusinessFacade;
using Botheighten.Yanghui.Framework;
using Botheighten.Yanghui.BusinessRules;
using Botheighten.Yanghui.Web.Controls;

namespace Botheighten.Yanghui.Web
{
	/// <summary>
	/// InstructionDetail 的摘要说明。
	/// </summary>
	public class InstructionDetail : BasePage
	{
		protected System.Web.UI.WebControls.Label lblCompanyName;
		protected System.Web.UI.WebControls.Label lblTitle;
		protected System.Web.UI.WebControls.Label Label2;
		protected System.Web.UI.WebControls.Label Label8;
		protected System.Web.UI.WebControls.Label lblFlag;
		protected System.Web.UI.WebControls.Label Label1;
		protected System.Web.UI.WebControls.Label lblDate;
		protected System.Web.UI.WebControls.Label lblOperater;
		protected System.Web.UI.WebControls.Label Label7;
		protected System.Web.UI.WebControls.Label Label17;
		protected System.Web.UI.WebControls.Label Label18;
		protected System.Web.UI.WebControls.Label Label19;
		protected System.Web.UI.WebControls.Label Label9;
		protected System.Web.UI.WebControls.Label lblNetPrice;
		protected System.Web.UI.WebControls.Label Label5;
		protected System.Web.UI.WebControls.DataList DataList1;
		protected System.Web.UI.WebControls.Label lblLine;
		protected System.Web.UI.WebControls.Label lblSerial;
		protected System.Web.UI.WebControls.Label lblFromDate;
		protected System.Web.UI.WebControls.Label lblEndDate;
		protected System.Web.UI.WebControls.Label lblRemark;
	
		private void Page_Load(object sender, System.EventArgs e)
		{
			// 在此处放置用户代码以初始化页面
			Principal p=this.CurrentUser();
			this.CheckPermissionPage(p.Id,"","701");
			
			string id="";
			if(Request.QueryString["Id"]!=null)
				id=Request.QueryString["Id"].ToString();
			
			Instruction ins=new Instruction();
			ins.Id=id;
			ins.Retrieve();
			if(ins.IsPersistent)
			{

//				Config config=ConfigSystem.GetConfig();
//				if(config!=null)
//					this.lblCompanyName.Text = config.CompanyName;
				this.lblCompanyName.Text = Application["CompanyInfo"].ToString();
				//this.grid.PageSize=int.Parse(Application["PageSize"].ToString());

				this.lblLine.Text = LineSystem.GetLineCode(ins.LineId);
				this.lblSerial.Text = ins.SerialNO;

				this.lblDate.Text = ins.InsertDate.ToString();
				this.lblFlag.Text = InstructionSystem.GetFlagName(ins.Flag);
                this.lblOperater.Text = ins.InsertOperater;
				
				this.lblFromDate.Text = ins.FromDate.ToShortDateString();
				this.lblEndDate.Text = ins.EndDate.ToShortDateString();


				this.lblNetPrice.Text = InstructionSystem.GetNetPrice(ins.Id).ToString();
				
				this.lblRemark.Text = Common.GetHtmlCode(ins.Remark);


				DataTable dtLine=InstructionSystem.AllInstructionLine(id);
				this.DataList1.DataSource=dtLine;
				this.DataList1.DataMember=InstructionLine.ID;
				this.DataList1.DataBind();

			}

		}

		#region Web Form Designer generated code
		override protected void OnInit(EventArgs e)
		{
			//
			// CODEGEN:该调用是 ASP.NET Web 窗体设计器所必需的。
			//
			InitializeComponent();
			base.OnInit(e);
		}
		
		/// <summary>
		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
		/// 此方法的内容。
		/// </summary>
		private void InitializeComponent()
		{    
			this.DataList1.ItemDataBound += new System.Web.UI.WebControls.DataListItemEventHandler(this.DataList1_ItemDataBound);
			this.Load += new System.EventHandler(this.Page_Load);

		}
		#endregion

		private void DataList1_ItemDataBound(object sender, System.Web.UI.WebControls.DataListItemEventArgs e)
		{
			if(e.Item.ItemType==ListItemType.AlternatingItem || e.Item.ItemType==ListItemType.Item)
			{
				InstructionLineDetail_C orderDetail=(InstructionLineDetail_C)e.Item.FindControl("InstructionLineDetail_C1");	
				if(orderDetail!=null)
				{
					orderDetail.MId=this.DataList1.DataKeys[e.Item.ItemIndex].ToString();
					orderDetail.Bind();
				}
			}
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -