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

📄 checkticketdetail.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>
	/// CheckTicketDetail 的摘要说明。
	/// </summary>
	public class CheckTicketDetail : BasePage
	{
		protected System.Web.UI.WebControls.Label lblCompanyName;
		protected System.Web.UI.WebControls.Label Label1;
		protected System.Web.UI.WebControls.Label lblLine;
		protected System.Web.UI.WebControls.Label Label2;
		protected System.Web.UI.WebControls.Label Label3;
		protected System.Web.UI.WebControls.Label Label4;
		protected System.Web.UI.WebControls.Label Label5;
		protected System.Web.UI.WebControls.Label Label6;
		protected System.Web.UI.WebControls.Label Label7;
		protected System.Web.UI.WebControls.Label Label8;
		protected System.Web.UI.WebControls.Label Label9;
		protected System.Web.UI.WebControls.Label Label10;
		protected System.Web.UI.WebControls.Label Label11;
		protected System.Web.UI.WebControls.Label Label12;
		protected System.Web.UI.WebControls.Label lblName;
		protected System.Web.UI.WebControls.Label lblQuantity;
		protected System.Web.UI.WebControls.Label lblPeriod;
		protected System.Web.UI.WebControls.Label lblInstruction;
		protected System.Web.UI.WebControls.Label lblOrderHead;
		protected System.Web.UI.WebControls.Label lblCheckDate1;
		protected System.Web.UI.WebControls.Label lblCheckDate2;
		protected System.Web.UI.WebControls.Label lblCheckDate3;
		protected System.Web.UI.WebControls.Label lblCheckOperater1;
		protected System.Web.UI.WebControls.Label lblCheckOperater3;
		protected System.Web.UI.WebControls.Label lblCheckOperater2;
		protected System.Web.UI.WebControls.Label lblUntiBox;
		protected System.Web.UI.WebControls.Label lblOther;
		protected System.Web.UI.WebControls.Label lblBoxs;
		protected System.Web.UI.WebControls.Label lblMonth;
		protected System.Web.UI.WebControls.Label lblYear;
		protected System.Web.UI.WebControls.Label lblDay;
		protected System.Web.UI.WebControls.Label lblHour;
		protected System.Web.UI.WebControls.Label Label13;
		protected System.Web.UI.WebControls.Label lblCode;
		protected System.Web.UI.WebControls.CheckBox chkTodayY;
		protected System.Web.UI.WebControls.CheckBox chkTodayN;
		protected System.Web.UI.WebControls.CheckBox chkValue1Y;
		protected System.Web.UI.WebControls.CheckBox chkValue1N;
		protected System.Web.UI.WebControls.CheckBox chkValue2Y;
		protected System.Web.UI.WebControls.CheckBox chkValue2N;
		protected System.Web.UI.WebControls.CheckBox chkValue3Y;
		protected System.Web.UI.WebControls.CheckBox chkValue3N;
		protected System.Web.UI.WebControls.Label Label14;
		protected System.Web.UI.WebControls.Label lblRemark;
		protected System.Web.UI.WebControls.Label Label15;
		protected System.Web.UI.WebControls.Label lblFlag;
		protected System.Web.UI.WebControls.Label Label16;
		protected System.Web.UI.WebControls.Label lblInsertOperater;
		protected System.Web.UI.WebControls.Label Label18;
		protected System.Web.UI.WebControls.Label lblInsertDate;
		protected System.Web.UI.WebControls.Label lblTitle;
	
		private void Page_Load(object sender, System.EventArgs e)
		{
			// 在此处放置用户代码以初始化页面
			Principal p=this.CurrentUser();
			this.CheckPermissionPage(p.Id,"","604");
			if(!Page.IsPostBack)
			{
				this.BindGrid();
			}
		}

		private void BindGrid()
		{
			string id="";
			if(Request.QueryString["Id"]!=null)
				id=Request.QueryString["Id"].ToString();

			if(id!="")
			{
				CheckTicket ct=new CheckTicket();
				ct.Id=id;
				ct.Retrieve();
				if(ct.IsPersistent)
				{
					Config c=ConfigSystem.GetConfig();
					if(c!=null)
						this.lblCompanyName.Text = c.CompanyName;

					this.lblCode.Text = ct.Code;
					this.lblFlag.Text = ProductSystem.GetCheckTicketFlagName(ct.Flag);
					this.lblLine.Text = LineSystem.GetLineCode(ct.LineId);
					this.lblName.Text = BOMSystem.getBOMName(ct.BOMCode);
					this.lblQuantity.Text = ct.Quantity.ToString();
					this.lblPeriod.Text = ct.Period;
					this.lblInstruction.Text = InstructionSystem.GetStructionCode(ct.InstructionId);
					this.lblOrderHead.Text = OrderTicketSystem.GetOrderCode(ct.OrderHeadId);
					this.lblRemark.Text = Common.GetHtmlCode(ct.Remark);
					this.lblInsertDate.Text = ct.InsertDate.ToString();
					this.lblInsertOperater.Text = ct.InsertOperater;
					if(ct.BoxUnit.ToString()!="")
                        this.lblUntiBox.Text = ct.BoxUnit.ToString();
					else
						this.lblUntiBox.Text ="0";
					if(ct.Boxs.ToString()!="")
						this.lblBoxs.Text = ct.Boxs.ToString();
					else
						this.lblBoxs.Text ="0";
					if(ct.Other.ToString()!="")
						this.lblOther.Text = ct.Other.ToString();
					else
						this.lblOther.Text ="0";

					if(ct.TodayOut=="Y")
					{
						this.chkTodayY.Checked=true;
						this.chkTodayN.Checked=false;
					}
					else
					{
						this.chkTodayY.Checked=false;
						this.chkTodayN.Checked=true;
					}

					if(ct.Flag=="C")
					{
						this.lblYear.Text = ct.InDate.Year.ToString();
						this.lblMonth.Text =ct.InDate.Month.ToString();
						this.lblDay.Text = ct.InDate.Day.ToString();
						this.lblHour.Text =ct.InDate.Hour.ToString();
					}

					if(ct.CheckValue1!=null && ct.CheckValue1!="")
					{
						this.lblCheckDate1.Text = ct.CheckDate1.ToShortDateString();
						if(ct.CheckValue1=="Y")
						{
							this.chkValue1Y.Checked=true;
							this.chkValue1N.Checked=false;
						}
						else
						{
							this.chkValue1Y.Checked=false;
							this.chkValue1N.Checked=true;
						}
						this.lblCheckOperater1.Text = ct.CheckOperater1;
					}

					if(ct.CheckValue2!=null && ct.CheckValue2!="")
					{
						this.lblCheckDate2.Text = ct.CheckDate2.ToShortDateString();
						if(ct.CheckValue2=="Y")
						{
							this.chkValue2Y.Checked=true;
							this.chkValue2N.Checked=false;
						}
						else
						{
							this.chkValue2Y.Checked=false;
							this.chkValue2N.Checked=true;
						}
						this.lblCheckOperater2.Text = ct.CheckOperater2;
					}

					if(ct.CheckValue3!=null && ct.CheckValue3!="")
					{
						this.lblCheckDate3.Text = ct.CheckDate3.ToShortDateString();
						if(ct.CheckValue3=="Y")
						{
							this.chkValue3Y.Checked=true;
							this.chkValue3N.Checked=false;
						}
						else
						{
							this.chkValue3Y.Checked=false;
							this.chkValue3N.Checked=true;
						}
						this.lblCheckOperater3.Text = ct.CheckOperater3;
					}
				
				}
			}
		
		}

		#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.Load += new System.EventHandler(this.Page_Load);

		}
		#endregion
	}
}

⌨️ 快捷键说明

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