Exemplo n.º 1
0
 //绑定grvKC_TM
 private void BindgrvKC_TM()
 {
     try
     {
         string  sql        = GetSqlstr();
         string  sortEx     = this.grvKC_TM.Attributes["SortExpression"];
         string  sortDirect = this.grvKC_TM.Attributes["SortDirection"];
         string  strSort    = (!string.IsNullOrEmpty(sortEx)) ? sortEx + " " + sortDirect : "";
         DataSet ds         = KCQuery.GetQueryKC_TM(sql, strSort, PageControl3.GetPageSize(), PageControl3.GetCurrPage());
         this.grvKC_TM.DataSource = ds;
         this.grvKC_TM.DataBind();
         DataSet dsCount = KCQuery.GetCountKC_TM(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]["HJCOUNT"].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("数据访问错误,请重试!");
     }
 }
Exemplo n.º 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);
 }
Exemplo n.º 3
0
 private void SetPageTM()
 {
     try
     {
         string sqlWhere = GetSqlstr();
         int    outCount;
         int    pageCount = KCQuery.GetPageCount_TM(sqlWhere, PageControl1.GetPageSize(), out outCount);
         PageControl3.SetInitView(pageCount, outCount);
     }
     catch
     {
         this.PrintfError("数据访问错误,请重试!");
         return;
     }
 }