Example #1
0
        /// <summary>
        /// CAA10
        /// </summary>
        /// <param name="ParameterList"></param>
        /// <param name="s_Type"></param>
        /// <returns></returns>
        public DataTable CAA10_1(ArrayList ParameterList, string s_Type)
        {
            #region 宣告變數

            BCO.CAACommon CAAComm = new BCO.CAACommon();
            ArrayList arl_ReportService = new ArrayList();
            DataTable dt_Return = new DataTable();

            #endregion

            #region 取得資料

            switch (s_Type)
            {
                #region 頁籤=通路繳款-專案代收

                case "CAA10_1":

                    #region 傳入參數

                    arl_ReportService.Clear();
                    arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[22].ToString(), "int", false));//[筆數]
                    arl_ReportService.Add(CAAComm.GetValueSetParameter((ParameterList[23].ToString() == "true") ? "1" : "0", "string", false));//[關鍵字查詢],1=勾選關鍵字查詢,0=沒勾選關鍵字查詢
                    arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[0].ToString(), "string", false));//營業日期起
                    arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[1].ToString(), "string", false));//營業日期迄
                    arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[2].ToString(), "string", false));//交易日期起
                    arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[3].ToString(), "string", false));//交易日期迄
                    arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[4].ToString(), "string", false));//交易序號起
                    arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[5].ToString(), "string", false));//交易序號迄
                    arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[6].ToString(), "string", false));//交易金額Operator
                    arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[7].ToString(), "int", false));//交易金額
                    arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[8].ToString(), "string", false));//客戶編號起
                    arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[9].ToString(), "string", false));//客戶編號迄
                    arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[10].ToString(), "string", false));//繳款識別碼起
                    arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[11].ToString(), "string", false));//繳款識別碼迄
                    arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[12].ToString(), "string", false));//店群起
                    arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[13].ToString(), "string", false));//店群迄
                    arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[14].ToString(), "string", false));//收款單號起
                    arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[15].ToString(), "string", false));//收款單號迄
                    arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[16].ToString(), "string", false));//建立日期起
                    arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[17].ToString(), "string", false));//建立日期迄
                    arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[18].ToString(), "string", false));//建立人員
                    arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[19].ToString(), "string", false));//維護日期起
                    arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[20].ToString(), "string", false));//維護日期迄
                    arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[21].ToString(), "string", false));//維護人員
                    arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[24].ToString(), "string", false));//交易金額Operator
                    arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[25].ToString(), "int", false));//交易金額
                    #endregion

                    #region 連結資料庫

                    BCO.MaintainCollRecord bco_1 = new BCO.MaintainCollRecord(ConntionDB);
                    dt_Return = bco_1.QueryCollRecordByByLike(arl_ReportService);

                    #endregion

                    break;

                #endregion

                #region 頁籤=專案代收明細表

                case "CAA10_2":

                    #region 傳入參數

                    arl_ReportService.Clear();
                    arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[0].ToString(), "string", false));//[營業日期]起
                    arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[1].ToString(), "string", false));//[營業日期]迄
                    arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[2].ToString(), "string", false));//[交易日期]起
                    arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[3].ToString(), "string", false));//[交易日期]迄
                    arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[4].ToString(), "date", false));//[收款單號日期]起
                    arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[5].ToString(), "date", false));//[收款單號日期]迄
                    arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[6].ToString(), "string", false));//[繳款型態]
                    arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[7].ToString(), "string", false));//[帳務人員]起
                    arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[8].ToString(), "string", false));//[帳務人員]迄
                    arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[9].ToString(), "string", false));//利潤中心起
                    arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[10].ToString(), "string", false));//利潤中心迄
                    arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[11].ToString(), "string", false));//店號
                    arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[12].ToString(), "string", false));//營業所起
                    arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[13].ToString(), "string", false));//營業所迄
                    arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[14].ToString(), "string", false));//營業人員起
                    arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[15].ToString(), "string", false));//營業人員迄
                    arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[16].ToString(), "string", false));//沖帳餘額OP
                    arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[17].ToString(), "string", false));//沖帳餘額
                    arl_ReportService.Add(CAAComm.GetValueSetParameter(ParameterList[18].ToString(), "string", false));//結案狀態
                    #endregion

                    #region 連結資料庫

                    BCO.ProcessCollReport bco_2 = new BCO.ProcessCollReport(ConntionDB);
                    dt_Return = bco_2.QueryCollReport(arl_ReportService);

                    #endregion

                    break;

                #endregion
            }

            #endregion

            #region 檢查回傳資料

            if (dt_Return.Rows.Count == 0)
            { throw new Exception("查無資料"); }

            #endregion

            return dt_Return;
        }
