예제 #1
0
        //*******************************************************************
        /// <summary>起動時刻編集入力チェック </summary>
        /// <returns>チェック結果</returns>
        //*******************************************************************
        private bool InputCheck(String bootTime)
        {
            if (CheckUtil.IsNullOrEmpty(bootTime))
            {
                return(false);
            }
            if (CheckUtil.IsLenOver(bootTime, 4))
            {
                return(false);
            }
            if (CheckUtil.IsLenUnder(bootTime, 3))
            {
                return(false);
            }
            if (!CheckUtil.IsHankakuNum(bootTime))
            {
                return(false);
            }

            // 起動時刻分を取得
            string bootTimeMI;

            if (bootTime.Length > 3)
            {
                bootTimeMI = bootTime.Substring(2, 2);
            }
            else
            {
                bootTimeMI = bootTime.Substring(1, 2);
            }

            int iMI = int.Parse(bootTimeMI);

            if (iMI < 0 || iMI > 59)
            {
                return(false);
            }

            return(true);
        }
예제 #2
0
        /// <summary> 各項目のチェック処理(登録)</summary>
        private bool InputCheck()
        {
            // ジョブID
            string jobIdForChange = Properties.Resources.err_message_job_id;
            String jobId          = txtJobId.Text;

            // 未入力の場合
            if (CheckUtil.IsNullOrEmpty(jobId))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_001,
                                             new string[] { jobIdForChange });
                return(false);
            }
            // バイト数チェック
            if (CheckUtil.IsLenOver(jobId, 32))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_003,
                                             new string[] { jobIdForChange, "32" });
                return(false);
            }
            // 半角英数値、「-」、「_」チェック
            if (!CheckUtil.IsHankakuStrAndHyphenAndUnderbar(jobId))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_013,
                                             new string[] { jobIdForChange });
                return(false);
            }
            // 予約語(START)チェック
            if (CheckUtil.IsHoldStrSTART(jobId))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_JOBEDIT_001);
                return(false);
            }
            // すでに登録済みの場合
            DataRow[] rowJob = _myJob.Container.JobControlTable.Select("job_id='" + jobId + "'");
            if (rowJob != null && rowJob.Length > 0)
            {
                foreach (DataRow row in rowJob)
                {
                    if (!jobId.Equals(_oldJobId) && jobId.Equals(row["job_id"]))
                    {
                        CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_004,
                                                     new string[] { jobIdForChange });
                        return(false);
                    }
                }
            }

            // ジョブ名
            string jobNameForChange = Properties.Resources.err_message_job_name;
            String jobName          = txtJobName.Text;

            // バイト数チェック
            if (CheckUtil.IsLenOver(jobName, 64))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_003,
                                             new string[] { jobNameForChange, "64" });
                return(false);
            }

            // 入力不可文字「"'\,」チェック
            if (CheckUtil.IsImpossibleStr(jobName))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_025,
                                             new string[] { jobNameForChange });
                return(false);
            }

            // ホスト(変数名)
            if (rbVariableName.IsChecked == true)
            {
                string hostValueNameForChange = Properties.Resources.err_message_host_value_name;
                string hostValueName          = Convert.ToString(textVariableName.Text);
                // 未入力の場合
                if (CheckUtil.IsNullOrEmpty(hostValueName))
                {
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_001,
                                                 new string[] { hostValueNameForChange });
                    return(false);
                }
                // バイト数チェック
                if (CheckUtil.IsLenOver(hostValueName, 128))
                {
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_003,
                                                 new string[] { hostValueNameForChange, "128" });
                    return(false);
                }
                // 半角英数値、アンダーバー、最初文字数値以外チェック
                if (!CheckUtil.IsHankakuStrAndUnderbarAndFirstNotNum(hostValueName))
                {
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_015,
                                                 new string[] { hostValueNameForChange });
                    return(false);
                }
            }
            // ホスト名
            if (rbHostName.IsChecked == true)
            {
                string hostNameForChange = Properties.Resources.err_message_host_name;
                string hostName          = Convert.ToString(combHostName.SelectedValue);
                if (CheckUtil.IsNullOrEmpty(hostName))
                {
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_001,
                                                 new string[] { hostNameForChange });
                    return(false);
                }
            }

            // リブートモード
            if (rbWaitTime.IsChecked == true)
            {
                string waitTimeForChange = Properties.Resources.err_message_wait_time;
                string waitTime          = Convert.ToString(txtWaitTime.Text);
                // 未入力の場合
                if (CheckUtil.IsNullOrEmpty(waitTime))
                {
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_001,
                                                 new string[] { waitTimeForChange });
                    return(false);
                }
                // バイト数チェック
                if (CheckUtil.IsLenOver(waitTime, 4))
                {
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_003,
                                                 new string[] { waitTimeForChange, "4" });
                    return(false);
                }
                // 半角数値以外チェック
                if (!CheckUtil.IsHankakuNum(waitTime))
                {
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_007,
                                                 new string[] { waitTimeForChange });
                    return(false);
                }
            }

            //added by YAMA 2014/09/22
            // タイムアウト警告
            string timeOutForChange = Properties.Resources.err_message_timeout;
            string timeOut          = Convert.ToString(txtTimeOut.Text);

            // 未入力の場合
            if (CheckUtil.IsNullOrEmpty(timeOut))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_001,
                                             new string[] { timeOutForChange });
                return(false);
            }
            // 半角数字チェック
            if (!CheckUtil.IsHankakuNum(timeOut))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_007,
                                             new string[] { timeOutForChange });
                return(false);
            }
            // 桁数チェック
            if (CheckUtil.IsLenOver(timeOut, 5))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_003,
                                             new string[] { timeOutForChange, "5" });
                return(false);
            }


            return(true);
        }
예제 #3
0
        //*******************************************************************
        /// <summary>入力チェック </summary>
        /// <returns>チェック結果</returns>
        //*******************************************************************
        private bool InputCheck()
        {
            // フィルター名を取得
            string filterName = tbFilterName.Text.Trim();

            // フィルター名が未入力の場合
            if (CheckUtil.IsNullOrEmpty(filterName))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_001,
                                             new string[] { Properties.Resources.err_message_filter_name });
                return(false);
            }

            // バイト数>64の場合
            if (CheckUtil.IsLenOver(filterName, 64))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_003,
                                             new string[] { Properties.Resources.err_message_filter_name, "64" });
                return(false);
            }

            // 入力不可文字「"'\,」チェック
            if (CheckUtil.IsImpossibleStr(filterName))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_025,
                                             new string[] { Properties.Resources.err_message_filter_name });
                return(false);
            }

            // 説明のチェック
            string comment = tbComment.Text.Trim();

            if (CheckUtil.IsLenOver(comment, 100))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_003,
                                             new string[] { Properties.Resources.err_message_memo, "100" });
                return(false);
            }

            // 入力不可文字「"'\,」チェック
            if (CheckUtil.IsImpossibleStr(comment))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_025,
                                             new string[] { Properties.Resources.err_message_memo });
                return(false);
            }

            // カレンダーチェック
            object calendar = container.cmbCalendar.SelectedItem;

            if (calendar == null)
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_001,
                                             new string[] { Properties.Resources.err_message_calendar });
                return(false);
            }

            if (container.rbDesignatedDay.IsChecked == true)
            {
                // 指定日
                string designatedDay = container.tbDesignatedDay.Text.Trim();
                if (CheckUtil.IsNullOrEmpty(designatedDay))
                {
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_001,
                                                 new string[] { Properties.Resources.err_message_designated_day });
                    return(false);
                }

                if (!CheckUtil.IsHankakuNum(designatedDay))
                {
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_007,
                                                 new string[] { Properties.Resources.err_message_designated_day });
                    return(false);
                }

                int designatedDayNumber = Convert.ToInt16(designatedDay);
                if (designatedDayNumber < 1 || designatedDayNumber > 31)
                {
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_017,
                                                 new string[] { Properties.Resources.err_message_designated_day, "1", "31" });
                    return(false);
                }
            }

            // 移動日数
            object shiftDay = container.cmbShiftDay.SelectedItem;

            if (shiftDay == null)
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_001,
                                             new string[] { Properties.Resources.err_message_shift_day });
                return(false);
            }

            return(true);
        }
예제 #4
0
        /// <summary> 各項目のチェック処理</summary>
        private bool InputCheck()
        {
            // ジョブID
            string jobIdForChange = Properties.Resources.err_message_job_id;
            String jobId          = txtJobId.Text;

            // 未入力の場合
            if (CheckUtil.IsNullOrEmpty(jobId))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_001,
                                             new string[] { jobIdForChange });
                return(false);
            }
            // 桁数チェック
            if (CheckUtil.IsLenOver(jobId, 32))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_003,
                                             new string[] { jobIdForChange, "32" });
                return(false);
            }
            // 半角英数値、「-」、「_」チェック
            if (!CheckUtil.IsHankakuStrAndHyphenAndUnderbar(jobId))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_013,
                                             new string[] { jobIdForChange });
                return(false);
            }
            // 予約語(START)チェック
            if (CheckUtil.IsHoldStrSTART(jobId))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_JOBEDIT_001);
                return(false);
            }
            // すでに登録済みの場合
            DataRow[] rowJob =
                _myJob.Container.JobControlTable.Select("job_id='" + jobId + "'");
            if (rowJob != null && rowJob.Length > 0)
            {
                foreach (DataRow row in rowJob)
                {
                    if (!jobId.Equals(_oldJobId) && jobId.Equals(row["job_id"]))
                    {
                        CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_004,
                                                     new string[] { jobIdForChange });
                        return(false);
                    }
                }
            }

            // ジョブ名
            string jobNameForChange =
                Properties.Resources.err_message_job_name;
            String jobName = txtJobName.Text;

            // バイト数チェック
            if (CheckUtil.IsLenOver(jobName, 64))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_003,
                                             new string[] { jobNameForChange, "64" });
                return(false);
            }

            // 入力不可文字「"'\,」チェック
            if (CheckUtil.IsImpossibleStr(jobName))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_025,
                                             new string[] { jobNameForChange });
                return(false);
            }

            // 終了コード
            string endCodeForChange = Properties.Resources.err_message_exit_code;
            String endCode          = txtEndCode.Text;

            //added by YAMA 2014/09/30
            // 未入力チェック
            if (CheckUtil.IsNullOrEmpty(endCode))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_001,
                                             new string[] { endCodeForChange });
                return(false);
            }

            //added by YAMA 2014/09/30
            // 半角英数字、ドル記号、アンダーバー以外はエラー
            if (!CheckUtil.IsHankakuStrAndDollarAndUnderbar(endCode))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_END_SETTING_001,
                                             new string[] { endCodeForChange });
                return(false);
            }

            //added by YAMA 2014/09/30
            // 1文字目が半角英字の場合、エラー
            if (CheckUtil.IsHankakuLerrer(endCode.Substring(0, 1)))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_END_SETTING_001,
                                             new string[] { endCodeForChange });
                return(false);
            }

            //added by YAMA 2014/09/30
            // 1文字目が半角数値の場合、全て半角数値以外はエラー
            // 数値の範囲は0~255以外はエラー
            if (CheckUtil.IsHankakuNum(endCode.Substring(0, 1)))
            {
                if (CheckUtil.IsHankakuNum(endCode.Substring(1)))
                {
                    Int16 endCodeInt = Convert.ToInt16(endCode);
                    if (endCodeInt < 0 || endCodeInt > 255)
                    {
                        CommonDialog.ShowErrorDialog(Consts.ERROR_END_SETTING_001,
                                                     new string[] { endCodeForChange });
                        return(false);
                    }
                    else
                    {
                        return(true);
                    }
                }
                else
                {
                    CommonDialog.ShowErrorDialog(Consts.ERROR_END_SETTING_001,
                                                 new string[] { endCodeForChange });
                    return(false);
                }
            }

            //added by YAMA 2014/09/30
            // 1文字目が$の場合
            if (endCode.Substring(0, 1) == "$")
            {
                try
                {
                    // 2文字目は半角英字とアンダーバー以外はエラー、$のみもエラー
                    if (!CheckUtil.IsHankakuLerrerAndUnderbar(endCode.Substring(1, 1)))
                    {
                        CommonDialog.ShowErrorDialog(Consts.ERROR_END_SETTING_001,
                                                     new string[] { endCodeForChange });
                        return(false);
                    }
                    else
                    {
                        //3文字以降は半角英数字とアンダーバー以外はエラー
                        if (!CheckUtil.IsHankakuStrAndUnderbar(endCode.Substring(2)))
                        {
                            CommonDialog.ShowErrorDialog(Consts.ERROR_END_SETTING_001,
                                                         new string[] { endCodeForChange });
                            return(false);
                        }
                    }
                }
                catch (Exception e)
                {
                    CommonDialog.ShowErrorDialog(Consts.ERROR_END_SETTING_001,
                                                 new string[] { endCodeForChange });
                    return(false);
                }
            }
            else
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_END_SETTING_001,
                                             new string[] { endCodeForChange });
                return(false);
            }

            return(true);
        }
예제 #5
0
        /// <summary> 各項目のチェック処理(登録)</summary>
        private bool InputCheck()
        {
            // ジョブID
            string jobIdForChange = Properties.Resources.err_message_job_id;
            String jobId          = txtJobId.Text;

            // 未入力の場合
            if (CheckUtil.IsNullOrEmpty(jobId))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_001,
                                             new string[] { jobIdForChange });
                return(false);
            }
            // バイト数チェック
            if (CheckUtil.IsLenOver(jobId, 32))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_003,
                                             new string[] { jobIdForChange, "32" });
                return(false);
            }
            // 半角英数値、「-」、「_」チェック
            if (!CheckUtil.IsHankakuStrAndHyphenAndUnderbar(jobId))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_013,
                                             new string[] { jobIdForChange });
                return(false);
            }
            // 予約語(START)チェック
            if (CheckUtil.IsHoldStrSTART(jobId))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_JOBEDIT_001);
                return(false);
            }
            // すでに登録済みの場合
            DataRow[] rowJob = _myJob.Container.JobControlTable.Select("job_id='" + jobId + "'");
            if (rowJob != null && rowJob.Length > 0)
            {
                foreach (DataRow row in rowJob)
                {
                    if (!jobId.Equals(_oldJobId) && jobId.Equals(row["job_id"]))
                    {
                        CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_004,
                                                     new string[] { jobIdForChange });
                        return(false);
                    }
                }
            }

            // ジョブ名
            string jobNameForChange = Properties.Resources.err_message_job_name;
            String jobName          = txtJobName.Text;

            // バイト数チェック
            if (CheckUtil.IsLenOver(jobName, 64))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_003,
                                             new string[] { jobNameForChange, "64" });
                return(false);
            }

            // 入力不可文字「"'\,」チェック
            if (CheckUtil.IsImpossibleStr(jobName))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_025,
                                             new string[] { jobNameForChange });
                return(false);
            }

            // ホスト(変数名)
            if (rbVariableName.IsChecked == true)
            {
                string hostValueNameForChange = Properties.Resources.err_message_host_value_name;
                string hostValueName          = Convert.ToString(textVariableName.Text);
                // 未入力の場合
                if (CheckUtil.IsNullOrEmpty(hostValueName))
                {
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_001,
                                                 new string[] { hostValueNameForChange });
                    return(false);
                }
                // バイト数チェック
                if (CheckUtil.IsLenOver(hostValueName, 128))
                {
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_003,
                                                 new string[] { hostValueNameForChange, "128" });
                    return(false);
                }
                // 半角英数値、アンダーバー、最初文字数値以外チェック
                if (!CheckUtil.IsHankakuStrAndUnderbarAndFirstNotNum(hostValueName))
                {
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_015,
                                                 new string[] { hostValueNameForChange });
                    return(false);
                }
            }
            // ホスト名
            if (rbHostName.IsChecked == true)
            {
                string hostNameForChange = Properties.Resources.err_message_host_name;
                string hostName          = Convert.ToString(combHostName.SelectedValue);
                if (CheckUtil.IsNullOrEmpty(hostName))
                {
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_001,
                                                 new string[] { hostNameForChange });
                    return(false);
                }
            }

            // 停止コマンド
            if (cbStop.IsChecked == true)
            {
                string stopCmdForChange = Properties.Resources.err_message_stop_command;
                string stopCmd          = Convert.ToString(txtStopCmd.Text);
                // 未入力の場合
                if (CheckUtil.IsNullOrEmpty(stopCmd))
                {
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_001,
                                                 new string[] { stopCmdForChange });
                    return(false);
                }
                // ASCII文字チェック
                if (!CheckUtil.IsASCIIStr(stopCmd))
                {
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_002,
                                                 new string[] { stopCmdForChange });
                    return(false);
                }
                // バイト数チェック
                if (CheckUtil.IsLenOver(stopCmd, 4000))
                {
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_003,
                                                 new string[] { stopCmdForChange, "4000" });
                    return(false);
                }
            }

            // 実行欄
            string scriptCmdForChange = Properties.Resources.err_message_exec;
            string scriptCmd          = "";

            scriptCmd = txtCmd.Text;
            // 未入力の場合
            if (CheckUtil.IsNullOrEmpty(scriptCmd))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_001,
                                             new string[] { scriptCmdForChange });
                return(false);
            }
            // バイト数チェック
            if (CheckUtil.IsLenOver(scriptCmd, 4000))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_003,
                                             new string[] { scriptCmdForChange, "4000" });
                return(false);
            }

            // タイムアウト警告
            string timeOutForChange = Properties.Resources.err_message_timeout;
            string timeOut          = Convert.ToString(txtTimeOut.Text);

            // 未入力の場合
            if (CheckUtil.IsNullOrEmpty(timeOut))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_001,
                                             new string[] { timeOutForChange });
                return(false);
            }
            // 半角数字チェック
            if (!CheckUtil.IsHankakuNum(timeOut))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_007,
                                             new string[] { timeOutForChange });
                return(false);
            }
            // 桁数チェック
            if (CheckUtil.IsLenOver(timeOut, 5))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_003,
                                             new string[] { timeOutForChange, "5" });
                return(false);
            }

            // ジョブ停止コード
            string stopCodeForChange = Properties.Resources.err_message_stop_code;
            string stopCode          = Convert.ToString(txtStopCode.Text);

            // 半角数字、カンマ、ハイフンチェック
            if (!CheckUtil.IsHankakuNumAndCommaAndHyphen(stopCode))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_008,
                                             new string[] { stopCodeForChange });
                return(false);
            }
            // カンマ、およびハイフンの前後が数字チェック
            if (!CheckUtil.IsHankakuNumBeforeOrAfterCommaAndHyphen(stopCode))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_009,
                                             new string[] { stopCodeForChange });
                return(false);
            }
            // 桁数チェック
            if (CheckUtil.IsLenOver(stopCode, 32))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_003,
                                             new string[] { stopCodeForChange, "32" });
                return(false);
            }

            //added by YAMA 2014/08/15
            // 実行ユーザー(日本語入力可、省略可)
            string runUserForChange = Properties.Resources.err_message_run_user;
            String runUser          = txtRunUser.Text;
            bool   runUserFlg       = false;

            // 入力時は以下をチェック
            if (CheckUtil.IsNullOrEmpty(runUser) == false)
            {
                // バイト数チェック
                if (CheckUtil.IsLenOver(runUser, 256))
                {
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_003,
                                                 new string[] { runUserForChange, "256" });
                    return(false);
                }

                // 禁則文字チェック
                if (!CheckUtil.IsProhibitedCharacterUserName(runUser))
                {
                    CommonDialog.ShowErrorDialog(Consts.ERROR_JOBEDIT_014,
                                                 new string[] { runUserForChange });
                    return(false);
                }

                runUserFlg = true;
            }

            // パスワード(省略可、パスワードのみは不可)
            string runUserPWForChange = Properties.Resources.err_message_run_user_pw;
            String runUserPW          = txtRunUserPW.Text;

            // 入力時は以下をチェック
            if (CheckUtil.IsNullOrEmpty(runUserPW) == false)
            {
                // 実行ユーザーが未設定
                if (runUserFlg == false)
                {
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_001,
                                                 new string[] { runUserForChange });
                    return(false);
                }

                // 全角文字チェック
                if (CheckUtil.isHankaku(runUserPW) == false)
                {
                    CommonDialog.ShowErrorDialog(Consts.ERROR_JOBEDIT_015,
                                                 new string[] { runUserForChange });
                    return(false);
                }

                // バイト数チェック
                if (CheckUtil.IsLenOver(runUserPW, 256))
                {
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_003,
                                                 new string[] { runUserPWForChange, "256" });
                    return(false);
                }

                // 禁則文字チェック
                if (!CheckUtil.IsProhibitedCharacterUserPW(runUserPW))
                {
                    CommonDialog.ShowErrorDialog(Consts.ERROR_JOBEDIT_015,
                                                 new string[] { runUserForChange });
                    return(false);
                }
            }


            return(true);
        }
예제 #6
0
        //*******************************************************************
        /// <summary>入力チェック </summary>
        /// <returns>チェック結果</returns>
        //*******************************************************************
        private bool InputCheck(int selectRbType, ref string[] outTmData)
        {
            bool retCode = true;
            int  ret     = 0;
            int  wktime  = 0;

            string bootTime      = "";
            string CycleInterval = "";

            String[] errItem = new String[3];

            string[] CycleTimeDataData = new string[2];

            int[] stHM = new int[2];
            int[] edHM = new int[2];


            // 起動時刻を選択時
            if (selectRbType == 0)
            {
                // 起動時刻を取得
                bootTime = container.textBox_StartTime.Text.Trim();

                // 起動時刻のデータチェック
                ret = ChkTimeData(bootTime, ref outTmData);
                // outTmDataには時分に分解された値が格納されている

                errItem[0] = Properties.Resources.err_message_boot_time; // 起動時刻
                errItem[1] = "2";                                        // 2バイト、2桁の2

                switch (ret)
                {
                // 未入力(1)
                case 1:
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_001, errItem);
                    retCode = false;
                    break;

                // 半角数字・コロン以外を入力(2)
                case 2:
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_027, errItem);
                    retCode = false;
                    break;

                // 時間の入力形式[hh:mm]誤り(3)
                case 3:
                case 4:
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_026, errItem);
                    retCode = false;
                    break;
                }

                if (retCode == false)
                {
                    return(retCode);
                }


                // 起動時刻(時)の値が「0」~「99」以外の場合、エラー
                if (CheckUtil.IsLenOver(outTmData[0], 2))
                {
                    errItem[0] = Properties.Resources.err_message_boot_time_hh; // 起動時刻の時間
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_003, errItem);
                    return(false);
                }

                // 起動時刻(分)の値が「00」~「59」以外の場合、エラー
                wktime = int.Parse(outTmData[1]);

                if (wktime < 0 || wktime > 59)
                {
                    errItem[0] = Properties.Resources.err_message_boot_time_mi; // 起動時刻の分
                    CommonDialog.ShowErrorDialog(Consts.ERROR_BOOT_TIME_001, errItem);
                    return(false);
                }
            }
            else
            {
                // サイクル起動を選択時
                // 開始時刻を取得
                bootTime = container.textBox_CyclePeriodFrom.Text.Trim();

                // 開始時刻のデータチェック
                ret = ChkTimeData(bootTime, ref CycleTimeDataData);

                errItem[0] = Properties.Resources.err_message_boot_start_time; // 開始時刻
                errItem[1] = "2";                                              // 2バイト、2桁の2
                switch (ret)
                {
                // 未入力(1)
                case 1:
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_001, errItem);
                    retCode = false;
                    break;

                // 半角数字・コロン以外を入力(2)
                case 2:
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_027, errItem);
                    retCode = false;
                    break;

                // 時間の入力形式[hh:mm]誤り(3)
                case 3:
                case 4:
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_026, errItem);
                    retCode = false;
                    break;
                }

                if (retCode == false)
                {
                    return(retCode);
                }

                // outTmDataには時分に分解された値が格納されている
                outTmData[0] = CycleTimeDataData[0];
                outTmData[1] = CycleTimeDataData[1];

                // 開始時刻(時)の値が「0」~「23」以外の場合、エラーダイアログを表示する。
                wktime = int.Parse(outTmData[0]);

                if (wktime < 0 || wktime > 23)
                {
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_017,
                                                 new string[] { Properties.Resources.err_message_boot_start_time_hh, "0", "23" });
                    return(false);
                }

                // 開始時刻(分)の値が「00」~「59」以外の場合、エラーダイアログを表示する。
                wktime = int.Parse(outTmData[1]);

                if (wktime < 0 || wktime > 59)
                {
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_017,
                                                 new string[] { Properties.Resources.err_message_boot_start_time_mi, "0", "59" });
                    return(false);
                }


                // 終了時刻を取得
                bootTime = container.textBox_CyclePeriodTo.Text.Trim();

                // 終了時刻のデータチェック
                ret = ChkTimeData(bootTime, ref CycleTimeDataData);

                errItem[0] = Properties.Resources.err_message_boot_end_time; // 終了時刻
                errItem[1] = "2";                                            // 2バイト、2桁の2
                switch (ret)
                {
                // 未入力(1)
                case 1:
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_001, errItem);
                    retCode = false;
                    break;

                // 半角数字・コロン以外を入力(2)
                case 2:
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_027, errItem);
                    retCode = false;
                    break;

                // 時間の入力形式[hh:mm]誤り(3)
                case 3:
                case 4:
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_026, errItem);
                    retCode = false;
                    break;
                }

                if (retCode == false)
                {
                    return(retCode);
                }


                // outTmDataには時分に分解された値が格納されている
                outTmData[2] = CycleTimeDataData[0];
                outTmData[3] = CycleTimeDataData[1];

                //added by YAMA 2014/06/23
                // 終了時刻(時)の値が「0」~「23」以外の場合、エラーダイアログを表示する。 <-- 廃止
                // 終了時刻(時)の値が「0」~「47」以外の場合、エラーダイアログを表示する。
                wktime = int.Parse(outTmData[2]);

                if (wktime < 0 || wktime > 47)
                {
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_017,
                                                 new string[] { Properties.Resources.err_message_boot_end_time_hh, "0", "47" });
                    return(false);
                }

                // 終了時刻(分)の値が「00」~「59」以外の場合、エラーダイアログを表示する。
                wktime = int.Parse(outTmData[3]);

                if (wktime < 0 || wktime > 59)
                {
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_017,
                                                 new string[] { Properties.Resources.err_message_boot_end_time_mi, "0", "59" });
                    return(false);
                }

                // 開始時刻<終了時刻以外の場合、エラーダイアログを表示する。

                // 開始時刻を取得
                stHM[0] = int.Parse(outTmData[0]);
                stHM[1] = int.Parse(outTmData[1]);

                // 終了時刻を取得
                edHM[0] = int.Parse(outTmData[2]);
                edHM[1] = int.Parse(outTmData[3]);

                TimeSpan t1 = new TimeSpan(stHM[0], stHM[1], 0);
                TimeSpan t2 = new TimeSpan(edHM[0], edHM[1], 0);

                if (t1 >= t2)
                {
                    CommonDialog.ShowErrorDialog(Consts.ERROR_BOOT_TIME_005);
                    return(false);
                }

                //added by YAMA 2014/06/23
                // 開始時刻と終了時刻の時間幅が23時59分を超えてる場合、エラーダイアログを表示する
                //23時間59分(23:59:00)を表すTimeSpanオブジェクトを作成する
                TimeSpan ts3 = TimeSpan.Parse("23:59");
                TimeSpan ts4 = t2 - t1;

                if (ts3 < ts4)
                {
                    CommonDialog.ShowErrorDialog(Consts.ERROR_BOOT_TIME_006);
                    return(false);
                }

                // 間隔時間(分)の半角数字チェック
                CycleInterval = container.textBox_CycleInterval.Text.Trim();
                errItem[0]    = Properties.Resources.err_message_boot_time_CycleInterval; // 間隔時間(分)

                if (CycleInterval.Length == 0)
                {
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_001, errItem);
                    return(false);
                }

                if (CheckUtil.IsHankakuNum(CycleInterval))
                {
                }
                else
                {
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_007, errItem);
                    return(false);
                }

                // 間隔時間(分)の値が「1」~「720(12時間)」以外の場合、エラーダイアログを表示する。
                wktime = int.Parse(CycleInterval);

                if (wktime < 1 || wktime > 720)
                {
                    errItem[1] = "1";
                    errItem[2] = "720";

                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_017, errItem);
                    return(false);
                }
            }

            return(retCode);
        }
        /// <summary> 各項目のチェック処理(登録)</summary>
        private bool InputCheck()
        {
            Int64 chkData = 0;

            // システム設定項目
            // ジョブネット運行情報表示期間(分)
            string jobnetViewSpanForChange = Properties.Resources.err_message_settings_jobnet_view_span;
            String jobnetViewSpan          = tbxJobnetViewSpan.Text;

            // 未入力の場合
            if (CheckUtil.IsNullOrEmpty(jobnetViewSpan))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_001, new string[] { jobnetViewSpanForChange });
                return(false);
            }
            // 半角数字のみ可
            if (!CheckUtil.IsHankakuNum(jobnetViewSpan))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_007, new string[] { jobnetViewSpanForChange });
                return(false);
            }
            // 1〜1059127200()
            chkData = Convert.ToInt64(jobnetViewSpan);
            if (chkData < 1 || chkData > 1059127200)
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_JOBEDIT_008,
                                             new string[] { jobnetViewSpanForChange, "「1〜1059127200」" });
                return(false);
            }

            // 予定ジョブネット事前展開開始時間(分)
            string jobnetLoadSpanForChange = Properties.Resources.err_message_settings_jobnet_load_span;
            String jobnetLoadSpan          = tbxJobnetLoadSpan.Text;

            // 未入力の場合
            if (CheckUtil.IsNullOrEmpty(jobnetLoadSpan))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_001, new string[] { jobnetLoadSpanForChange });
                return(false);
            }
            // 半角数字のみ可
            if (!CheckUtil.IsHankakuNum(jobnetLoadSpan))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_007, new string[] { jobnetLoadSpanForChange });
                return(false);
            }
            // 1〜2147483647(32ビット最大値)
            chkData = Convert.ToInt64(jobnetLoadSpan);
            if (chkData < 1 || chkData > 2147483647)
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_JOBEDIT_008,
                                             new string[] { jobnetLoadSpanForChange, "「1〜2147483647」" });
                return(false);
            }

            // 終了済みジョブネット情報保持期間(分)
            string jobnetKeepSpanForChange = Properties.Resources.err_message_settings_jobnet_keep_span;
            String jobnetKeepSpan          = tbxJobnetKeepSpan.Text;

            // 未入力の場合
            if (CheckUtil.IsNullOrEmpty(jobnetKeepSpan))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_001, new string[] { jobnetKeepSpanForChange });
                return(false);
            }
            // 半角数字のみ可
            if (!CheckUtil.IsHankakuNum(jobnetKeepSpan))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_007, new string[] { jobnetKeepSpanForChange });
                return(false);
            }
            // 1〜2147483647(32ビット最大値)
            chkData = Convert.ToInt64(jobnetKeepSpan);
            if (chkData < 1 || chkData > 2147483647)
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_JOBEDIT_008,
                                             new string[] { jobnetKeepSpanForChange, "「1〜2147483647」" });
                return(false);
            }

            // ジョブ実行結果ログ保持期間(分)
            string joblogKeepSpanForChange = Properties.Resources.err_message_settings_joblog_keep_span;
            String joblogKeepSpan          = tbxJoblogKeepSpan.Text;

            // 未入力の場合
            if (CheckUtil.IsNullOrEmpty(joblogKeepSpan))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_001, new string[] { joblogKeepSpanForChange });
                return(false);
            }
            // 半角数字のみ可
            if (!CheckUtil.IsHankakuNum(joblogKeepSpan))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_007, new string[] { joblogKeepSpanForChange });
                return(false);
            }
            // 1〜2147483647(32ビット最大値)
            chkData = Convert.ToInt64(joblogKeepSpan);
            if (chkData < 1 || chkData > 2147483647)
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_JOBEDIT_008,
                                             new string[] { joblogKeepSpanForChange, "「1〜2147483647」" });
                return(false);
            }

            // Zabbix通知設定項目
            // Zabbix IPアドレス
            string zabbixServerIPaddressForChange = Properties.Resources.err_message_settings_zbxsnd_zabbix_ip;
            String zabbixServerIPaddress          = tbxZabbixServerIPaddress.Text;

            // 未入力の場合
            if (CheckUtil.IsNullOrEmpty(zabbixServerIPaddress))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_001, new string[] { zabbixServerIPaddressForChange });
                return(false);
            }
            // 最大2048バイト
            if (CheckUtil.IsLenOver(zabbixServerIPaddress, 2048))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_003, new string[] { zabbixServerIPaddressForChange, "2048" });
                return(false);
            }
            //  半角英数字とアンダーバー、ハイフン、ピリオドのみ可
            if (!CheckUtil.IsHankakuStrAndSpaceAndUnderbarAndHyphenAndPeriod(zabbixServerIPaddress))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_SETTING_002, new string[] { zabbixServerIPaddressForChange });
                return(false);
            }
            // ハイフン、ピリオドは、先頭、最後の文字としては使用不可
            String firstChr = zabbixServerIPaddress.Substring(0, 1);
            String lastChr  = zabbixServerIPaddress.Substring(zabbixServerIPaddress.Length - 1, 1);

            if ((firstChr == "-" || lastChr == "-") || (firstChr == "." || lastChr == "."))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_SETTING_002, new string[] { zabbixServerIPaddressForChange });
                return(false);
            }

            // 数字のみの入力は不可
            if (CheckUtil.IsHankakuNum(zabbixServerIPaddress))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_SETTING_002, new string[] { zabbixServerIPaddressForChange });
                return(false);
            }



            // Zabbix ポート番号
            string zabbixServerPortNumberForChange = Properties.Resources.err_message_settings_zbxsnd_zabbix_port;
            String zabbixServerPortNumber          = tbxZabbixServerPortNumber.Text;

            // 未入力の場合
            if (CheckUtil.IsNullOrEmpty(zabbixServerPortNumber))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_001, new string[] { zabbixServerPortNumberForChange });
                return(false);
            }
            // 半角数字のみ可
            if (!CheckUtil.IsHankakuNum(zabbixServerPortNumber))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_007, new string[] { zabbixServerPortNumberForChange });
                return(false);
            }
            // 0〜65535
            Int32 PortNumber = Convert.ToInt32(zabbixServerPortNumber);

            if (PortNumber < 0 || PortNumber > 65535)
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_017, new string[] { zabbixServerPortNumberForChange, "0", "65535" });
                return(false);
            }

            // Zabbix Sender コマンド
            string zabbixSenderCommandForChange = Properties.Resources.err_message_settings_zbxsnd_sender;
            String zabbixSenderCommand          = tbxZabbixSenderCommand.Text;

            // 未入力の場合
            if (CheckUtil.IsNullOrEmpty(zabbixSenderCommand))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_001, new string[] { zabbixSenderCommandForChange });
                return(false);
            }
            //  ASCII文字のみ可
            if (!CheckUtil.IsASCIIStr(zabbixSenderCommand))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_007, new string[] { zabbixSenderCommandForChange });
                return(false);
            }
            // 最大2048バイト
            if (CheckUtil.IsLenOver(zabbixSenderCommand, 2048))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_003, new string[] { zabbixSenderCommandForChange, "2048" });
                return(false);
            }

            // メッセージ通知先Zabbixホスト
            string messageDestinationServerForChange = Properties.Resources.err_message_settings_zbxsnd_zabbix_host;
            String messageDestinationServer          = tbxMessageDestinationServer.Text;

            // 未入力の場合
            if (CheckUtil.IsNullOrEmpty(messageDestinationServer))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_001, new string[] { messageDestinationServerForChange });
                return(false);
            }
            //  半角英数字と半角空白、アンダーバー、ハイフン、ピリオドのみ可
            if (!CheckUtil.IsHankakuStrAndSpaceAndUnderbarAndHyphenAndPeriod(messageDestinationServer))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_028, new string[] { messageDestinationServerForChange });
                return(false);
            }
            // 最大64バイト
            if (CheckUtil.IsLenOver(messageDestinationServer, 64))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_003, new string[] { messageDestinationServerForChange, "64" });
                return(false);
            }

            // アイテムキー
            string messageDestinationItemKeyForChange = Properties.Resources.err_message_settings_zbxsnd_zabbix_item;
            String messageDestinationItemKey          = tbxMessageDestinationItemKey.Text;

            // 未入力の場合
            if (CheckUtil.IsNullOrEmpty(messageDestinationItemKey))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_001, new string[] { messageDestinationItemKeyForChange });
                return(false);
            }
            //  半角英数字、アンダーバー、ハイフンのみ可
            if (!CheckUtil.IsHankakuStrAndHyphenAndUnderbar(messageDestinationItemKey))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_013, new string[] { messageDestinationItemKeyForChange });
                return(false);
            }
            // 最大255バイト
            if (CheckUtil.IsLenOver(messageDestinationItemKey, 255))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_003, new string[] { messageDestinationItemKeyForChange, "255" });
                return(false);
            }

            // 再送回数
            string retryCountForChange = Properties.Resources.err_message_settings_zbxsnd_retry_count;
            String retryCount          = tbxRetryCount.Text;

            // 未入力の場合
            if (CheckUtil.IsNullOrEmpty(retryCount))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_001, new string[] { retryCountForChange });
                return(false);
            }
            // 半角数字のみ可
            if (!CheckUtil.IsHankakuNum(retryCount))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_007, new string[] { retryCountForChange });
                return(false);
            }
            // 0〜2147483647
            chkData = Convert.ToInt64(retryCount);
            if (chkData < 0 || chkData > 2147483647)
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_JOBEDIT_008,
                                             new string[] { retryCountForChange, "「0〜2147483647」" });
                return(false);
            }

            // 再送インターバル(秒)
            string retryIntervalForChange = Properties.Resources.err_message_settings_zbxsnd_retry_interval;
            String retryInterval          = tbxRetryInterval.Text;

            // 未入力の場合
            if (CheckUtil.IsNullOrEmpty(retryInterval))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_001, new string[] { retryIntervalForChange });
                return(false);
            }
            // 半角数字のみ可
            if (!CheckUtil.IsHankakuNum(retryInterval))
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_007, new string[] { retryIntervalForChange });
                return(false);
            }
            // 1〜2147483647
            chkData = Convert.ToInt64(retryInterval);
            if (chkData < 1 || chkData > 2147483647)
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_JOBEDIT_008,
                                             new string[] { retryIntervalForChange, "「1〜2147483647」" });
                return(false);
            }

            return(true);
        }
        //*******************************************************************
        /// <summary>検索項目チェック </summary>
        /// <returns>チェック結果</returns>
        //*******************************************************************
        private bool SearchItemCheck()
        {
            // 検索管理IDを取得
            string manageID = tbxManageId.Text;

            if (CheckUtil.IsNullOrEmpty(manageID))
            {
                // 検索From年を取得
                string fromYear = tbxFromYear.Text;
                // 入力の場合
                if (CheckUtil.IsNullOrEmpty(fromYear))
                {
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_001,
                                                 new string[] { Properties.Resources.err_message_search_from_year });
                    return(false);
                }

                // 半角数値かチェック
                if (!CheckUtil.IsHankakuNum(fromYear))
                {
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_007,
                                                 new string[] { Properties.Resources.err_message_search_from_year });
                    return(false);
                }

                // 4桁かチェック
                if (!CheckUtil.IsLen(fromYear, 4))
                {
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_012,
                                                 new string[] { Properties.Resources.err_message_search_from_year, "4" });
                    return(false);
                }

                // 検索From月を取得
                string fromMonth = combFromMonth.Text;
                // 未入力の場合
                if (CheckUtil.IsNullOrEmpty(fromMonth))
                {
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_001,
                                                 new string[] { Properties.Resources.err_message_search_from_month });
                    return(false);
                }

                // 半角数値かチェック
                if (!CheckUtil.IsHankakuNum(fromMonth))
                {
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_017,
                                                 new string[] { Properties.Resources.err_message_search_from_month, "1", "12" });
                    return(false);
                }

                // 月入力が正しいかチェック
                if (!CheckUtil.IsMonth(Convert.ToInt16(fromMonth)))
                {
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_017,
                                                 new string[] { Properties.Resources.err_message_search_from_month, "1", "12" });
                    return(false);
                }

                // 検索From日を取得
                string fromDay = combFromDay.Text;
                // 未入力の場合
                if (CheckUtil.IsNullOrEmpty(fromDay))
                {
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_001,
                                                 new string[] { Properties.Resources.err_message_search_from_day });
                    return(false);
                }

                // 半角数値かチェック
                if (!CheckUtil.IsHankakuNum(fromDay))
                {
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_017,
                                                 new string[] { Properties.Resources.err_message_search_from_day, "1", "31" });
                    return(false);
                }

                // 日入力が正しいかチェック
                if (!CheckUtil.IsDay(Convert.ToInt16(fromDay)))
                {
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_017,
                                                 new string[] { Properties.Resources.err_message_search_from_day, "1", "31" });
                    return(false);
                }

                // 検索From時を取得
                string fromHour = combFromHour.Text;
                // 検索From分を取得
                string fromMin = combFromMin.Text;
                if (CheckUtil.IsNullOrEmpty(fromHour) != CheckUtil.IsNullOrEmpty(fromMin))
                {
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_026,
                                                 new string[] { Properties.Resources.err_message_search_from_time });
                    return(false);
                }
                // 入力の場合
                if (!CheckUtil.IsNullOrEmpty(fromHour))
                {
                    // 半角数値かチェック
                    if (!CheckUtil.IsHankakuNum(fromHour))
                    {
                        CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_017,
                                                     new string[] { Properties.Resources.err_message_search_from_hour, "0", "23" });
                        return(false);
                    }

                    // 時入力が正しいかチェック
                    if (!CheckUtil.IsHour(Convert.ToInt16(fromHour)))
                    {
                        CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_017,
                                                     new string[] { Properties.Resources.err_message_search_from_hour, "0", "23" });
                        return(false);
                    }
                }


                // 入力の場合
                if (!CheckUtil.IsNullOrEmpty(fromMin))
                {
                    // 半角数値かチェック
                    if (!CheckUtil.IsHankakuNum(fromMin))
                    {
                        CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_017,
                                                     new string[] { Properties.Resources.err_message_search_from_min, "0", "59" });
                        return(false);
                    }
                    // 分入力が正しいかチェック
                    if (!CheckUtil.IsMin(Convert.ToInt16(fromMin)))
                    {
                        CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_017,
                                                     new string[] { Properties.Resources.err_message_search_from_min, "0", "59" });
                        return(false);
                    }
                }
                //日付チェック
                if (Convert.ToInt16(fromDay) > DateTime.DaysInMonth(Convert.ToInt16(fromYear), Convert.ToInt16(fromMonth)))
                {
                    CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_018,
                                                 new string[] { Properties.Resources.err_message_search_from_date });
                    return(false);
                }
                // 検索To年、月、日、時、分を取得
                string toYear  = tbxToYear.Text;
                string toMonth = combToMonth.Text;
                string toDay   = combToDay.Text;
                string toHour  = combToHour.Text;
                string toMin   = combToMin.Text;
                if (!(CheckUtil.IsNullOrEmpty(toYear) &&
                      CheckUtil.IsNullOrEmpty(toMonth) &&
                      CheckUtil.IsNullOrEmpty(toDay) &&
                      CheckUtil.IsNullOrEmpty(toHour) &&
                      CheckUtil.IsNullOrEmpty(toMin)))
                {
                    // 未入力の場合
                    if (CheckUtil.IsNullOrEmpty(toYear))
                    {
                        CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_001,
                                                     new string[] { Properties.Resources.err_message_search_to_year });
                        return(false);
                    }

                    // 半角数値かチェック
                    if (!CheckUtil.IsHankakuNum(toYear))
                    {
                        CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_007,
                                                     new string[] { Properties.Resources.err_message_search_to_year });
                        return(false);
                    }

                    // 4桁かチェック
                    if (!CheckUtil.IsLen(toYear, 4))
                    {
                        CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_012,
                                                     new string[] { Properties.Resources.err_message_search_to_year, "4" });
                        return(false);
                    }

                    // 未入力の場合
                    if (CheckUtil.IsNullOrEmpty(toMonth))
                    {
                        CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_001,
                                                     new string[] { Properties.Resources.err_message_search_to_month });
                        return(false);
                    }

                    // 半角数値かチェック
                    if (!CheckUtil.IsHankakuNum(toMonth))
                    {
                        CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_017,
                                                     new string[] { Properties.Resources.err_message_search_to_month, "1", "12" });
                        return(false);
                    }
                    // 月入力が正しいかチェック
                    if (!CheckUtil.IsMonth(Convert.ToInt16(toMonth)))
                    {
                        CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_017,
                                                     new string[] { Properties.Resources.err_message_search_to_month, "1", "12" });
                        return(false);
                    }

                    // 未入力の場合
                    if (CheckUtil.IsNullOrEmpty(toDay))
                    {
                        CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_001,
                                                     new string[] { Properties.Resources.err_message_search_to_day });
                        return(false);
                    }

                    // 半角数値かチェック
                    if (!CheckUtil.IsHankakuNum(toDay))
                    {
                        CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_017,
                                                     new string[] { Properties.Resources.err_message_search_to_day, "1", "31" });
                        return(false);
                    }
                    // 日入力が正しいかチェック
                    if (!CheckUtil.IsDay(Convert.ToInt16(toDay)))
                    {
                        CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_017,
                                                     new string[] { Properties.Resources.err_message_search_to_day, "1", "31" });
                        return(false);
                    }

                    if (CheckUtil.IsNullOrEmpty(toHour) != CheckUtil.IsNullOrEmpty(toMin))
                    {
                        CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_026,
                                                     new string[] { Properties.Resources.err_message_search_to_time });
                        return(false);
                    }

                    // 入力の場合
                    if (!CheckUtil.IsNullOrEmpty(toHour))
                    {
                        // 半角数値かチェック
                        if (!CheckUtil.IsHankakuNum(toHour))
                        {
                            CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_017,
                                                         new string[] { Properties.Resources.err_message_search_to_hour, "0", "23" });
                            return(false);
                        }

                        // 時入力が正しいかチェック
                        if (!CheckUtil.IsHour(Convert.ToInt16(toHour)))
                        {
                            CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_017,
                                                         new string[] { Properties.Resources.err_message_search_to_hour, "0", "23" });
                            return(false);
                        }
                    }

                    // 入力の場合
                    if (!CheckUtil.IsNullOrEmpty(toMin))
                    {
                        // 半角数値かチェック
                        if (!CheckUtil.IsHankakuNum(toMin))
                        {
                            CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_017,
                                                         new string[] { Properties.Resources.err_message_search_to_min, "0", "59" });
                            return(false);
                        }
                        // 分入力が正しいかチェック
                        if (!CheckUtil.IsMin(Convert.ToInt16(toMin)))
                        {
                            CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_017,
                                                         new string[] { Properties.Resources.err_message_search_to_min, "0", "59" });
                            return(false);
                        }
                    }
                    //日付チェック
                    if (Convert.ToInt16(toDay) > DateTime.DaysInMonth(Convert.ToInt16(toYear), Convert.ToInt16(toMonth)))
                    {
                        CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_018,
                                                     new string[] { Properties.Resources.err_message_search_to_date });
                        return(false);
                    }
                }
            }

            try
            {
                if (CheckUtil.IsNullOrEmpty(tbxJobnetId.Text))
                {
                    regexJobnetId = null;
                }
                else
                {
                    regexJobnetId = new Regex("^" + tbxJobnetId.Text + "$");
                }

                if (CheckUtil.IsNullOrEmpty(tbxJobId.Text))
                {
                    regexJobId = null;
                }
                else
                {
                    regexJobId = new Regex("^" + tbxJobId.Text + "$");
                }

                if (CheckUtil.IsNullOrEmpty(combUserName.Text))
                {
                    regexUserName = null;
                }
                else
                {
                    regexUserName = new Regex("^" + combUserName.Text + "$");
                }
            }
            catch (Exception ex)
            {
                CommonDialog.ShowErrorDialog(Consts.ERROR_COMMON_020);
                return(false);
            }
            return(true);
        }