Esempio n. 1
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("数据访问错误,请重试!");
     }
 }
Esempio n. 2
0
 //设置分页控件显示
 private void SetPageCountView()
 {
     try
     {
         string sql = GetSqlTHD();
         int    outCount;
         int    pageCount = THDQuery.GetPageCount(sql, PageControl2.GetPageSize(), out outCount);
         PageControl2.SetInitView(pageCount, outCount);
     }
     catch
     {
         this.PrintfError("数据访问错误,请重试!");
         return;
     }
 }
Esempio n. 3
0
 private void SetPageCountView2()
 {
     try
     {
         string sqlWhere = GetSqlStr();
         int    outCount;
         int    pageCount = PICIQuery.GetPageCount2(sqlWhere, PageControl2.GetPageSize(), out outCount);
         PageControl2.SetInitView(pageCount, outCount);
     }
     catch
     {
         this.PrintfError("数据访问错误,请重试!");
         return;
     }
 }
Esempio n. 4
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("数据访问错误,请重试!");
     }
 }
Esempio n. 5
0
    //帮定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("数据访问错误,请重试!");
        }
    }