Example #2
0
    /// <summary>
    /// 初始檢視&編輯模式
    /// </summary>
    private void Page_Status_VIEW_EDIT_LOAD()
    {
        if (this.hid_Page_Status.Value == "VIEW" ||
            this.hid_Page_Status.Value == "EDIT")
        {
            #region 清空所有欄位

            this.slp_SAL_DATE.Text = string.Empty;//營業日期            
            this.txt_COLL_DATE.Text = string.Empty;//交易日期
            this.txt_COLL_TIME.Text = string.Empty;//交易時間
            this.txt_COLL_SEQNO.Text = string.Empty;//交易序號
            this.txt_COLL_AMT.Text = string.Empty;//交易金額
            this.txt_REMAIN_AMT.Text = string.Empty;//沖帳餘額
            this.slp_CHARGE.Text = string.Empty;//手續費
            this.slp_STORE_ID.Text = string.Empty;//客戶編號
            this.txt_PAY_CHKNO.Text = string.Empty;//繳款識別碼
            this.slp_GROUP_NO.Text = string.Empty;//店群
            this.txt_COLL_NO.Text = string.Empty;//收款單號
            this.txt_MEMO.Text = string.Empty;//原因說明
            #endregion

            #region 取得檢視資料

            string strCode = string.Empty;

            try
            {
                if (Request["V_ID"] == null)
                { throw new Exception("載入頁面失敗!"); }
                else
                { strCode = Request["V_ID"].ToString(); }
            }
            catch { }

            ParameterList.Clear();
            ParameterList.Add(strCode); //V_ID

            CAAModel.MaintainCollRecord BCO = new CAAModel.MaintainCollRecord(ConntionDB);
            dt = BCO.QueryCollRecordByFind(ParameterList);

            string s_RequestString = Request.QueryString["CAA102_Type"];

            if (dt.Rows.Count != 1 && s_RequestString != "ToolBar")
            { throw new Exception("查無收款單號:" + strCode + "的相關資料"); }
            else if (dt.Rows.Count != 1 && s_RequestString == "ToolBar")
            { throw new Exception("查無此筆資料或已被其他使用者刪除,請點選上一筆/下一筆鈕或回查詢頁重新查詢!"); }

            #endregion

            #region 將資料寫入頁面

            this.slp_SAL_DATE.Text = dt.Rows[0]["SAL_DATE"].ToString();//營業日期            
            this.txt_COLL_DATE.Text = dt.Rows[0]["COLL_DATE"].ToString();//交易日期/時間
            this.txt_COLL_TIME.Text = dt.Rows[0]["COLL_TIME"].ToString();
            this.txt_COLL_SEQNO.Text = dt.Rows[0]["COLL_SEQNO"].ToString();//交易序號
            this.txt_COLL_AMT.Text = dt.Rows[0]["COLL_AMT"].ToString();//交易金額
            this.txt_REMAIN_AMT.Text = dt.Rows[0]["COLL_REMAIN_AMT"].ToString();//沖帳餘額
            this.slp_CHARGE.Text = dt.Rows[0]["CHARGE"].ToString();//手續費
            this.slp_STORE_ID.Text = dt.Rows[0]["STORE_ID"].ToString();//客戶編號
            this.txt_PAY_CHKNO.Text = dt.Rows[0]["PAY_CHKNO"].ToString();//繳款識別碼
            this.slp_GROUP_NO.Text = dt.Rows[0]["GROUP_NO"].ToString();//店群
            this.txt_COLL_NO.Text = dt.Rows[0]["COLL_NO"].ToString();//收款單號
            this.txt_MEMO.Text = dt.Rows[0]["MEMO"].ToString();//收款單號

            #endregion

            #region 設定ReadOnly

            #region 檢視模式

            if (this.hid_Page_Status.Value == "VIEW")
            {
                this.slp_SAL_DATE.ReadOnly = true;//營業日期
                this.txt_COLL_DATE.ReadOnly = true;//交易日期
                this.txt_COLL_DATE.CssClass = "readtxtbox";
                this.txt_COLL_TIME.ReadOnly = true;//交易時間
                this.txt_COLL_TIME.CssClass = "readtxtbox";
                this.txt_COLL_SEQNO.ReadOnly = true;//交易序號
                this.txt_COLL_SEQNO.CssClass = "readtxtbox";
                this.txt_COLL_AMT.ReadOnly = true;//交易金額
                this.txt_COLL_AMT.CssClass = "readtxtbox";
                this.txt_REMAIN_AMT.ReadOnly = true;//沖帳餘額
                this.txt_REMAIN_AMT.CssClass = "readtxtbox";
                this.slp_CHARGE.ReadOnly = true;//手續費
                this.slp_STORE_ID.ReadOnly = true;//客戶編號
                this.txt_PAY_CHKNO.ReadOnly = true;//繳款識別碼
                this.txt_PAY_CHKNO.CssClass = "readtxtbox";
                this.slp_GROUP_NO.ReadOnly = true;//店群
                this.txt_COLL_NO.ReadOnly = true;//收款單號
                this.txt_COLL_NO.CssClass = "readtxtbox";
                this.txt_MEMO.ReadOnly = true;//原因說明
                this.txt_MEMO.CssClass = "readtxtbox";
            }

            #endregion

            #region 編輯模式

            if (this.hid_Page_Status.Value == "EDIT")
            {
                if (OnlyEditMemo() == false)
                {
                    this.txt_COLL_AMT.ReadOnly = true;//交易金額
                    this.txt_COLL_AMT.CssClass = "readtxtbox";
                    this.txt_COLL_NO.ReadOnly = true;//收款單號
                    this.txt_COLL_NO.CssClass = "readtxtbox";
                    this.slp_GROUP_NO.ReadOnly = true;//店群    
                    this.txt_REMAIN_AMT.ReadOnly = true;//沖帳餘額
                    this.txt_REMAIN_AMT.CssClass = "readtxtbox";
                }
                else
                {
                    this.slp_SAL_DATE.ReadOnly = true;//營業日期
                    this.txt_COLL_DATE.ReadOnly = true;//交易日期
                    this.txt_COLL_DATE.CssClass = "readtxtbox";
                    this.txt_COLL_TIME.ReadOnly = true;//交易時間
                    this.txt_COLL_TIME.CssClass = "readtxtbox";
                    this.txt_COLL_SEQNO.ReadOnly = true;//交易序號
                    this.txt_COLL_SEQNO.CssClass = "readtxtbox";
                    this.txt_COLL_AMT.ReadOnly = true;//交易金額
                    this.txt_COLL_AMT.CssClass = "readtxtbox";
                    this.txt_REMAIN_AMT.ReadOnly = true;//沖帳餘額
                    this.txt_REMAIN_AMT.CssClass = "readtxtbox";
                    this.slp_CHARGE.ReadOnly = true;//手續費
                    this.slp_STORE_ID.ReadOnly = true;//客戶編號
                    this.txt_PAY_CHKNO.ReadOnly = true;//繳款識別碼
                    this.txt_PAY_CHKNO.CssClass = "readtxtbox";
                    this.slp_GROUP_NO.ReadOnly = true;//店群
                    this.txt_COLL_NO.ReadOnly = true;//收款單號
                    this.txt_COLL_NO.CssClass = "readtxtbox";
                }
            }

            #endregion

            #endregion
        }
    }
