📄 instructionlinedetail_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>
/// InstructionLineDetail 的摘要说明。
/// </summary>
public abstract class InstructionLineDetail_C : System.Web.UI.UserControl
{
protected System.Web.UI.WebControls.Label Label1;
protected System.Web.UI.WebControls.Label Label3;
protected System.Web.UI.WebControls.Label Label6;
protected System.Web.UI.WebControls.Label lblCode;
protected System.Web.UI.WebControls.Label lblQuantity;
protected System.Web.UI.WebControls.Label lblUnit;
protected System.Web.UI.WebControls.Label lblPriceAll;
protected System.Web.UI.WebControls.Label Label9;
protected System.Web.UI.WebControls.Label lblCostAll;
protected System.Web.UI.WebControls.Label Label4;
protected System.Web.UI.WebControls.Label Label2;
protected System.Web.UI.WebControls.Label lblOrderHead;
protected System.Web.UI.WebControls.DataGrid grid;
private void Page_Load(object sender, System.EventArgs e)
{
// 在此处放置用户代码以初始化页面
}
public void Bind()
{
string id=this.ViewState["ID"].ToString();
if(id!="")
{
InstructionLine il=new InstructionLine();
il.Id=id;
il.Retrieve();
if(il.IsPersistent)
{
this.lblCode.Text = il.BOMCode;
this.lblQuantity.Text = il.Quantity.ToString();
this.lblUnit.Text = UnitSystem.GetUnitCode(il.UnitId);
this.lblCostAll.Text = il.JGCost.ToString();
this.lblPriceAll.Text = il.JGPrice.ToString();
this.lblOrderHead.Text = OrderTicketSystem.GetOrderCode(il.OrderHeadId);
DataTable dtDet=InstructionSystem.GetAllInstructionLineDet(il.Id);
Common.ReSet(this.grid,dtDet.DefaultView);
this.grid.DataSource=dtDet;
this.grid.DataBind();
// this.lblMaterielCat.Text= MaterielSystem.GetMaterielCatName(m.CatalogId);
// this.lblFlag.Text = m.Flag;
// this.lblUnit.Text = UnitSystem.GetUnitCode(m.Unit);
// this.lblSpec.Text = m.Spec;
// this.lblDes.Text = Common.GetHtmlCode(m.Description);
}
}
}
/// <summary>
/// 产品Id
/// </summary>
public string MId
{
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.grid.ItemDataBound += new System.Web.UI.WebControls.DataGridItemEventHandler(this.grid_ItemDataBound);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
private void grid_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
if(e.Item.ItemType==ListItemType.Item || e.Item.ItemType==ListItemType.AlternatingItem)
{
e.Item.Cells[0].Text = (e.Item.ItemIndex+1).ToString();
e.Item.Cells[1].Text = MaterielSystem.GetMaterielCode(e.Item.Cells[1].Text.Trim());
e.Item.Cells[3].Text = UnitSystem.GetUnitCode(e.Item.Cells[3].Text.Trim());
e.Item.Cells[4].Text = MaterielSystem.GetMaterielCatName(e.Item.Cells[4].Text.Trim());
e.Item.Cells[5].Text = Common.GetLeftString(e.Item.Cells[5].Text.Trim(),20);
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -