Beispiel #1
0
 private void BindZDR()
 {
     try
     {
         DataSet ds = ZYPdd.GetZDRY();
         this.drpZDR.DataSource = ds;
         this.drpZDR.DataBind();
         this.drpZDR.Items.Insert(0, "请选择");
         this.drpZDR.SelectedIndex = 0;
     }
     catch
     {
         this.PrintfError("数据访问错误!");
     }
 }
Beispiel #2
0
 private void SetPageCountView()
 {
     try
     {
         string sqlWhere = GetSqlWhere();
         int    outCount;
         int    pageCount = ZYPdd.GetPageCount(sqlWhere, PageControl1.GetPageSize(), out outCount);
         PageControl1.SetInitView(pageCount, outCount);
     }
     catch
     {
         this.PrintfError("数据访问错误,请重试!");
         return;
     }
 }
Beispiel #3
0
 private void BindGridView()
 {
     try
     {
         string  sql        = GetSqlWhere();
         string  sortEx     = this.grvFYD.Attributes["SortExpression"];
         string  sortDirect = this.grvFYD.Attributes["SortDirection"];
         string  strSort    = (!string.IsNullOrEmpty(sortEx)) ? sortEx + " " + sortDirect : "";
         DataSet ds         = ZYPdd.GetQueryFYD(sql, strSort, PageControl1.GetPageSize(), PageControl1.GetCurrPage());
         this.grvFYD.DataSource = ds;
         this.grvFYD.DataBind();
     }
     catch (Exception ex)
     {
         String strEx = ex.Message;
         this.PrintfError("数据访问错误,请重试!");
     }
 }
Beispiel #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (!String.IsNullOrEmpty(Request["PDDH"]))
         {
             string strFYDH = Request["PDDH"];
             try
             {
                 DataSet ds = ZYPdd.GetPDDItems(strFYDH);
                 this.grdGridList.DataSource = ds;
                 this.grdGridList.DataBind();
             }
             catch (Exception ex)
             {
                 this.PrintfError("数据访问失败!");
                 return;
             }
         }
     }
 }