Example #3
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        try
        {
            if (this.hid_Page_Status.Value == "EDIT")
            {
                #region 檢查條件

                CAAModel.CAACommon CAAComm = new CAAModel.CAACommon();

                ArrayList arl_Check_Condition = Check_Condition("BUTTON [儲存]鈕,編輯狀態");

                #region 如果檢查有誤,則Return

                if (arl_Check_Condition[1].ToString() != string.Empty)
                {
                    #region 錯誤訊息

                    this.ErrorMsgLabel.Text = arl_Check_Condition[1].ToString();

                    #endregion

                    #region Focus欄位

                    if (arl_Check_Condition[0].ToString() != string.Empty)
                    {
                        string s_ScriptManager_Script = CAAComm.ToMakeUp_SetFocus_Script(arl_Check_Condition[0].ToString(), true);
                        ScriptManager.RegisterStartupScript(this.up_ErrorMsg, typeof(UpdatePanel), "CAA102", s_ScriptManager_Script, true);
                    }

                    #endregion

                    return;
                }

                #endregion

                #endregion

                if (this.slp_SAL_DATE.ReadOnly == false)
                {
                    //檢查該筆資料是否月結
                    if (CheckClose() == true)
                    {
                        this.ErrorMsgLabel.Text = "此營業日期已月結,故不允許修改!";
                        return;
                    }
                    //檢查該筆資料是否沖帳
                    if (CheckWASH_YN() == true) //"此代收已沖帳,不允許修改!"            
                    {
                        this.ErrorMsgLabel.Text = "此代收已沖帳,不允許修改!";
                        return;
                    }
                }

                CAAModel.MaintainCollRecord BCO = new CAAModel.MaintainCollRecord(ConntionDB);

                string strMsg = string.Empty;
                string strNowDate = DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss");
                string strID = dt.Rows[0]["ID"].ToString(); ;
                if (OnlyEditMemo() == false) //是否只更新MEMO欄位
                {
                    ParameterList.Clear();
                    ParameterList.Add(CAAComm.GetValueSetParameter(this.txt_COLL_NO.Text, "string", false)); //V_COLL_NO
                    ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_SAL_DATE.Text, "date", false)); //D_NEW_SAL_DATE
                    ParameterList.Add(CAAComm.GetValueSetParameter(this.txt_COLL_DATE.Text, "date", false)); //D_NEW_COLL_DATE
                    ParameterList.Add(CAAComm.GetValueSetParameter(this.txt_COLL_TIME.Text.Replace(":", ""), "string", false)); //V_NEW_COLL_TIME
                    ParameterList.Add(CAAComm.GetValueSetParameter(this.txt_COLL_SEQNO.Text, "string", false)); //V_NEW_COLL_SEQNO
                    ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_CHARGE.Text, "int", false)); //手續費
                    ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_STORE_ID.Text, "string", false)); //V_NEW_STORE_ID
                    ParameterList.Add(CAAComm.GetValueSetParameter(this.txt_PAY_CHKNO.Text, "string", false)); //V_NEW_PAY_CHKNO
                    ParameterList.Add(CAAComm.GetValueSetParameter(Session["UID"].ToString(), "string", false)); //V_NEW_UPDATEUID
                    ParameterList.Add(CAAComm.GetValueSetParameter(strNowDate, "datetime", false)); //D_NEW_UPDATEDATE
                    ParameterList.Add(CAAComm.GetValueSetParameter(dt.Rows[0]["CREATEUID"].ToString(), "string", false)); //V_OLD_CREATEUID
                    ParameterList.Add(CAAComm.GetValueSetParameter(dt.Rows[0]["CREATEDATE"].ToString(), "datetime", false)); //D_OLD_CREATEDATE
                    ParameterList.Add(CAAComm.GetValueSetParameter(dt.Rows[0]["UPDATEUID"].ToString(), "string", false)); //V_OLD_UPDATEUID
                    ParameterList.Add(CAAComm.GetValueSetParameter(dt.Rows[0]["UPDATEDATE"].ToString(), "datetime", false)); //D_OLD_UPDATEDATE
                    ParameterList.Add(CAAComm.GetValueSetParameter(this.txt_MEMO.Text, "string", false)); //V_MEMO

                    ArrayList aryUpd = BCO.UpdateCollRecord(ParameterList, null);

                    #region 組合跳轉頁面字串

                    string s_ADDLocation_Replace_String = string.Empty;

                    try
                    {
                        int i_Count = int.Parse(Request.QueryString["CAA102_COUNT"]);
                        string s_Request_Key = Request.QueryString["CAA102_PageTimeStamp"];

                        s_ADDLocation_Replace_String = "&CAA102_COUNT=" + i_Count.ToString() + "&CAA102_PageTimeStamp=" + s_Request_Key;
                    }
                    catch { s_ADDLocation_Replace_String = string.Empty; }

                    #endregion

                    if (aryUpd[1].ToString() == "1")
                    {
                        strMsg = "alert('儲存成功!');location.replace('CAA102.aspx?V_ID=" + strID + "&mode=VIEW&Code=CAA10" + s_ADDLocation_Replace_String + "');";
                    }
                    else
                    {
                        strMsg = "alert('" + aryUpd[0].ToString() + "');location.replace('CAA102.aspx?V_ID=" + strID + "&mode=VIEW&Code=CAA10" + s_ADDLocation_Replace_String + "');";
                    }
                    ScriptManager.RegisterStartupScript(this.btnSave, this.GetType(), "TO_CAA102.aspx", strMsg, true);

                }
                else
                {
                    ParameterList.Clear();
                    ParameterList.Add(CAAComm.GetValueSetParameter(this.txt_COLL_NO.Text, "string", false)); //V_COLL_NO                   
                    ParameterList.Add(CAAComm.GetValueSetParameter(Session["UID"].ToString(), "string", false)); //V_NEW_UPDATEUID
                    ParameterList.Add(CAAComm.GetValueSetParameter(strNowDate, "datetime", false)); //D_NEW_UPDATEDATE
                    ParameterList.Add(CAAComm.GetValueSetParameter(dt.Rows[0]["CREATEUID"].ToString(), "string", false)); //V_OLD_CREATEUID
                    ParameterList.Add(CAAComm.GetValueSetParameter(dt.Rows[0]["CREATEDATE"].ToString(), "datetime", false)); //D_OLD_CREATEDATE
                    ParameterList.Add(CAAComm.GetValueSetParameter(dt.Rows[0]["UPDATEUID"].ToString(), "string", false)); //V_OLD_UPDATEUID
                    ParameterList.Add(CAAComm.GetValueSetParameter(dt.Rows[0]["UPDATEDATE"].ToString(), "datetime", false)); //D_OLD_UPDATEDATE
                    ParameterList.Add(CAAComm.GetValueSetParameter(this.txt_MEMO.Text, "string", false)); //V_MEMO

                    BCO.UpdateMemo(ParameterList, null);

                    #region 組合跳轉頁面字串

                    string s_ADDLocation_Replace_String = string.Empty;

                    try
                    {
                        int i_Count = int.Parse(Request.QueryString["CAA102_COUNT"]);
                        string s_Request_Key = Request.QueryString["CAA102_PageTimeStamp"];

                        s_ADDLocation_Replace_String = "&CAA102_COUNT=" + i_Count.ToString() + "&CAA102_PageTimeStamp=" + s_Request_Key;
                    }
                    catch { s_ADDLocation_Replace_String = string.Empty; }

                    #endregion

                    strMsg = "alert('儲存成功!');location.replace('CAA102.aspx?V_ID=" + strID + "&mode=VIEW&Code=CAA10" + s_ADDLocation_Replace_String + "');";

                    ScriptManager.RegisterStartupScript(this.btnSave, this.GetType(), "TO_CAA102.aspx", strMsg, true);
                }

            }
        }
        catch (Exception ex)
        {
            WaringLogProcess(ex.Message);
            this.ErrorMsgLabel.Text = ex.Message;
        }
        finally { }
    }
