本文整理汇总了C#中Whitfieldcore.GetMaterialForWorkOrder方法的典型用法代码示例。如果您正苦于以下问题:C# Whitfieldcore.GetMaterialForWorkOrder方法的具体用法?C# Whitfieldcore.GetMaterialForWorkOrder怎么用?C# Whitfieldcore.GetMaterialForWorkOrder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Whitfieldcore
的用法示例。
在下文中一共展示了Whitfieldcore.GetMaterialForWorkOrder方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: grdpl1_Itemcommand
public void grdpl1_Itemcommand(Object sender, DataGridCommandEventArgs e)
{
Int32 EstNum = 0;
String work_order_id = "";
DataSet dsExpand = new DataSet();
Whitfieldcore _dbClass = new Whitfieldcore();
switch (e.CommandName)
{
case "Expand":
{
EstNum = Convert.ToInt32(ViewState["EstNum"].ToString());
work_order_id = grdpl1.DataKeys[e.Item.ItemIndex].ToString();
dsExpand = _dbClass.GetMaterialForWorkOrder(EstNum, work_order_id);
PlaceHolder exp = new PlaceHolder();
exp = (System.Web.UI.WebControls.PlaceHolder)e.Item.Cells[13].FindControl("ExpandedContent");
ImageButton img = new ImageButton();
img = (System.Web.UI.WebControls.ImageButton)e.Item.Cells[0].FindControl("btnExpand");
if (dsExpand.Tables[0].Rows.Count > 0)
{
if (img.ImageUrl == "assets/img/Plus.gif")
{
img.ImageUrl = "assets/img/Minus.gif";
exp.Visible = true;
((workorder_materials)(e.Item.FindControl("DynamicTable1"))).Visible = true;
((workorder_materials)(e.Item.FindControl("DynamicTable1"))).EstNum = EstNum;
((workorder_materials)(e.Item.FindControl("DynamicTable1"))).WorkOrderID = work_order_id;
((workorder_materials)(e.Item.FindControl("DynamicTable1"))).FetchSubMaterials(EstNum, work_order_id,dsExpand);
}
else
{
exp.Visible = false;
((workorder_materials)(e.Item.FindControl("DynamicTable1"))).Visible = false;
img.ImageUrl = "assets/img/Plus.gif";
}
}
else
{
if (img.ImageUrl == "assets/img/Plus.gif")
{
img.ImageUrl = "assets/img/Minus.gif";
exp.Visible = true;
((workorder_materials)(e.Item.FindControl("DynamicTable1"))).Visible = true;
((workorder_materials)(e.Item.FindControl("DynamicTable1"))).EstNum = EstNum;
((workorder_materials)(e.Item.FindControl("DynamicTable1"))).WorkOrderID = work_order_id;
((workorder_materials)(e.Item.FindControl("DynamicTable1"))).FetchSubMaterials(EstNum, work_order_id, dsExpand);
}
else
{
exp.Visible = false;
((workorder_materials)(e.Item.FindControl("DynamicTable1"))).Visible = false;
img.ImageUrl = "assets/img/Plus.gif";
}
}
break;
}
default:
{
break;
}
}
}
示例2: DisplayGrid
private void DisplayGrid(Int32 EstNum, String work_order_id)
{
try
{
Whitfieldcore _DbClass = new Whitfieldcore();
DataSet dsSubMats = _DbClass.GetMaterialForWorkOrder(EstNum, work_order_id);
PopulateDataGrid(dsSubMats, grdpl1);
}
catch (Exception exp)
{
Response.Write(exp.Message.ToString());
}
}