当前位置: 首页>>代码示例>>C#>>正文


C# Whitfieldcore.GetMaterialForWorkOrder方法代码示例

本文整理汇总了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;
                }
        }
    }
开发者ID:frdharish,项目名称:WhitfieldAPPs,代码行数:65,代码来源:whitfield_estimation.aspx.cs

示例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());
        }
    }
开发者ID:frdharish,项目名称:WhitfieldAPPs,代码行数:14,代码来源:workorder_materials.ascx.cs


注:本文中的Whitfieldcore.GetMaterialForWorkOrder方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。