Ejemplo n.º 1
0
    //绑定
    private void BindGridView()
    {
        try
        {
            string  sql        = GetSqlStr();
            string  sortEx     = this.grvCKZB.Attributes["SortExpression"];
            string  sortDirect = this.grvCKZB.Attributes["SortDirection"];
            string  strSort    = (!string.IsNullOrEmpty(sortEx)) ? sortEx + " " + sortDirect : "";
            DataSet ds         = CKZBQuery.GetQueryCKZB(sql, strSort, PageControl1.GetPageSize(), PageControl1.GetCurrPage());
            this.grvCKZB.DataSource = ds;
            this.grvCKZB.DataBind();

            this.SetDisplayList1.InitSetListControl(this.grvCKZB, SysBaseConfig.CKZB_Q_PAGE);
            this.SetDisplayList1.SetGridViewDisplay(grvCKZB);

            DataSet dsCount = CKZBQuery.GetCount(sql);
            if (dsCount != null && dsCount.Tables[0].Rows.Count > 0 && !string.IsNullOrEmpty((dsCount.Tables[0].Rows[0]["HJZL"]).ToString()))
            {
                this.lblSUM.Text = dsCount.Tables[0].Rows[0]["Count"].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.lblSUM.Text = "0";
                this.lblZL.Text  = "0";
                this.lblSL.Text  = "0";
            }
        }
        catch (Exception ex)
        {
            String strEx = ex.Message;
            this.PrintfError("数据访问错误,请重试!");
        }
    }
Ejemplo n.º 2
0
 //绑定GridView
 private void BindGridView()
 {
     try
     {
         string  sql        = GetsqlDPP();
         string  sortEx     = this.grvDPP.Attributes["SortExpression"];
         string  sortDirect = this.grvDPP.Attributes["SortDirection"];
         string  strSort    = (!string.IsNullOrEmpty(sortEx)) ? sortEx + " " + sortDirect : "";
         DataSet ds         = DPPQuery.GetQueryDPP(sql, strSort, PageControl1.GetPageSize(), PageControl1.GetCurrPage());
         this.grvDPP.DataSource = ds;
         this.grvDPP.DataBind();
         DataSet dsCount = DPPQuery.GetCount(sql);
         if (dsCount != null && dsCount.Tables[0].Rows.Count > 0 && !string.IsNullOrEmpty((dsCount.Tables[0].Rows[0]["HJZL"]).ToString()))
         {
             this.lblSum.Text = dsCount.Tables[0].Rows[0]["countAll"].ToString();
             this.lblSL.Text  = this.GetckdSL().ToString();
             this.lblZL.Text  = Convert.ToDecimal(dsCount.Tables[0].Rows[0]["HJZL"]).ToString("#0.0000");
         }
         else
         {
             this.lblSum.Text = "0";
             this.lblZL.Text  = "0";
             this.lblSL.Text  = "0";
         }
     }
     catch (Exception ex)
     {
         String strEx = ex.Message;
         this.PrintfError("数据访问错误,请重试!");
     }
 }
Ejemplo n.º 3
0
 //绑定GridView
 private void BindGridView()
 {
     try
     {
         string sql = GetSqlWhere();
         if (string.IsNullOrEmpty(sql))
         {
             this.PrintfError("请选择查询条件!");
             return;
         }
         string  sortEx     = this.grvWGD.Attributes["SortExpression"];
         string  sortDirect = this.grvWGD.Attributes["SortDirection"];
         string  strSort    = (!string.IsNullOrEmpty(sortEx)) ? sortEx + " " + sortDirect : "";
         DataSet ds         = WGDQuery.QueryWGD(sql, strSort, PageControl1.GetPageSize(), PageControl1.GetCurrPage());
         this.grvWGD.DataSource = ds;
         this.grvWGD.DataBind();
         SetSumInfo();
         this.SetDisplayList1.InitSetListControl(this.grvWGD, SysBaseConfig.WGD_Q_PAGE);
         this.SetDisplayList1.SetGridViewDisplay(grvWGD);
     }
     catch (Exception ex)
     {
         String strEx = ex.Message;
         this.PrintfError("数据访问错误,请重试!");
     }
 }
Ejemplo n.º 4
0
 private void BindPCH()
 {
     try
     {
         DataSet ds = DataOperQuery.GetAllPCH(this.txtPCH.Text, "", PageControl1.GetPageSize(), PageControl1.GetCurrPage());
         this.grdPCH.DataSource = ds;
         this.grdPCH.DataBind();
     }
     catch
     {
         this.PrintfError("数据访问错误,请重试!");
     }
 }
Ejemplo n.º 5
0
 //设置分页控件显示
 private void SetPageCountView()
 {
     try
     {
         int outCount;
         int pageCount = DataOperQuery.GetAllPCHPageCount(this.txtPCH.Text, PageControl1.GetPageSize(), out outCount);
         PageControl1.SetInitView(pageCount, outCount);
     }
     catch
     {
         this.PrintfError("数据访问错误,请重试!");
         return;
     }
 }
Ejemplo n.º 6
0
 private void SetPageCountView()
 {
     try
     {
         string sqlWhere = GetSqlWhere();
         int    outCount;
         int    pageCount = GetPageCount(sqlWhere, PageControl1.GetPageSize(), out outCount);
         PageControl1.SetInitView(pageCount, outCount);
     }
     catch
     {
         this.PrintfError("数据访问错误,请重试!");
         return;
     }
 }