Example #4
0
    private bool CheckWASH_YN() //檢查是否沖帳
    {
        bool bResult = false;
        if (this.hid_Page_Status.Value == "VIEW" || this.hid_Page_Status.Value == "EDIT")
        {
            string strCode = string.Empty;

            try
            {
                if (Request["V_ID"] == null)
                { throw new Exception("載入頁面失敗!"); }
                else
                { strCode = Request["V_ID"].ToString(); }
            }
            catch { }

            ParameterList.Clear();
            ParameterList.Add(strCode); //V_ID

            CAAModel.MaintainCollRecord BCO = new CAAModel.MaintainCollRecord(ConntionDB);
            dt = BCO.QueryCollRecordByFind(ParameterList);
            if (dt.Rows[0]["COLL_REMAIN_AMT"].ToString() != dt.Rows[0]["CHK_REMAIN_AMT"].ToString())
                bResult = true;
        }
        return bResult;
    }
Example #5
0
    /// <summary>
    /// 頁籤=通路繳款-專案代收 BUTTON [查詢]
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnQuery_Click(object sender, EventArgs e)
    {
        try
        {
            #region 設定變數

            BCO.CAACommon CAAComm = new BCO.CAACommon();

            #endregion

            #region 傳入參數

            ParameterList.Clear();
            ParameterList.Add(CAAComm.GetValueSetParameter(this.TextBoxRowCountLimit.Text, "int", false)); //N_ROWNUM
            if (this.chb_Like_Search.Checked == true)
            { ParameterList.Add("1"); }//勾選關鍵字搜尋
            else
            { ParameterList.Add("0"); }//沒有勾選關鍵字搜尋
            ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_SAL_DATE.StartDate, "string", false)); //V_SAL_DATE_S
            ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_SAL_DATE.EndDate, "string", false)); //V_SAL_DATE_E
            ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_COLL_DATE.StartDate, "string", false)); //V_COLL_DATE_S
            ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_COLL_DATE.EndDate, "string", false)); //V_COLL_DATE_E
            ParameterList.Add(CAAComm.GetValueSetParameter(this.txt_COLL_SEQNO_B.Text, "string", false)); //V_COLL_SEQNO_S
            ParameterList.Add(CAAComm.GetValueSetParameter(this.txt_COLL_SEQNO_E.Text, "string", false)); //V_COLL_SEQNO_E
            ParameterList.Add(GetValueSetOP(this.slp_COLL_AMT.Operator)); //V_COLL_AMT_OP
            ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_COLL_AMT.Text, "int", false)); //N_COLL_AMT
            ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_STORE_ID_B.Text, "string", false)); //V_STORE_S
            ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_STORE_ID_E.Text, "string", false)); //V_STORE_E
            ParameterList.Add(CAAComm.GetValueSetParameter(this.txt_PAY_CHKNO_B.Text, "string", false)); //V_PAT_CHKNO_S
            ParameterList.Add(CAAComm.GetValueSetParameter(this.txt_PAY_CHKNO_E.Text, "string", false)); //V_PAT_CHKNO_E
            ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_GROUP_NO_B.Text, "string", false)); //V_GROUP_S
            ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_GROUP_NO_E.Text, "string", false)); //V_GROUP_E
            ParameterList.Add(CAAComm.GetValueSetParameter(this.txt_COLL_NO_B.Text, "string", false)); //V_COLL_NO_S
            ParameterList.Add(CAAComm.GetValueSetParameter(this.txt_COLL_NO_E.Text, "string", false)); //V_COLL_NO_E
            ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_CREATEDATE.StartDate, "string", false)); //V_CREATEDATE_S
            ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_CREATEDATE.EndDate, "string", false)); //V_CREATEDATE_E
            ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_CREATEUID.Text, "string", false)); //V_CREATEUID
            ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_UPDATEDATE.StartDate, "string", false)); //V_UPDATEDATE_S
            ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_UPDATEDATE.EndDate, "string", false)); //V_UPDATEDATE_E
            ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_UPDATEUID.Text, "string", false)); //V_UPDATEUID
            ParameterList.Add(GetValueSetOP(this.slp_REMAIN_AMT.Operator)); //V_REMAIN_AMT_OP
            ParameterList.Add(CAAComm.GetValueSetParameter(this.slp_REMAIN_AMT.Text, "int", false)); //N_REMAIN_AMT
            #endregion

            #region 連結資料庫

            DataTable dt = new DataTable();

            BCO.MaintainCollRecord CAA10 = new BCO.MaintainCollRecord(ConntionDB);
            dt = CAA10.QueryCollRecordByByLike(ParameterList);

            #endregion

            #region 資料與GridView繫結

            //抓取本頁初次登記的時間
            string SessionIDName = "CAA101_" + PageTimeStamp.Value;

            Session["SessionID"] = SessionIDName;
            Session[SessionIDName] = dt;
            gv_COLL.DataSource = dt;
            gv_COLL.PageSize = (TextBoxPagesize.Text == "") ? 10 : (int.Parse(TextBoxPagesize.Text) < 0) ? 10 : int.Parse(TextBoxPagesize.Text);
            gv_COLL.PageIndex = 0;
            gv_COLL.DataBind();

            #endregion

            #region 將Key值存到Session中

            ArrayList arl_Key = new ArrayList();
            foreach (DataRow drRow in dt.Rows)
            { arl_Key.Add(drRow["ID"].ToString()); }

            Session["CAA102_SortKey" + this.PageTimeStamp.Value] = arl_Key;

            #endregion

            #region 檢查回傳資料

            if (dt.Rows.Count == 0)
            { this.ErrorMsgLabel.Text = "查無資料"; }

            #endregion
        }
        catch (Exception ex)
        {
            WaringLogProcess(ex.Message);
            this.ErrorMsgLabel.Text = ex.Message;
        }
    }