//帮定grvTHD private void BindGridView() { try { string sql = GetSqlTHD(); string sortEx = this.grvTHD.Attributes["SortExpression"]; string sortDirect = this.grvTHD.Attributes["SortDirection"]; string strSort = (!string.IsNullOrEmpty(sortEx)) ? sortEx + " " + sortDirect : ""; DataSet ds = THDQuery.GetQueryTHD(sql, strSort, PageControl2.GetPageSize(), PageControl2.GetCurrPage()); this.grvTHD.DataSource = ds; this.grvTHD.DataBind(); this.SetDisplayList1.InitSetListControl(this.grvTHD, SysBaseConfig.THD_Q_PAGE); this.SetDisplayList1.SetGridViewDisplay(grvTHD); } catch (Exception ex) { String strEx = ex.Message; this.PrintfError("数据访问错误,请重试!"); } }