Example #1
0
 //绑定grvKC_WLH
 private void BindgrvKC_WLH()
 {
     try
     {
         string  sql        = GetSqlstr();
         string  sortEx     = this.grvKC_WLH.Attributes["SortExpression"];
         string  sortDirect = this.grvKC_WLH.Attributes["SortDirection"];
         string  strSort    = (!string.IsNullOrEmpty(sortEx)) ? sortEx + " " + sortDirect : "";
         DataSet ds         = KCQuery.GetQueryKC_WLH(sql, strSort, PageControl4.GetPageSize(), PageControl4.GetCurrPage());
         this.grvKC_WLH.DataSource = ds;
         this.grvKC_WLH.DataBind();
         DataSet dsCount = KCQuery.GetCountKC_WLH(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";
         }
     }
     catch (Exception ex)
     {
         String strEx = ex.Message;
         this.PrintfError("数据访问错误,请重试!");
     }
 }
Example #2
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);
 }
Example #3
0
 private void SetPageWLH()
 {
     try
     {
         string sqlWhere = GetSqlstr();
         int    outCount;
         int    pageCount = KCQuery.GetPageCount_WLH(sqlWhere, PageControl1.GetPageSize(), out outCount);
         PageControl4.SetInitView(pageCount, outCount);
     }
     catch
     {
         this.PrintfError("数据访问错误,请重试!");
         return;
     }
 }