Beispiel #1
0
        private void LoadData()
        {
            #region 加载数据
            string strWhere = string.Format("ID='{0}'", Request.QueryString["id"].ToString());
            BLL.vw_JC_BOMParent bllBOMParent = new BLL.vw_JC_BOMParent();
            DataTable           dtBOMParent  = bllBOMParent.GetList(strWhere).Tables[0];
            txbMaterialName.Text = dtBOMParent.Rows[0]["MaterialName"].ToString();
            txbMaterialNO.Text   = dtBOMParent.Rows[0]["MaterialNO"].ToString();
            tgbCheckName.Text    = dtBOMParent.Rows[0]["CheckName"].ToString();
            hdfCheckNO.Text      = dtBOMParent.Rows[0]["CheckNO"].ToString();
            hdfPropertyNO.Text   = dtBOMParent.Rows[0]["MaterialType"].ToString();
            txbPropertyName.Text = dtBOMParent.Rows[0]["PropertyName"].ToString();
            if (dtBOMParent.Rows[0]["CheckDate"].ToString() != "")
            {
                dapCheckDate.SelectedDate = DateTime.Parse(dtBOMParent.Rows[0]["CheckDate"].ToString());
            }
            ddlCheckStatus.SelectedValue = dtBOMParent.Rows[0]["CheckStatus"].ToString();
            ddlStatus.SelectedValue      = dtBOMParent.Rows[0]["Status"].ToString();
            #endregion

            #region 设置操作权限
            #endregion

            #region 自动填充项
            if (tgbCheckName.Hidden == false)
            {
            }
            #endregion
        }
Beispiel #2
0
        //Grid绑定数据源
        private void BindGrid()
        {
            string strWhere  = "1=1";
            string order     = string.Format("{0} {1}", gridBOMParent.SortField, gridBOMParent.SortDirection);
            int    pageSize  = gridBOMParent.PageSize;
            int    pageIndex = gridBOMParent.PageIndex;
            long   recordCount;

            BLL.vw_JC_BOMParent bllBOMParent = new BLL.vw_JC_BOMParent();
            DataSet             dsBOMParent  = bllBOMParent.GetListByPage(strWhere, order, pageSize, pageIndex, out recordCount);
            DataTable           dtSource     = dsBOMParent.Tables[0];

            gridBOMParent.DataSource  = dtSource;
            gridBOMParent.RecordCount = (int)recordCount;
            gridBOMParent.DataBind();
        }