/// <summary>
    /// 初始化页面
    /// </summary>
    protected void InitFirstPageData(int id)
    {
        LBOMDetailBB BOMDetailBB = new LBOMDetailBB();
        string strWhere = "bomid=@bomid";
        SqlParameter[] param = new SqlParameter[] { new SqlParameter("@bomid", id) };
        try
        {
            DataSet ds = BOMDetailBB.GetVList(strWhere, param);

            if (ds != null && ds.Tables.Count > 0)
            {

                this.GridView1.DataSource = ds.Tables[0];
                this.GridView1.DataBind();

            }
        }
        finally
        {
            BOMDetailBB.Dispose();
        }
    }
Exemple #2
0
    /// <summary>
    /// 初始化页面
    /// </summary>
    protected void InitFirstPageData()
    {
        LBOMDetailBB BOMDetailBB = new LBOMDetailBB();
        string strWhere = "bomid=@bomid";
        SqlParameter[] param = new SqlParameter[] { new SqlParameter("@bomid", this.IdValue) };
        try
        {
            DataSet ds = BOMDetailBB.GetVList(strWhere, param);

            if (ds != null && ds.Tables.Count > 0)
            {
                this.DtResult = ds.Tables[0];

                this.DtResult.Columns.Add(new DataColumn("rowId", typeof(string)));
                this.DtResult.Columns.Add(new DataColumn("isdel", typeof(string)));

                foreach (DataRow dr in this.DtResult.Rows)
                {
                    dr["rowId"] = Guid.NewGuid().ToString();
                    dr["isdel"] = "0";
                }
            }
        }
        finally
        {
            BOMDetailBB.Dispose();
        }
    }