Ejemplo n.º 7
0
 //绑定
 private void BindgrvRKJL()
 {
     try
     {
         string  sql = GetSqlStr();
         DataSet ds  = PICIQuery.GetRKJL(sql, "", PageControl1.GetPageSize(), PageControl1.GetCurrPage());
         this.grvRKJL.DataSource = ds;
         this.grvRKJL.DataBind();
     }
     catch (Exception ex)
     {
         String strEx = ex.Message;
         this.PrintfError("数据访问错误,请重试!");
     }
 }
Ejemplo n.º 8
0
    //设置分页控件显示
    private void SetPageCountView()
    {
        //try
        //{
        string sql = GetsqlDPP();
        int    outCount;
        int    pageCount = DPPQuery.GetPageCount(sql, PageControl1.GetPageSize(), out outCount);

        PageControl1.SetInitView(pageCount, outCount);
        //}
        //catch
        //{
        //    this.PrintfError("数据访问错误,请重试!");
        //    return;
        //}
    }
Ejemplo n.º 9
0
    //设置分页控件显示
    private void SetPageCountView()
    {
        //try
        //{
        string sqlWhere = Getsqlstr();
        int    outCount;
        int    pageCount = QTRKReport.GetPageCount(sqlWhere, PageControl1.GetPageSize(), out outCount);

        PageControl1.SetInitView(pageCount, outCount);
        //}
        //catch
        //{
        //    this.PrintfError("数据访问错误,请重试!");
        //    return;
        //}
    }
Ejemplo n.º 10
0
 //绑定上面的gridview
 private void BindXTZHWL()
 {
     try
     {
         string  sql = GetSqlStr();
         DataSet ds  = XTZHQuery.GetXTZH(sql, "", PageControl1.GetPageSize(), PageControl1.GetCurrPage());
         this.grvXTZHWL.DataSource = ds;
         this.grvXTZHWL.DataBind();
         this.hidURL.Value = "";
     }
     catch
     {
         this.PrintfError("数据错误!");
         return;
     }
 }
Ejemplo n.º 11
0
    //绑定
    private void BindGridView()
    {
        //try
        //{
        string  sql = Getsqlstr();
        DataSet ds  = QTRKReport.GetQueryYTRK(sql, "", PageControl1.GetPageSize(), PageControl1.GetCurrPage());

        this.grvQTRK.DataSource = ds;
        this.grvQTRK.DataBind();

        //}
        //catch (Exception ex)
        //{
        //    String strEx = ex.Message;
        //    this.PrintfError("数据访问错误,请重试!");
        //}
    }
Ejemplo n.º 12
0
 //绑定
 private void BindGridView()
 {
     try
     {
         string  sql        = Getsqlstr();
         string  sortEx     = this.grvQTRK.Attributes["SortExpression"];
         string  sortDirect = this.grvQTRK.Attributes["SortDirection"];
         string  strSort    = (!string.IsNullOrEmpty(sortEx)) ? sortEx + " " + sortDirect : "";
         DataSet ds         = QTRKReport.GetQueryYTRK(sql, strSort, PageControl1.GetPageSize(), PageControl1.GetCurrPage());
         this.grvQTRK.DataSource = ds;
         this.grvQTRK.DataBind();
     }
     catch (Exception ex)
     {
         String strEx = ex.Message;
         this.PrintfError("数据访问错误,请重试!");
     }
 }
Ejemplo n.º 13
0
    //绑定gridview
    private void BindGridView()
    {
        try
        {
            string  sql        = GetSqlZKD();
            string  sortEx     = this.grvZKD.Attributes["SortExpression"];
            string  sortDirect = this.grvZKD.Attributes["SortDirection"];
            string  strSort    = (!string.IsNullOrEmpty(sortEx)) ? sortEx + " " + sortDirect : "";
            DataSet ds         = ZKDQuery.GetQueryZKD(sql, strSort, PageControl1.GetPageSize(), PageControl1.GetCurrPage());
            this.grvZKD.DataSource = ds;
            this.grvZKD.DataBind();

            this.SetDisplayList1.InitSetListControl(this.grvZKD, SysBaseConfig.ZKD_Q_PAGE);
            this.SetDisplayList1.SetGridViewDisplay(grvZKD);
        }
        catch (Exception ex)
        {
            String strEx = ex.Message;
            this.PrintfError("数据访问错误,请重试!");
        }
    }
Ejemplo n.º 14
0
 //设置分页控件显示
 private void SetPageCountView()
 {
     if (CheckUI())
     {
         try
         {
             String strEndTime = this.txtETime.Text + " 23:59:59";
             int    outCount;
             int    pageCount = DataOperQuery.GetPageCount(this.txtSTime.Text, strEndTime, PageControl1.GetPageSize(), out outCount);
             PageControl1.SetInitView(pageCount, outCount);
         }
         catch
         {
             this.PrintfError("数据访问错误,请重试!");
             return;
         }
     }
 }
Ejemplo n.º 15
0
 private void BindGridView()
 {
     if (CheckUI())
     {
         String strEndTime = this.txtETime.Text + " 23:59:59";
         try
         {
             DataSet ds = DataOperQuery.GetDataMoveLog(this.txtSTime.Text, strEndTime, "", PageControl1.GetPageSize(), PageControl1.GetCurrPage());
             this.grvDataMoveLog.DataSource = ds;
             this.grvDataMoveLog.DataBind();
         }
         catch
         {
             PrintfError("数据访问错误!");
         }
     }
     else
     {
         this.PrintfError("时间格式不正确!");
     }
 }