Exemplo n.º 1
0
    /// <summary>
    /// 檢查條件
    /// </summary>
    /// <param name="s_Type"></param>
    /// <returns></returns>
    private ArrayList Check_Condition()
    {
        #region 宣告

        BCO.ITMCommon ITMComm = new BCO.ITMCommon();
        ArrayList arl_Return = new ArrayList();
        arl_Return.Add(string.Empty);//該欄位放Focus欄位之ClientID
        arl_Return.Add(string.Empty);//該欄位放錯誤訊息

        #endregion

        #region SLP轉型

        TextBox txt_MDC_END_DATE = (TextBox)this.slp_MDC_END_DATE.FindControl("TextBoxCode"); //DC結束日
        TextBox txt_PERIOD_END_DATE = (TextBox)this.slp_PERIOD_END_DATE.FindControl("TextBoxCode"); //期別結束日
        TextBox txt_EFFECTIVE_DATE = (TextBox)this.slp_EFFECTIVE_DATE.FindControl("TextBoxCode"); //通路生效日
        TextBox txt_CHAN_END_DATE = (TextBox)this.slp_CHAN_END_DATE.FindControl("TextBoxCode"); //通路結束日
        TextBox txt_NOTICE_RETURN_DATE = (TextBox)this.slp_NOTICE_RETURN_DATE.FindControl("TextBoxCode"); //退貨通知日
        TextBox txt_PLAN_RETURN_DATE = (TextBox)this.slp_PLAN_RETURN_DATE.FindControl("TextBoxCode"); //首次預退日
        TextBox txt_RTN_DDL = (TextBox)this.slp_RTN_DDL.FindControl("TextBoxCode"); //退書截止日

        #endregion

        #region 檢查欄位的Byte長度

        if (ITMComm.Get_Byte_Length(this.txt_ITEM_NAME.Text) > 30)
        { arl_Return = ITMComm.ToMakeUp_Err_ArrayList(arl_Return, "欄位[品名]長度不可大於 30 Byte", "1", this.txt_ITEM_NAME.ClientID); }

        if (ITMComm.Get_Byte_Length(this.txt_EDIT_REASON.Text) > 50)
        { arl_Return = ITMComm.ToMakeUp_Err_ArrayList(arl_Return, "欄位[異動原因]長度不可大於 50 Byte", "1", this.txt_EDIT_REASON.ClientID); }

        #endregion

        #region 檢查SLP日期格式

        arl_Return = ITMComm.Check_Format_Date(this.slp_MDC_END_DATE.Text, "欄位[DC結束日]日期格式錯誤", "1", txt_MDC_END_DATE.ClientID, arl_Return);
        arl_Return = ITMComm.Check_Format_Date(this.slp_PERIOD_END_DATE.Text, "欄位[期別結束日]日期格式錯誤", "1", txt_PERIOD_END_DATE.ClientID, arl_Return);
        arl_Return = ITMComm.Check_Format_Date(this.slp_EFFECTIVE_DATE.Text, "欄位[通路生效日]日期格式錯誤", "1", txt_EFFECTIVE_DATE.ClientID, arl_Return);
        arl_Return = ITMComm.Check_Format_Date(this.slp_CHAN_END_DATE.Text, "欄位[通路結束日]日期格式錯誤", "1", txt_CHAN_END_DATE.ClientID, arl_Return);
        arl_Return = ITMComm.Check_Format_Date(this.slp_NOTICE_RETURN_DATE.Text, "欄位[退貨通知日]日期格式錯誤", "1", txt_NOTICE_RETURN_DATE.ClientID, arl_Return);
        arl_Return = ITMComm.Check_Format_Date(this.slp_PLAN_RETURN_DATE.Text, "欄位[首次預退日]日期格式錯誤", "1", txt_PLAN_RETURN_DATE.ClientID, arl_Return);
        arl_Return = ITMComm.Check_Format_Date(this.slp_RTN_DDL.Text, "欄位[退書截止日]日期格式錯誤", "1", txt_RTN_DDL.ClientID, arl_Return);

        #endregion

        #region 檢查必填欄位(除了欄位[品名][DC結束日]外,如果其他欄位有值才做以下檢查)

        if ((this.slp_PERIOD_END_DATE.Text.Trim() == string.Empty &&//期別結束日
            this.slp_EFFECTIVE_DATE.Text.Trim() == string.Empty &&//通路生效日
            this.slp_CHAN_END_DATE.Text.Trim() == string.Empty &&//通路結束日
            this.slp_NOTICE_RETURN_DATE.Text.Trim() == string.Empty &&//退貨通知日
            this.slp_PLAN_RETURN_DATE.Text.Trim() == string.Empty &&//首次預退日
            this.slp_RTN_DDL.Text.Trim() == string.Empty)//退書截止日
            == false)
        {
            //欄位[品號][期別(起)][期別(迄)],每一行的資料只要三個欄位其中一個有值,則其他兩個皆為必填欄位

            if (this.slp_ITEM_1.Text != string.Empty ||
                this.slp_PERIOD_B_1.Text != string.Empty ||
                this.slp_PERIOD_E_1.Text != string.Empty)
            {
                arl_Return = ITMComm.Check_MustFillin_Column(this.slp_ITEM_1.Text, "text", "欄位[序號(1)品號]為必填欄位", "1", this.slp_ITEM_1.TextBox_Code.ClientID, arl_Return);
                arl_Return = ITMComm.Check_MustFillin_Column(this.slp_PERIOD_B_1.Text, "text", "欄位[序號(1)期別(起)]為必填欄位", "1", this.slp_PERIOD_B_1.TextBox_Code.ClientID, arl_Return);
                arl_Return = ITMComm.Check_MustFillin_Column(this.slp_PERIOD_E_1.Text, "text", "欄位[序號(1)期別(迄)]為必填欄位", "1", this.slp_PERIOD_E_1.TextBox_Code.ClientID, arl_Return);
            }
            if (this.slp_ITEM_2.Text != string.Empty ||
                this.slp_PERIOD_B_2.Text != string.Empty ||
                this.slp_PERIOD_E_2.Text != string.Empty)
            {
                arl_Return = ITMComm.Check_MustFillin_Column(this.slp_ITEM_2.Text, "text", "欄位[序號(2)品號]為必填欄位", "1", this.slp_ITEM_2.TextBox_Code.ClientID, arl_Return);
                arl_Return = ITMComm.Check_MustFillin_Column(this.slp_PERIOD_B_2.Text, "text", "欄位[序號(2)期別(起)]為必填欄位", "1", this.slp_PERIOD_B_2.TextBox_Code.ClientID, arl_Return);
                arl_Return = ITMComm.Check_MustFillin_Column(this.slp_PERIOD_E_2.Text, "text", "欄位[序號(2)期別(迄)]為必填欄位", "1", this.slp_PERIOD_E_2.TextBox_Code.ClientID, arl_Return);
            }

            if (this.slp_ITEM_3.Text != string.Empty ||
                this.slp_PERIOD_B_3.Text != string.Empty ||
                this.slp_PERIOD_E_3.Text != string.Empty)
            {
                arl_Return = ITMComm.Check_MustFillin_Column(this.slp_ITEM_3.Text, "text", "欄位[序號(3)品號]為必填欄位", "1", this.slp_ITEM_3.TextBox_Code.ClientID, arl_Return);
                arl_Return = ITMComm.Check_MustFillin_Column(this.slp_PERIOD_B_3.Text, "text", "欄位[序號(3)期別(起)]為必填欄位", "1", this.slp_PERIOD_B_3.TextBox_Code.ClientID, arl_Return);
                arl_Return = ITMComm.Check_MustFillin_Column(this.slp_PERIOD_E_3.Text, "text", "欄位[序號(3)期別(迄)]為必填欄位", "1", this.slp_PERIOD_E_3.TextBox_Code.ClientID, arl_Return);
            }

            if (this.slp_ITEM_4.Text != string.Empty ||
                this.slp_PERIOD_B_4.Text != string.Empty ||
                this.slp_PERIOD_E_4.Text != string.Empty)
            {
                arl_Return = ITMComm.Check_MustFillin_Column(this.slp_ITEM_4.Text, "text", "欄位[序號(4)品號]為必填欄位", "1", this.slp_ITEM_4.TextBox_Code.ClientID, arl_Return);
                arl_Return = ITMComm.Check_MustFillin_Column(this.slp_PERIOD_B_4.Text, "text", "欄位[序號(4)期別(起)]為必填欄位", "1", this.slp_PERIOD_B_4.TextBox_Code.ClientID, arl_Return);
                arl_Return = ITMComm.Check_MustFillin_Column(this.slp_PERIOD_E_4.Text, "text", "欄位[序號(4)期別(迄)]為必填欄位", "1", this.slp_PERIOD_E_4.TextBox_Code.ClientID, arl_Return);
            }

            if (this.slp_ITEM_5.Text != string.Empty ||
                this.slp_PERIOD_B_5.Text != string.Empty ||
                this.slp_PERIOD_E_5.Text != string.Empty)
            {
                arl_Return = ITMComm.Check_MustFillin_Column(this.slp_ITEM_5.Text, "text", "欄位[序號(5)品號]為必填欄位", "1", this.slp_ITEM_5.TextBox_Code.ClientID, arl_Return);
                arl_Return = ITMComm.Check_MustFillin_Column(this.slp_PERIOD_B_5.Text, "text", "欄位[序號(5)期別(起)]為必填欄位", "1", this.slp_PERIOD_B_5.TextBox_Code.ClientID, arl_Return);
                arl_Return = ITMComm.Check_MustFillin_Column(this.slp_PERIOD_E_5.Text, "text", "欄位[序號(5)期別(迄)]為必填欄位", "1", this.slp_PERIOD_E_5.TextBox_Code.ClientID, arl_Return);
            }

            if (this.slp_ITEM_6.Text != string.Empty ||
                this.slp_PERIOD_B_6.Text != string.Empty ||
                this.slp_PERIOD_E_6.Text != string.Empty)
            {
                arl_Return = ITMComm.Check_MustFillin_Column(this.slp_ITEM_6.Text, "text", "欄位[序號(6)品號]為必填欄位", "1", this.slp_ITEM_6.TextBox_Code.ClientID, arl_Return);
                arl_Return = ITMComm.Check_MustFillin_Column(this.slp_PERIOD_B_6.Text, "text", "欄位[序號(6)期別(起)]為必填欄位", "1", this.slp_PERIOD_B_6.TextBox_Code.ClientID, arl_Return);
                arl_Return = ITMComm.Check_MustFillin_Column(this.slp_PERIOD_E_6.Text, "text", "欄位[序號(6)期別(迄)]為必填欄位", "1", this.slp_PERIOD_E_6.TextBox_Code.ClientID, arl_Return);
            }

            if (this.slp_ITEM_7.Text != string.Empty ||
                this.slp_PERIOD_B_7.Text != string.Empty ||
                this.slp_PERIOD_E_7.Text != string.Empty)
            {
                arl_Return = ITMComm.Check_MustFillin_Column(this.slp_ITEM_7.Text, "text", "欄位[序號(7)品號]為必填欄位", "1", this.slp_ITEM_7.TextBox_Code.ClientID, arl_Return);
                arl_Return = ITMComm.Check_MustFillin_Column(this.slp_PERIOD_B_7.Text, "text", "欄位[序號(7)期別(起)]為必填欄位", "1", this.slp_PERIOD_B_7.TextBox_Code.ClientID, arl_Return);
                arl_Return = ITMComm.Check_MustFillin_Column(this.slp_PERIOD_E_7.Text, "text", "欄位[序號(7)期別(迄)]為必填欄位", "1", this.slp_PERIOD_E_7.TextBox_Code.ClientID, arl_Return);
            }
            if (this.slp_ITEM_8.Text != string.Empty ||
                this.slp_PERIOD_B_8.Text != string.Empty ||
                this.slp_PERIOD_E_8.Text != string.Empty)
            {
                arl_Return = ITMComm.Check_MustFillin_Column(this.slp_ITEM_8.Text, "text", "欄位[序號(8)品號]為必填欄位", "1", this.slp_ITEM_8.TextBox_Code.ClientID, arl_Return);
                arl_Return = ITMComm.Check_MustFillin_Column(this.slp_PERIOD_B_8.Text, "text", "欄位[序號(8)期別(起)]為必填欄位", "1", this.slp_PERIOD_B_8.TextBox_Code.ClientID, arl_Return);
                arl_Return = ITMComm.Check_MustFillin_Column(this.slp_PERIOD_E_8.Text, "text", "欄位[序號(8)期別(迄)]為必填欄位", "1", this.slp_PERIOD_E_8.TextBox_Code.ClientID, arl_Return);
            }
            if (this.slp_ITEM_9.Text != string.Empty ||
                this.slp_PERIOD_B_9.Text != string.Empty ||
                this.slp_PERIOD_E_9.Text != string.Empty)
            {
                arl_Return = ITMComm.Check_MustFillin_Column(this.slp_ITEM_9.Text, "text", "欄位[序號(9)品號]為必填欄位", "1", this.slp_ITEM_9.TextBox_Code.ClientID, arl_Return);
                arl_Return = ITMComm.Check_MustFillin_Column(this.slp_PERIOD_B_9.Text, "text", "欄位[序號(9)期別(起)]為必填欄位", "1", this.slp_PERIOD_B_9.TextBox_Code.ClientID, arl_Return);
                arl_Return = ITMComm.Check_MustFillin_Column(this.slp_PERIOD_E_9.Text, "text", "欄位[序號(9)期別(迄)]為必填欄位", "1", this.slp_PERIOD_E_9.TextBox_Code.ClientID, arl_Return);
            }
            if (this.slp_ITEM_10.Text != string.Empty ||
                this.slp_PERIOD_B_10.Text != string.Empty ||
                this.slp_PERIOD_E_10.Text != string.Empty)
            {
                arl_Return = ITMComm.Check_MustFillin_Column(this.slp_ITEM_10.Text, "text", "欄位[序號(10)品號]為必填欄位", "1", this.slp_ITEM_10.TextBox_Code.ClientID, arl_Return);
                arl_Return = ITMComm.Check_MustFillin_Column(this.slp_PERIOD_B_10.Text, "text", "欄位[序號(10)期別(起)]為必填欄位", "1", this.slp_PERIOD_B_10.TextBox_Code.ClientID, arl_Return);
                arl_Return = ITMComm.Check_MustFillin_Column(this.slp_PERIOD_E_10.Text, "text", "欄位[序號(10)期別(迄)]為必填欄位", "1", this.slp_PERIOD_E_10.TextBox_Code.ClientID, arl_Return);
            }
        }

        #endregion

        #region 如果基本檢查有誤,則Return

        if (arl_Return[1].ToString() != string.Empty)
        { return arl_Return; }

        #endregion

        #region 檢查Between欄位

        #region 欄位[期別]_1

        if (this.slp_PERIOD_B_1.Text != string.Empty ||
            this.slp_PERIOD_E_1.Text != string.Empty)
        {
            #region 檢查Between欄位如果輸入其中一個欄位則另一個欄位也必須填值

            arl_Return = ITMComm.Check_Between_BeginEnd_Value
                (this.slp_PERIOD_B_1.Text,
                 this.slp_PERIOD_E_1.Text,
                 "(序號1)期別",
                 "1",
                 this.slp_PERIOD_B_1.TextBox_Code.ClientID,
                 this.slp_PERIOD_E_1.TextBox_Code.ClientID,
                 arl_Return);

            #endregion

            #region 檢查Between欄位結束欄位一定要大於或等於開始欄位

            arl_Return = ITMComm.Check_Between_End_GreaterThan_Begin
                (this.slp_PERIOD_B_1.Text,
                 this.slp_PERIOD_E_1.Text,
                 "string",
                 "欄位[(序號1)期別(迄)]一定要大於或等於欄位[(序號1)期別(起)]",
                 "1",
                 this.slp_PERIOD_E_1.TextBox_Code.ClientID,
                 arl_Return);

            #endregion
        }

        #endregion

        #region 欄位[期別]_2

        if (this.slp_PERIOD_B_2.Text != string.Empty ||
            this.slp_PERIOD_E_2.Text != string.Empty)
        {
            #region 檢查Between欄位如果輸入其中一個欄位則另一個欄位也必須填值

            arl_Return = ITMComm.Check_Between_BeginEnd_Value
                (this.slp_PERIOD_B_2.Text,
                 this.slp_PERIOD_E_2.Text,
                 "(序號2)期別",
                 "1",
                 this.slp_PERIOD_B_2.TextBox_Code.ClientID,
                 this.slp_PERIOD_E_2.TextBox_Code.ClientID,
                 arl_Return);

            #endregion

            #region 檢查Between欄位結束欄位一定要大於或等於開始欄位

            arl_Return = ITMComm.Check_Between_End_GreaterThan_Begin
                (this.slp_PERIOD_B_2.Text,
                 this.slp_PERIOD_E_2.Text,
                 "string",
                 "欄位[(序號2)期別(迄)]一定要大於或等於欄位[(序號2)期別(起)]",
                 "1",
                 this.slp_PERIOD_E_2.TextBox_Code.ClientID,
                 arl_Return);

            #endregion
        }

        #endregion

        #region 欄位[期別]_3

        if (this.slp_PERIOD_B_3.Text != string.Empty ||
            this.slp_PERIOD_E_3.Text != string.Empty)
        {
            #region 檢查Between欄位如果輸入其中一個欄位則另一個欄位也必須填值

            arl_Return = ITMComm.Check_Between_BeginEnd_Value
                (this.slp_PERIOD_B_3.Text,
                 this.slp_PERIOD_E_3.Text,
                 "(序號3)期別",
                 "1",
                 this.slp_PERIOD_B_3.TextBox_Code.ClientID,
                 this.slp_PERIOD_E_3.TextBox_Code.ClientID,
                 arl_Return);

            #endregion

            #region 檢查Between欄位結束欄位一定要大於或等於開始欄位

            arl_Return = ITMComm.Check_Between_End_GreaterThan_Begin
                (this.slp_PERIOD_B_3.Text,
                 this.slp_PERIOD_E_3.Text,
                 "string",
                 "欄位[(序號3)期別(迄)]一定要大於或等於欄位[(序號3)期別(起)]",
                 "1",
                 this.slp_PERIOD_E_3.TextBox_Code.ClientID,
                 arl_Return);

            #endregion
        }

        #endregion

        #region 欄位[期別]_4

        if (this.slp_PERIOD_B_4.Text != string.Empty ||
            this.slp_PERIOD_E_4.Text != string.Empty)
        {
            #region 檢查Between欄位如果輸入其中一個欄位則另一個欄位也必須填值

            arl_Return = ITMComm.Check_Between_BeginEnd_Value
                (this.slp_PERIOD_B_4.Text,
                 this.slp_PERIOD_E_4.Text,
                 "(序號4)期別",
                 "1",
                 this.slp_PERIOD_B_4.TextBox_Code.ClientID,
                 this.slp_PERIOD_E_4.TextBox_Code.ClientID,
                 arl_Return);

            #endregion

            #region 檢查Between欄位結束欄位一定要大於或等於開始欄位

            arl_Return = ITMComm.Check_Between_End_GreaterThan_Begin
                (this.slp_PERIOD_B_4.Text,
                 this.slp_PERIOD_E_4.Text,
                 "string",
                 "欄位[(序號4)期別(迄)]一定要大於或等於欄位[(序號4)期別(起)]",
                 "1",
                 this.slp_PERIOD_E_4.TextBox_Code.ClientID,
                 arl_Return);

            #endregion
        }

        #endregion

        #region 欄位[期別]_5

        if (this.slp_PERIOD_B_5.Text != string.Empty ||
            this.slp_PERIOD_E_5.Text != string.Empty)
        {
            #region 檢查Between欄位如果輸入其中一個欄位則另一個欄位也必須填值

            arl_Return = ITMComm.Check_Between_BeginEnd_Value
                (this.slp_PERIOD_B_5.Text,
                 this.slp_PERIOD_E_5.Text,
                 "(序號5)期別",
                 "1",
                 this.slp_PERIOD_B_5.TextBox_Code.ClientID,
                 this.slp_PERIOD_E_5.TextBox_Code.ClientID,
                 arl_Return);

            #endregion

            #region 檢查Between欄位結束欄位一定要大於或等於開始欄位

            arl_Return = ITMComm.Check_Between_End_GreaterThan_Begin
                (this.slp_PERIOD_B_5.Text,
                 this.slp_PERIOD_E_5.Text,
                 "string",
                 "欄位[(序號5)期別(迄)]一定要大於或等於欄位[(序號5)期別(起)]",
                 "1",
                 this.slp_PERIOD_E_5.TextBox_Code.ClientID,
                 arl_Return);

            #endregion
        }

        #endregion

        #region 欄位[期別]_6

        if (this.slp_PERIOD_B_6.Text != string.Empty ||
            this.slp_PERIOD_E_6.Text != string.Empty)
        {
            #region 檢查Between欄位如果輸入其中一個欄位則另一個欄位也必須填值

            arl_Return = ITMComm.Check_Between_BeginEnd_Value
                (this.slp_PERIOD_B_6.Text,
                 this.slp_PERIOD_E_6.Text,
                 "(序號6)期別",
                 "1",
                 this.slp_PERIOD_B_6.TextBox_Code.ClientID,
                 this.slp_PERIOD_E_6.TextBox_Code.ClientID,
                 arl_Return);

            #endregion

            #region 檢查Between欄位結束欄位一定要大於或等於開始欄位

            arl_Return = ITMComm.Check_Between_End_GreaterThan_Begin
                (this.slp_PERIOD_B_6.Text,
                 this.slp_PERIOD_E_6.Text,
                 "string",
                 "欄位[(序號6)期別(迄)]一定要大於或等於欄位[(序號6)期別(起)]",
                 "1",
                 this.slp_PERIOD_E_6.TextBox_Code.ClientID,
                 arl_Return);

            #endregion
        }

        #endregion

        #region 欄位[期別]_7

        if (this.slp_PERIOD_B_7.Text != string.Empty ||
            this.slp_PERIOD_E_7.Text != string.Empty)
        {
            #region 檢查Between欄位如果輸入其中一個欄位則另一個欄位也必須填值

            arl_Return = ITMComm.Check_Between_BeginEnd_Value
                (this.slp_PERIOD_B_7.Text,
                 this.slp_PERIOD_E_7.Text,
                 "(序號7)期別",
                 "1",
                 this.slp_PERIOD_B_7.TextBox_Code.ClientID,
                 this.slp_PERIOD_E_7.TextBox_Code.ClientID,
                 arl_Return);

            #endregion

            #region 檢查Between欄位結束欄位一定要大於或等於開始欄位

            arl_Return = ITMComm.Check_Between_End_GreaterThan_Begin
                (this.slp_PERIOD_B_7.Text,
                 this.slp_PERIOD_E_7.Text,
                 "string",
                 "欄位[(序號7)期別(迄)]一定要大於或等於欄位[(序號7)期別(起)]",
                 "1",
                 this.slp_PERIOD_E_7.TextBox_Code.ClientID,
                 arl_Return);

            #endregion
        }

        #endregion

        #region 欄位[期別]_8

        if (this.slp_PERIOD_B_8.Text != string.Empty ||
            this.slp_PERIOD_E_8.Text != string.Empty)
        {
            #region 檢查Between欄位如果輸入其中一個欄位則另一個欄位也必須填值

            arl_Return = ITMComm.Check_Between_BeginEnd_Value
                (this.slp_PERIOD_B_8.Text,
                 this.slp_PERIOD_E_8.Text,
                 "(序號8)期別",
                 "1",
                 this.slp_PERIOD_B_8.TextBox_Code.ClientID,
                 this.slp_PERIOD_E_8.TextBox_Code.ClientID,
                 arl_Return);

            #endregion

            #region 檢查Between欄位結束欄位一定要大於或等於開始欄位

            arl_Return = ITMComm.Check_Between_End_GreaterThan_Begin
                (this.slp_PERIOD_B_8.Text,
                 this.slp_PERIOD_E_8.Text,
                 "string",
                 "欄位[(序號8)期別(迄)]一定要大於或等於欄位[(序號8)期別(起)]",
                 "1",
                 this.slp_PERIOD_E_8.TextBox_Code.ClientID,
                 arl_Return);

            #endregion
        }

        #endregion

        #region 欄位[期別]_9

        if (this.slp_PERIOD_B_9.Text != string.Empty ||
            this.slp_PERIOD_E_9.Text != string.Empty)
        {
            #region 檢查Between欄位如果輸入其中一個欄位則另一個欄位也必須填值

            arl_Return = ITMComm.Check_Between_BeginEnd_Value
                (this.slp_PERIOD_B_9.Text,
                 this.slp_PERIOD_E_9.Text,
                 "(序號9)期別",
                 "1",
                 this.slp_PERIOD_B_9.TextBox_Code.ClientID,
                 this.slp_PERIOD_E_9.TextBox_Code.ClientID,
                 arl_Return);

            #endregion

            #region 檢查Between欄位結束欄位一定要大於或等於開始欄位

            arl_Return = ITMComm.Check_Between_End_GreaterThan_Begin
                (this.slp_PERIOD_B_9.Text,
                 this.slp_PERIOD_E_9.Text,
                 "string",
                 "欄位[(序號9)期別(迄)]一定要大於或等於欄位[(序號9)期別(起)]",
                 "1",
                 this.slp_PERIOD_E_9.TextBox_Code.ClientID,
                 arl_Return);

            #endregion
        }

        #endregion

        #region 欄位[期別]_10

        if (this.slp_PERIOD_B_10.Text != string.Empty ||
            this.slp_PERIOD_E_10.Text != string.Empty)
        {
            #region 檢查Between欄位如果輸入其中一個欄位則另一個欄位也必須填值

            arl_Return = ITMComm.Check_Between_BeginEnd_Value
                (this.slp_PERIOD_B_10.Text,
                 this.slp_PERIOD_E_10.Text,
                 "(序號10)期別",
                 "1",
                 this.slp_PERIOD_B_10.TextBox_Code.ClientID,
                 this.slp_PERIOD_E_10.TextBox_Code.ClientID,
                 arl_Return);

            #endregion

            #region 檢查Between欄位結束欄位一定要大於或等於開始欄位

            arl_Return = ITMComm.Check_Between_End_GreaterThan_Begin
                (this.slp_PERIOD_B_10.Text,
                 this.slp_PERIOD_E_10.Text,
                 "string",
                 "欄位[(序號10)期別(迄)]一定要大於或等於欄位[(序號10)期別(起)]",
                 "1",
                 this.slp_PERIOD_E_10.TextBox_Code.ClientID,
                 arl_Return);

            #endregion
        }

        #endregion

        #endregion

        #region 自訂檢查

        #region 檢查是否至少填一組修改條件

        if (this.txt_ITEM_NAME.Text.Trim() == string.Empty &&//品名
           this.slp_MDC_END_DATE.Text.Trim() == string.Empty &&//DC結束日
           this.slp_PERIOD_END_DATE.Text.Trim() == string.Empty &&//期別結束日
           this.slp_EFFECTIVE_DATE.Text.Trim() == string.Empty &&//通路生效日
           this.slp_CHAN_END_DATE.Text.Trim() == string.Empty &&//通路結束日
           this.slp_NOTICE_RETURN_DATE.Text.Trim() == string.Empty &&//退貨通知日
           this.slp_PLAN_RETURN_DATE.Text.Trim() == string.Empty &&//首次預退日
           this.slp_RTN_DDL.Text.Trim() == string.Empty &&//退書截止日
           this.txt_EDIT_REASON.Text.Trim() == string.Empty)//異動原因
        { arl_Return = ITMComm.ToMakeUp_Err_ArrayList(arl_Return, "至少填一組修改條件", "1", this.txt_ITEM_NAME.ClientID); }

        #endregion

        #region 檢查是否至少填一組品號

        string s_Check_FileName = string.Empty;
        string s_Check_ITEM = string.Empty;

        for (int i = 1; i <= 10; i++)
        {
            s_Check_FileName = "slp_ITEM_" + i.ToString();
            s_Check_ITEM += ((ASP.itm_slp_slp_sku_ascx)this.table1.FindControl(s_Check_FileName)).Text.Trim();
        }

        if (s_Check_ITEM == string.Empty)
        { arl_Return = ITMComm.ToMakeUp_Err_ArrayList(arl_Return, "至少填一組品號條件", "1", this.slp_ITEM_1.TextBox_Code.ClientID); }

        #endregion

        #endregion

        return arl_Return;
    }