예제 #1
0
 //绑定
 private void BindgrvCKJL()
 {
     try
     {
         string  sql = GetSqlStr();
         DataSet ds  = PICIQuery.GetCKJL(sql, "", PageControl2.GetPageSize(), PageControl2.GetCurrPage());
         this.grvCKJL.DataSource = ds;
         this.grvCKJL.DataBind();
     }
     catch (Exception ex)
     {
         String strEx = ex.Message;
         this.PrintfError("数据访问错误,请重试!");
     }
 }
예제 #2
0
파일: QTHD.aspx.cs 프로젝트: rcw0125/XGWMS
    //帮定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("数据访问错误,请重试!");
        }
    }
예제 #3
0
 //绑定grvKC_HW
 private void BindgrvKC_HW()
 {
     try
     {
         string  sql        = GetSqlstr();
         string  sortEx     = this.grvKC_HW.Attributes["SortExpression"];
         string  sortDirect = this.grvKC_HW.Attributes["SortDirection"];
         string  strSort    = (!string.IsNullOrEmpty(sortEx)) ? sortEx + " " + sortDirect : "";
         DataSet ds         = KCQuery.GetQueryKC_HW(sql, strSort, PageControl2.GetPageSize(), PageControl2.GetCurrPage());
         this.grvKC_HW.DataSource = ds;
         this.grvKC_HW.DataBind();
         DataSet dsCount = KCQuery.GetCountKC_HW(sql);
         if (dsCount != null && dsCount.Tables[0].Rows.Count > 0 && dsCount.Tables[0].Rows[0]["HJCOUNT"].ToString() != "0")
         {
             this.lblCount.Text = dsCount.Tables[0].Rows[0]["HJCOUNT"].ToString();
             this.lblSL.Text    = dsCount.Tables[0].Rows[0]["HJSL"].ToString();
             this.lblZL.Text    = Convert.ToDecimal(dsCount.Tables[0].Rows[0]["HJZL"]).ToString("#0.0000");
         }
         else
         {
             this.lblCount.Text = "0";
             this.lblSL.Text    = "0";
             this.lblZL.Text    = "0.0000";
         }
         this.SetDisplayList1.InitSetListControl(this.grvKC_PCH, SysBaseConfig.KC_Q_PAGE);
         this.SetDisplayList1.SetGridViewDisplay(grvKC_PCH);
     }
     catch (Exception ex)
     {
         String strEx = ex.Message;
         this.PrintfError("数据访问错误,请重试!");
     }
 }