Exemplo 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("数据访问错误,请重试!");
        }
    }
Exemplo 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("数据访问错误,请重试!");
     }
 }
Exemplo 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("数据访问错误,请重试!");
     }
 }
Exemplo n.º 4
0
 //重置
 protected void imgBtnCancle_Click(object sender, ImageClickEventArgs e)
 {
     this.txtBarcode.Text = "";
     this.txtHW.Text      = "";
     this.txtPCH.Text     = "";
     this.txtWLH.Text     = "";
     this.txtFree1.Text   = "";
     this.txtFree2.Text   = "";
     this.txtFree3.Text   = "";
     this.hidCK.Value     = "";
     this.hidCopyGG.Value = "";
     this.hidGG.Value     = "";
     this.hidQuery.Value  = "";
     this.hidRKPH.Value   = "";
     this.hidRKRQ.Value   = "";
     this.hidRKSX.Value   = "";
     this.hidTSXX.Value   = "";
     this.drpCK.Items.Clear();
     this.drpCopyGG.Items.Clear();
     this.drpCopyGG.Text = "";
     this.drpGG.Items.Clear();
     this.drpGG.Text = "";
     this.drpRKPH.Items.Clear();
     this.drpRKPH.Text = "";
     this.drpRKSX.Items.Clear();
     this.drpTSXX.Items.Clear();
     this.drpTSXX.Text         = "";
     this.chkCK.Checked        = false;
     this.chkGG.Checked        = false;
     this.chkHW.Checked        = false;
     this.chkRKPCH.Checked     = false;
     this.chkRKPH.Checked      = false;
     this.chkRKRQ.Checked      = false;
     this.chkRKSX.Checked      = false;
     this.chkTM.Checked        = false;
     this.chkTSXX.Checked      = false;
     this.chkWLH.Checked       = false;
     this.chkFree1.Checked     = false;
     this.chkFree2.Checked     = false;
     this.chkFree3.Checked     = false;
     this.grvKC_HW.DataSource  = null;
     this.grvKC_PCH.DataSource = null;
     this.grvKC_TM.DataSource  = null;
     this.grvKC_WLH.DataSource = null;
     this.grvKC_PCH.DataBind();
     this.grvKC_TM.DataBind();
     this.grvKC_HW.DataBind();
     this.grvKC_WLH.DataBind();
     PageControl1.SetInitView(0, 0);
     PageControl2.SetInitView(0, 0);
     PageControl3.SetInitView(0, 0);
     PageControl4.SetInitView(0, 0);
 }
Exemplo n.º 5
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("数据访问错误,请重试!");
     }
 }
Exemplo n.º 6
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;
     }
 }
Exemplo n.º 7
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;
     }
 }
Exemplo n.º 8
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("数据访问错误,请重试!");
     }
 }
Exemplo n.º 9
0
 //设置总计信息和跑钩数
 private void SetSumInfo()
 {
     if (this.grvWGD.Rows.Count > 0)
     {
         this.labCount.Text = PageControl1.GetRecordCount().ToString();
         try
         {
             this.lblPaoGou.Text = WGDQuery.GetPaoGouCount(GetSqlWhere()).ToString();
         }
         catch
         {
             this.lblPaoGou.Text = "0";
         }
     }
 }
Exemplo 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;
     }
 }
Exemplo n.º 11
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;
        //}
    }
Exemplo n.º 12
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;
        //}
    }
Exemplo n.º 13
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("数据访问错误,请重试!");
        //}
    }
Exemplo n.º 14
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("数据访问错误,请重试!");
     }
 }
Exemplo n.º 15
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;
         }
     }
 }
Exemplo n.º 16
0
 //导出EXCEL
 protected void imgBtnExcel_Click(object sender, ImageClickEventArgs e)
 {
     if (this.grvWGD.Rows.Count < 1)
     {
         this.PrintfError("没有要导出的数据!");
     }
     try
     {
         string  sqlWhere = GetSqlWhere();
         DataSet ds       = WGDQuery.QueryWGDExcel(sqlWhere);
         if (ds != null)
         {
             this.CreateExcel(ds.Tables[0], "WGD.xls", PageControl1.GetRecordCount());
         }
     }
     catch
     {
         this.PrintfError("数据访问错误,请重试!");
         return;
     }
 }
Exemplo n.º 17
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("数据访问错误,请重试!");
        }
    }
Exemplo n.º 18
0
 //查询
 protected void imgBtnQuery_Click(object sender, ImageClickEventArgs e)
 {
     try
     {
         if (checksj())
         {
             SetPageCountView();
             BindGridView();
             lblSUM.Text = PageControl1.GetRecordCount().ToString();
             lblZL.Text  = GetckdJHZL().ToString();
         }
         else
         {
             PrintfError("输入日期有误!");
             return;
         }
     }
     catch
     {
         this.PrintfError("数据访问失败!");
         return;
     }
 }
Exemplo n.º 19
0
 //查询
 protected void imgBtnQuery_Click(object sender, ImageClickEventArgs e)
 {
     try
     {
         if (checksj())
         {
             string sql = GetSqlZKD();
             if (!string.IsNullOrEmpty(sql))
             {
                 //Response.Write(sql);
                 SetPageCountView();
                 BindGridView();
                 lblSUM.Text  = PageControl1.GetRecordCount().ToString();
                 lblSL.Text   = GetckdSL().ToString();
                 lblZL.Text   = GetckdZL().ToString();
                 lblJHSL.Text = GetckdJHSL().ToString();
                 lblJHZL.Text = GetckdJHZL().ToString();
                 //lblCount.Text = PageControl1.GetRecordCount().ToString();
             }
             else
             {
                 this.PrintfError("请输入查询条件!");
                 return;
             }
         }
         else
         {
             this.PrintfError("时间有误,请重新输入");
             return;
         }
     }
     catch
     {
         this.PrintfError("数据访问失败!");
         return;
     }
 }
Exemplo n.º 20
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("时间格式不正确!");
     }
 }