}//Page_Load

    private void QueryData()
    {
        #region
        string SessionIDName = string.Format("{0}_{1}", strPrefixed, PageTimeStamp.Value);

        DataTable dt = new DataTable();
        ALOModel.MaintainHistoryDaily BCO = new ALOModel.MaintainHistoryDaily(ConnectionDB);

        ArrayList ParameterList = new ArrayList();

        ParameterList.Clear();
        ParameterList.Add(SLP_StoreChain1.Text.Trim());
        ParameterList.Add(SLP_Store1.Text.Trim());
        ParameterList.Add(SLP_SLPDate1.Text.Trim());
        ParameterList.Add(SLP_SLPDate2.Text.Trim());

        dt = BCO.QueryStoreAcceptItem(ParameterList);

        //-----

        bAfterQueryDataBinding = true;

        if (!dt.Columns.Contains("CHECKED"))//增加欄位以方便判別是否可
            dt.Columns.Add("CHECKED");

        if (!dt.Columns.Contains("ROWID"))//2010/06/08 added:增加欄位以判別勾選與否
            dt.Columns.Add("ROWID");

        hidden_RowID_MaxID.Value = dt == null ? "-1" : (dt.Rows.Count - 1).ToString();//2010/06/08 added:記錄最大ROWID
        hidden_RowID_Selected.Value = "";//2010/06/08 added:清空已選ROWID

        //-----

        Session[SessionIDName] = dt;

        SetRowIDToDataTable(true);//2010/06/08 added:設定ROWID

        GridView1.DataSource = dt;
        GridView1.PageSize = (TextBoxPagesize.Text == "") ? 10 : (int.Parse(TextBoxPagesize.Text) <= 0) ? 10 : int.Parse(TextBoxPagesize.Text);
        GridView1.PageIndex = 0;
        GridView1.DataBind();
        GridView1.SelectedIndex = -1;

        GridView2.DataSource = null;
        GridView2.DataBind();

        bAfterQueryDataBinding = false;

        LabelQueryRecordCount.Text = string.Format(" {0} Rows ", dt.Rows.Count.ToString());

        if (dt == null || (dt != null && dt.Rows.Count <= 0))
        {
            ResultMsgLabel.Text = "查無資料";
            ScriptManager.RegisterStartupScript(UpdatePanel1, this.GetType(), "ClientScript", "alert('查無資料');", true);
        }

        #endregion
    }
    }//Page_Load

    private void QueryData()
    {
        #region
        string SessionIDName = string.Format("{0}_{1}", PAGE_DT_01, PageTimeStamp.Value);

        DataTable Dt = new DataTable();
        ALOModel.MaintainHistoryDaily BCO = new ALOModel.MaintainHistoryDaily(ConnectionDB);

        ArrayList ParameterList = new ArrayList();//20091113

        ParameterList.Clear();
        ParameterList.Add(SLP_StoreChain1.Text.Trim());
        ParameterList.Add(SLP_Store1.Text.Trim());
        ParameterList.Add(SLP_SLPDate1.Text.Trim());
        ParameterList.Add(SLP_SLPDate2.Text.Trim());

        Dt = BCO.QueryStoreAcceptItem(ParameterList);

        Session[SessionIDName] = Dt;
        GridView1.DataSource = Dt;
        //設定分頁大小
        GridView1.PageSize = (TextBoxPagesize.Text == "") ? 10 : (int.Parse(TextBoxPagesize.Text) <= 0) ? 10 : int.Parse(TextBoxPagesize.Text);
        GridView1.PageIndex = 0;
        GridView1.DataBind();
        GridView1.SelectedIndex = -1;

        LabelQueryRecordCount.Text = string.Format(" {0} Rows ", Dt.Rows.Count.ToString());


        if (Dt == null || (Dt != null && Dt.Rows.Count <= 0))
        {
            ScriptManager.RegisterStartupScript(UpdatePanel1, this.GetType(), "ClientScript", "alert('查無資料');", true);
        }

        #endregion
    }