Esempio n. 1
0
        private void BindDisplayList(int pageIndex)
        {
            DataTable tb;

            if (HiddenField2.Value == "0")
            {
                tb = ESLWorkLogDataDBOption.DataTableSelect_addrownum();
            }
            else if (HiddenField2.Value == "1")
            {
                tb = ESLWorkLogDataDBOption.DataTableSelect_byID(TextBox1.Text);
            }
            else
            {
                tb = ESLWorkLogDataDBOption.DataTableSelect_byID(DropDownList1.Text);
            }
            WFWebLib.GridViewOperation.BindPagingGridView(GridView1, tb.DefaultView, pageIndex);
        }
Esempio n. 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (HiddenField1.Value == null || HiddenField1.Value == "1")
     {
         HiddenField1.Value = "";
         BindDisplayList();
     }
     if (!IsPostBack)
     {
         DropDownList1.Items.Clear();
         DropDownList1.Items.Add("请选择");
         DataTable dt = DeviceInfoDataDBOption.DataTableSelect();
         for (int i = 0; i < dt.Rows.Count; i++)
         {
             DropDownList1.Items.Add(dt.Rows[i]["ID"].ToString());
         }
         //保存当前查询状态
         DataTable tb = ESLWorkLogDataDBOption.DataTableSelect_addrownum();
         BindDisplayList();
     }
 }