📄 bom_c.ascx.cs
字号:
namespace Botheighten.Yanghui.Web.Controls
{
using System;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using Botheighten.Yanghui.BusinessFacade;
using Botheighten.Yanghui.Framework;
using Botheighten.Yanghui.BusinessRules;
/// <summary>
/// BOM_C 的摘要说明。
/// </summary>
public abstract class BOM_C : System.Web.UI.UserControl
{
protected System.Web.UI.WebControls.Label Label1;
protected System.Web.UI.WebControls.Label lblCode;
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 lblName;
protected System.Web.UI.WebControls.Label lblCost;
protected System.Web.UI.WebControls.Label lblPrice;
protected System.Web.UI.WebControls.Label lblInsertOperater;
protected System.Web.UI.WebControls.Label lblInsertDate;
protected System.Web.UI.WebControls.Label lblRemark;
protected System.Web.UI.WebControls.Label Label7;
private void Page_Load(object sender, System.EventArgs e)
{
// 在此处放置用户代码以初始化页面
}
public void Bind()
{
string id=this.ViewState["ID"].ToString();
if(id!="")
{
// DataTable dt=BOMSystem.AllBOM(id,"");
// if(dt.Rows.Count>0)
// {
// DataRow dr=dt.Rows[0];
// this.lblCode.Text = dr[BOM.CODE].ToString();
// this.lblName.Text = dr[BOM.NAME].ToString();
// this.lblCost.Text = dr[BOM.JGCOST].ToString();
// this.lblPrice.Text = dr[BOM.JGPRICE].ToString();
// this.lblInsertDate.Text=dr[BOM.INSERTDATE].ToString();
// this.lblInsertOperater.Text =dr[BOM.INSERTOPERATER].ToString();
// this.lblRemark.Text = Common.GetHtmlCode(dr[BOM.REMARK].ToString());
//
// }
BOM b= new BOM();
b.Id=id;
b.Retrieve();
if(b.IsPersistent)
{
this.lblCode.Text = b.Code;
this.lblName.Text = b.Name;
this.lblCost.Text = b.JGCost.ToString();
this.lblPrice.Text = b.JGPrice.ToString();
this.lblInsertDate.Text=b.InsertDate.ToString();
this.lblInsertOperater.Text =b.InsertOperater;
this.lblRemark.Text = Common.GetHtmlCode(b.Remark);
}
}
}
/// <summary>
/// 产品Id
/// </summary>
public string PId
{
set
{
this.ViewState["ID"] = value;
}
get
{
return this.ViewState["ID"].ToString ();
}
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN:该调用是 ASP.NET Web 窗体设计器所必需的。
//
InitializeComponent();
base.OnInit(e);
}
/// 设计器支持所需的方法 - 不要使用
/// 代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -