private void LoadData() { string strWhere = string.Format("ID={0}", Request.QueryString["PlannedSourceID"].ToString()); BLL.vw_JH_PlannedSource bllSource = new BLL.vw_JH_PlannedSource(); DataRow drSource = bllSource.GetList(strWhere).Tables[0].Rows[0]; txbMaterialNO.Text = drSource["MaterialNO"].ToString(); txbMaterialName.Text = drSource["MaterialName"].ToString(); }
private void LoadData() { string strWhere = string.Format("ID='{0}'", Request.QueryString["ID"]); BLL.vw_JH_PlannedSource bllPlannedSource = new BLL.vw_JH_PlannedSource(); DataRow dr = bllPlannedSource.GetList(strWhere).Tables[0].Rows[0]; txbBillNO.Text = dr["BillNO"].ToString(); ddlBillType.SelectedValue = dr["BillType"].ToString(); tgbMaterialNO.Text = dr["MaterialNO"].ToString(); txbMaterialName.Text = dr["MaterialName"].ToString(); nbxPlanAmount.Text = dr["PlanAmount"].ToString(); dapEndDate.SelectedDate = DateTime.Parse(dr["EndDate"].ToString()); }
private void BindGrid() { string strWhere = string.Format("[EndDate] between '{0}' and '{1}'", dapStartDate.Text, dapEndDate.Text); string order = string.Format("EndDate ASC,BillType ASC"); int pageSize = gridPlanSource.PageSize; int pageIndex = gridPlanSource.PageIndex; long recordCount; BLL.vw_JH_PlannedSource bllPlannedSource = new BLL.vw_JH_PlannedSource(); DataSet dsPlannedSource = bllPlannedSource.GetListByPage(strWhere, order, pageSize, pageIndex, out recordCount); DataTable dtSource = dsPlannedSource.Tables[0]; gridPlanSource.DataSource = dtSource; gridPlanSource.RecordCount = (int)recordCount; gridPlanSource.DataBind(); }