Example #1
0
        ///<summary>
        /// chkDaibunCd
        /// 大分類コードチェック
        ///</summary>
        private bool chkDaibunCd()
        {
            // 禁止文字チェック
            if (StringUtl.JudBanSQL(txtDaibunrui.Text) == false)
            {
                // メッセージボックスの処理、項目が該当する禁止文字を含む場合のウィンドウ(OK)
                BaseMessageBox basemessagebox = new BaseMessageBox(this, CommonTeisu.TEXT_INPUT, CommonTeisu.LABEL_MISS, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                basemessagebox.ShowDialog();

                txtDaibunrui.Text = "";

                txtDaibunrui.Focus();
                return(true);
            }

            // 数値チェック
            if (StringUtl.JudBanSelect(txtDaibunrui.Text, CommonTeisu.NUMBER_ONLY) == false)
            {
                // メッセージボックスの処理、項目が該当する禁止文字を含む場合のウィンドウ(OK)
                BaseMessageBox basemessagebox = new BaseMessageBox(this, CommonTeisu.TEXT_INPUT, CommonTeisu.LABEL_MISS, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                basemessagebox.ShowDialog();

                txtDaibunrui.Text = "";

                txtDaibunrui.Focus();
                return(true);
            }

            // 文字数が足りなかった場合0パティング
            if (txtDaibunrui.TextLength == 1)
            {
                txtDaibunrui.Text = txtDaibunrui.Text.ToString().PadLeft(2, '0');
            }
            return(false);
        }
Example #2
0
        ///<summary>
        /// chktxtGyoshuCd
        /// 業種コードチェック
        ///</summary>
        private bool chkGyoshuCd()
        {
            if (StringUtl.JudBanSQL(txtGyoshuCd.Text) == false)
            {
                //メッセージボックスの処理、項目が該当する禁止文字を含む場合のウィンドウ(OK)
                BaseMessageBox basemessagebox = new BaseMessageBox(this, CommonTeisu.TEXT_INPUT, CommonTeisu.LABEL_MISS, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                basemessagebox.ShowDialog();

                this.txtGyoshuCd.Text = "";
                txtGyoshuCd.Focus();
                return(true);
            }

            // 全角数字を半角数字に変換
            this.txtGyoshuCd.Text = StringUtl.JudZenToHanNum(txtGyoshuCd.Text);

            //数値数が足りなかった場合0パティング
            if (StringUtl.JudBanSelect(txtGyoshuCd.Text, CommonTeisu.NUMBER_ONLY) == true)
            {
                if (txtGyoshuCd.TextLength < 4)
                {
                    txtGyoshuCd.Text = txtGyoshuCd.Text.ToString().PadLeft(4, '0');
                }
            }
            return(false);
        }
Example #3
0
        ///<summary>
        /// chkChokusoCd
        /// 直送先コードチェック
        ///</summary>
        private bool chkChokusoCd()
        {
            // 禁止文字チェック
            if (StringUtl.JudBanSQL(txtChokusoCd.Text) == false)
            {
                // メッセージボックスの処理、項目が該当する禁止文字を含む場合のウィンドウ(OK)
                BaseMessageBox basemessagebox = new BaseMessageBox(this, CommonTeisu.TEXT_INPUT, CommonTeisu.LABEL_MISS, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                basemessagebox.ShowDialog();

                DipDelChokusoInfo();

                return(true);
            }

            this.txtChokusoCd.Text = StringUtl.JudZenToHanNum(txtChokusoCd.Text);

            // 数値チェック
            if (StringUtl.JudBanSelect(txtChokusoCd.Text, CommonTeisu.NUMBER_ONLY) == true)
            {
                // 文字数が足りなかった場合0パティング
                if (txtChokusoCd.TextLength < 4)
                {
                    txtChokusoCd.Text = txtChokusoCd.Text.ToString().PadLeft(4, '0');
                }
            }

            return(false);
        }
        ///<summary>
        /// PGNo.チェック
        ///</summary>
        private bool chkPGNo()
        {
            // 禁止文字チェック
            if (StringUtl.JudBanSQL(labelSet_Menu.CodeTxtText) == false)
            {
                // メッセージボックスの処理、項目が該当する禁止文字を含む場合のウィンドウ(OK)
                BaseMessageBox basemessagebox = new BaseMessageBox(this, CommonTeisu.TEXT_INPUT, CommonTeisu.LABEL_MISS, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                basemessagebox.ShowDialog();

                labelSet_Menu.CodeTxtText = "";

                labelSet_Menu.codeTxt.Focus();
                return(true);
            }

            // 数値チェック
            if (StringUtl.JudBanSelect(labelSet_Menu.CodeTxtText, CommonTeisu.NUMBER_ONLY) == false)
            {
                // メッセージボックスの処理、項目が該当する禁止文字を含む場合のウィンドウ(OK)
                BaseMessageBox basemessagebox = new BaseMessageBox(this, CommonTeisu.TEXT_INPUT, CommonTeisu.LABEL_MISS, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                basemessagebox.ShowDialog();

                labelSet_Menu.CodeTxtText = "";

                labelSet_Menu.codeTxt.Focus();
                return(true);
            }
            return(false);
        }
Example #5
0
        ///<summary>
        /// 棚番コードチェック
        ///</summary>
        private bool chkTanaCd()
        {
            // 禁止文字チェック
            if (StringUtl.JudBanSQL(txtTanabanCd.Text) == false)
            {
                // メッセージボックスの処理、項目が該当する禁止文字を含む場合のウィンドウ(OK)
                BaseMessageBox basemessagebox = new BaseMessageBox(this, CommonTeisu.TEXT_INPUT, CommonTeisu.LABEL_MISS, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                basemessagebox.ShowDialog();

                txtTanabanCd.Text = "";

                txtTanabanCd.Focus();
                return(true);
            }
            return(false);
        }
        ///<summary>
        ///chkToriikisaki
        ///code入力箇所からフォーカスがついた時
        ///</summary>
        private bool chkToriikisaki()
        {

            if (txtCdT.Text == "" || String.IsNullOrWhiteSpace(txtCdT.Text).Equals(true))
            {
                return false;
            }

            // 前後の空白を取り除く
            txtCdT.Text = txtCdT.Text.Trim();

            // 禁止文字チェック
            if (StringUtl.JudBanSQL(txtCdT.Text) == false)
            {
                // メッセージボックスの処理、項目が該当する禁止文字を含む場合のウィンドウ(OK)
                BaseMessageBox basemessagebox = new BaseMessageBox(Parent, CommonTeisu.TEXT_INPUT, CommonTeisu.LABEL_MISS, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                basemessagebox.ShowDialog();

                return true;
            }


            // 全角数字を半角数字に変換
            txtCdT.Text = StringUtl.JudZenToHanNum(txtCdT.Text);

            // 数値チェック
            if (StringUtl.JudBanSelect(txtCdT.Text, CommonTeisu.NUMBER_ONLY) == true)
            {
                // 4文字以下の場合0パティング
                if (txtCdT.Text.Length < 4)
                {
                    txtCdT.Text = txtCdT.Text.ToString().PadLeft(4, '0');
                }
            }
            return false;
        }
Example #7
0
        ///<summary>
        ///setTxtMakerLeave
        ///code入力箇所からフォーカスが外れた時の処理
        ///</summary>
        public void setTxtMakerLeave()
        {
            //データ渡し用
            List <string> lstStringSQL = new List <string>();

            DataTable dtSetCd;

            if (this.CodeTxtText == "" || String.IsNullOrWhiteSpace(this.CodeTxtText).Equals(true))
            {
                this.ValueLabelText  = "";
                this.AppendLabelText = "";
                return;
            }

            //前後の空白を取り除く
            this.CodeTxtText = this.CodeTxtText.Trim();

            //禁止文字チェック
            if (StringUtl.JudBanSQL(this.CodeTxtText) == false)
            {
                //グループボックスかパネル内にいる場合
                if (this.Parent is GroupBox || this.Parent is Panel)
                {
                    //メッセージボックスの処理、項目が該当する禁止文字を含む場合のウィンドウ(OK)
                    BaseMessageBox basemessagebox = new BaseMessageBox(Parent.Parent, CommonTeisu.TEXT_INPUT, CommonTeisu.LABEL_MISS, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                    basemessagebox.ShowDialog();
                    SendKeys.Send("+{TAB}");
                }
                else
                {
                    //メッセージボックスの処理、項目が該当する禁止文字を含む場合のウィンドウ(OK)
                    BaseMessageBox basemessagebox = new BaseMessageBox(Parent, CommonTeisu.TEXT_INPUT, CommonTeisu.LABEL_MISS, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                    basemessagebox.ShowDialog();
                    SendKeys.Send("+{TAB}");
                }

                this.ValueLabelText  = "";
                this.CodeTxtText     = "";
                this.AppendLabelText = "";

                //エラーメッセージを表示された
                blMessageOn = true;
                return;
            }


            // 全角数字を半角数字に変換
            this.CodeTxtText = StringUtl.JudZenToHanNum(this.CodeTxtText);

            // 数値チェック
            if (StringUtl.JudBanSelect(this.CodeTxtText, CommonTeisu.NUMBER_ONLY) == true)
            {
                if (this.CodeTxtText.Length <= 3)
                {
                    this.CodeTxtText = this.CodeTxtText.ToString().PadLeft(4, '0');
                }
            }

            //データ渡し用
            lstStringSQL.Add("Common");
            lstStringSQL.Add("C_LIST_Maker_SELECT_LEAVE");

            OpenSQL opensql = new OpenSQL();

            try
            {
                string strSQLInput = opensql.setOpenSQL(lstStringSQL);

                if (strSQLInput == "")
                {
                    return;
                }

                strSQLInput = string.Format(strSQLInput, this.CodeTxtText);

                //SQLのインスタンス作成
                DBConnective dbconnective = new DBConnective();

                //SQL文を直書き(+戻り値を受け取る)
                dtSetCd = dbconnective.ReadSql(strSQLInput);

                if (dtSetCd.Rows.Count != 0)
                {
                    this.CodeTxtText    = dtSetCd.Rows[0]["メーカーコード"].ToString();
                    this.ValueLabelText = dtSetCd.Rows[0]["メーカー名"].ToString();

                    blMessageOn = false;
                }
                else
                {
                    //グループボックスかパネル内にいる場合
                    if (this.Parent is GroupBox || this.Parent is Panel)
                    {
                        //メッセージボックスの処理、項目のデータがない場合のウィンドウ(OK)
                        BaseMessageBox basemessagebox = new BaseMessageBox(this.Parent.Parent, CommonTeisu.TEXT_VIEW, CommonTeisu.LABEL_NOTDATA, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                        basemessagebox.ShowDialog();
                        SendKeys.Send("+{TAB}");
                    }
                    else
                    {
                        //メッセージボックスの処理、項目のデータがない場合のウィンドウ(OK)
                        BaseMessageBox basemessagebox = new BaseMessageBox(this.Parent, CommonTeisu.TEXT_VIEW, CommonTeisu.LABEL_NOTDATA, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                        basemessagebox.ShowDialog();
                        SendKeys.Send("+{TAB}");
                    }

                    this.ValueLabelText  = "";
                    this.CodeTxtText     = "";
                    this.AppendLabelText = "";

                    blMessageOn = true;
                    return;
                }
                return;
            }
            catch (Exception ex)
            {
                //データロギング
                new CommonException(ex);

                //グループボックスかパネル内にいる場合
                if (this.Parent is GroupBox || this.Parent is Panel)
                {
                    //例外発生メッセージ(OK)
                    BaseMessageBox basemessagebox = new BaseMessageBox(this.Parent.Parent, CommonTeisu.TEXT_ERROR, CommonTeisu.LABEL_ERROR_MESSAGE, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                    basemessagebox.ShowDialog();
                    SendKeys.Send("+{TAB}");
                    return;
                }
                else
                {
                    //例外発生メッセージ(OK)
                    BaseMessageBox basemessagebox = new BaseMessageBox(this.Parent, CommonTeisu.TEXT_ERROR, CommonTeisu.LABEL_ERROR_MESSAGE, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                    basemessagebox.ShowDialog();
                    SendKeys.Send("+{TAB}");
                    return;
                }
            }
        }
Example #8
0
        ///<summary>
        ///setData
        ///code入力箇所からフォーカスが外れた時の処理
        ///</summary>
        private void setData()
        {
            //データ渡し用
            List <string> lstStringSQL = new List <string>();

            DataTable dtSetCd;

            Boolean blnGood;

            //空白、文字数4以上の場合
            if (this.CodeTxtText == "" || String.IsNullOrWhiteSpace(this.CodeTxtText).Equals(true) || this.CodeTxtText.Length > 3)
            {
                this.ValueLabelText  = "";
                this.AppendLabelText = "";
                return;
            }

            //前後の空白を取り除く
            this.CodeTxtText = this.CodeTxtText.Trim();

            //禁止文字チェック
            if (StringUtl.JudBanSQL(this.CodeTxtText) == false ||
                StringUtl.JudBanSelect(this.CodeTxtText, CommonTeisu.NUMBER_ONLY) == false)
            {
                this.ValueLabelText = "";

                //グループボックスかパネル内にいる場合
                if (this.Parent is GroupBox || this.Parent is Panel)
                {
                    //メッセージボックスの処理、項目が該当する禁止文字を含む場合のウィンドウ(OK)
                    BaseMessageBox basemessagebox = new BaseMessageBox(Parent.Parent, CommonTeisu.TEXT_INPUT, CommonTeisu.LABEL_MISS, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                    basemessagebox.ShowDialog();
                }
                else
                {
                    //メッセージボックスの処理、項目が該当する禁止文字を含む場合のウィンドウ(OK)
                    BaseMessageBox basemessagebox = new BaseMessageBox(Parent, CommonTeisu.TEXT_INPUT, CommonTeisu.LABEL_MISS, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                    basemessagebox.ShowDialog();
                }

                //エラーメッセージを表示された
                blMessageOn = true;

                CodeTxtText = "0";
                return;
            }

            //データ渡し用
            lstStringSQL.Add("Common");
            lstStringSQL.Add("C_LIST_Menu_SELECT_LEAVE");

            OpenSQL opensql = new OpenSQL();

            try
            {
                string strSQLInput = opensql.setOpenSQL(lstStringSQL);

                if (strSQLInput == "")
                {
                    return;
                }

                strSQLInput = string.Format(strSQLInput, this.CodeTxtText);

                //SQLのインスタンス作成
                DBConnective dbconnective = new DBConnective();

                //SQL文を直書き(+戻り値を受け取る)
                dtSetCd = dbconnective.ReadSql(strSQLInput);

                //データがある場合
                if (dtSetCd.Rows.Count != 0)
                {
                    //PG番号が0の場合
                    if (dtSetCd.Rows[0]["PG番号"].ToString() == "0")
                    {
                        this.CodeTxtText    = "0";
                        this.ValueLabelText = "";
                    }
                    else
                    {
                        this.CodeTxtText    = dtSetCd.Rows[0]["PG番号"].ToString();
                        this.ValueLabelText = dtSetCd.Rows[0]["PG名"].ToString();
                    }
                    blMessageOn = false;
                }
                else
                {
                    //初期化
                    this.CodeTxtText    = "0";
                    this.ValueLabelText = "0";

                    //グループボックスかパネル内にいる場合
                    if (this.Parent is TabPage)
                    {
                        //メッセージボックスの処理、項目のデータがない場合のウィンドウ(OK)
                        BaseMessageBox basemessagebox = new BaseMessageBox(this.Parent.Parent.Parent, "入力", "指定されたPgNo.は登録されていません。", CommonTeisu.BTN_OK, CommonTeisu.DIAG_EXCLAMATION);
                        basemessagebox.ShowDialog();
                    }
                    else if (this.Parent is GroupBox || this.Parent is Panel)
                    {
                        //メッセージボックスの処理、項目のデータがない場合のウィンドウ(OK)
                        BaseMessageBox basemessagebox = new BaseMessageBox(this.Parent.Parent, "入力", "指定されたPgNo.は登録されていません。", CommonTeisu.BTN_OK, CommonTeisu.DIAG_EXCLAMATION);
                        basemessagebox.ShowDialog();
                    }
                    else
                    {
                        //メッセージボックスの処理、項目のデータがない場合のウィンドウ(OK)
                        BaseMessageBox basemessagebox = new BaseMessageBox(this.Parent, "入力", "指定されたPgNo.は登録されていません。", CommonTeisu.BTN_OK, CommonTeisu.DIAG_EXCLAMATION);
                        basemessagebox.ShowDialog();
                    }

                    //エラーメッセージを表示された
                    blMessageOn = true;
                }
                return;
            }
            catch (Exception ex)
            {
                //データロギング
                new CommonException(ex);

                //グループボックスかパネル内にいる場合
                if (this.Parent is GroupBox || this.Parent is Panel || this.Parent is TabPage)
                {
                    //例外発生メッセージ(OK)
                    BaseMessageBox basemessagebox = new BaseMessageBox(this.Parent.Parent, CommonTeisu.TEXT_ERROR, CommonTeisu.LABEL_ERROR_MESSAGE, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                    basemessagebox.ShowDialog();
                    return;
                }
                else
                {
                    //例外発生メッセージ(OK)
                    BaseMessageBox basemessagebox = new BaseMessageBox(this.Parent, CommonTeisu.TEXT_ERROR, CommonTeisu.LABEL_ERROR_MESSAGE, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                    basemessagebox.ShowDialog();
                    return;
                }
            }
        }
        ///<summary>
        /// chkTxtShiresaki
        /// ファンクション機能の仕入先コードエラーチェック処理
        /// 引数 :なし
        /// 戻り値:エラー発生【true】
        ///</summary>
        public bool chkTxtShiresaki()
        {
            // データ渡し用
            List <string> lstStringSQL = new List <string>();

            DataTable dtSetCd;

            Boolean blnGood;

            if (this.CodeTxtText == "" || String.IsNullOrWhiteSpace(this.CodeTxtText).Equals(true))
            {
                this.ValueLabelText  = "";
                this.AppendLabelText = "";
                return(false);
            }

            // 前後の空白を取り除く
            this.CodeTxtText = this.CodeTxtText.Trim();

            // 禁止文字チェック
            if (StringUtl.JudBanSQL(this.CodeTxtText) == false)
            {
                // メッセージボックスの処理、項目が該当する禁止文字を含む場合のウィンドウ(OK)
                BaseMessageBox basemessagebox = new BaseMessageBox(Parent, CommonTeisu.TEXT_INPUT, CommonTeisu.LABEL_MISS, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                basemessagebox.ShowDialog();

                this.ValueLabelText  = "";
                this.AppendLabelText = "";
                this.CodeTxtText     = "";

                return(true);
            }


            // 全角数字を半角数字に変換
            this.CodeTxtText = StringUtl.JudZenToHanNum(this.CodeTxtText);

            // 数値チェック
            if (StringUtl.JudBanSelect(this.CodeTxtText, CommonTeisu.NUMBER_ONLY) == true)
            {
                // 4文字以下の場合0パティング
                if (this.CodeTxtText.Length < 4)
                {
                    this.CodeTxtText = this.CodeTxtText.ToString().PadLeft(4, '0');
                }
            }

            // データ渡し用
            lstStringSQL.Add("Common");
            lstStringSQL.Add("C_LIST_ShiresakiAS400_SELECT_LEAVE");

            OpenSQL opensql = new OpenSQL();

            try
            {
                string strSQLInput = opensql.setOpenSQL(lstStringSQL);

                if (strSQLInput == "")
                {
                    return(false);
                }

                strSQLInput = string.Format(strSQLInput, this.CodeTxtText);

                // SQLのインスタンス作成
                DBConnective dbconnective = new DBConnective();

                // SQL文を直書き(+戻り値を受け取る)
                dtSetCd = dbconnective.ReadSql(strSQLInput);

                if (dtSetCd.Rows.Count != 0)
                {
                    this.CodeTxtText    = dtSetCd.Rows[0]["仕入先コード"].ToString();
                    this.ValueLabelText = dtSetCd.Rows[0]["仕入先名"].ToString();
                }
                else
                {
                    // メッセージボックスの処理、項目のデータがない場合のウィンドウ(OK)
                    BaseMessageBox basemessagebox = new BaseMessageBox(this.Parent, CommonTeisu.TEXT_VIEW, CommonTeisu.LABEL_NOTDATA, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                    basemessagebox.ShowDialog();

                    this.ValueLabelText  = "";
                    this.AppendLabelText = "";
                    this.CodeTxtText     = "";

                    return(true);
                }

                return(false);
            }
            catch (Exception ex)
            {
                // データロギング
                new CommonException(ex);

                // 例外発生メッセージ(OK)
                BaseMessageBox basemessagebox = new BaseMessageBox(this.Parent, CommonTeisu.TEXT_ERROR, CommonTeisu.LABEL_ERROR_MESSAGE, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                basemessagebox.ShowDialog();

                return(true);
            }
        }
Example #10
0
        ///<summary>
        ///setTxtTokuisakiLeave
        ///code入力箇所からフォーカスが外れた時の処理
        ///</summary>
        public void setTxtTokuisakiLeave()
        {
            //データ渡し用
            List <string> lstStringSQL = new List <string>();

            DataTable dtSetCd;

            if (this.CodeTxtText == "" || String.IsNullOrWhiteSpace(this.CodeTxtText).Equals(true))
            {
                this.ValueLabelText  = "";
                this.AppendLabelText = "";
                return;
            }

            //前後の空白を取り除く
            this.CodeTxtText = this.CodeTxtText.Trim();

            //禁止文字チェック
            if (StringUtl.JudBanSQL(this.CodeTxtText) == false)
            {
                //Parent 内のすべてのコントロールを列挙する
                foreach (Control cControl in Parent.Controls)
                {
                    //列挙したコントロールにコントロールが含まれている場合は再帰呼び出しする
                    if (cControl is BaseButton)
                    {
                        if (cControl.Text == "F12:戻る")
                        {
                            //フォーカスがボタンを指している場合
                            Control ctrlParent = ParentForm.ActiveControl;

                            if (ctrlParent.Name == "btnF12")
                            {
                                //全てのフォームの中から
                                foreach (System.Windows.Forms.Form frm in Application.OpenForms)
                                {
                                    //商品のフォームを探す
                                    if (frm.Name == Parent.Name)
                                    {
                                        //仕入リストの場合
                                        if (frm.Name == "ShireList")
                                        {
                                            //データを連れてくるため、newをしないこと
                                            ShireList shirelist = (ShireList)frm;
                                            shirelist.btnEndClick(null, null);
                                            return;
                                        }
                                    }
                                }
                            }
                        }
                    }
                }

                //グループボックスかパネル内にいる場合
                if (this.Parent is GroupBox || this.Parent is Panel)
                {
                    //メッセージボックスの処理、項目が該当する禁止文字を含む場合のウィンドウ(OK)
                    BaseMessageBox basemessagebox = new BaseMessageBox(this.Parent.Parent, CommonTeisu.TEXT_INPUT, CommonTeisu.LABEL_MISS, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                    basemessagebox.ShowDialog();
                    SendKeys.Send("+{TAB}");
                }
                else
                {
                    //メッセージボックスの処理、項目が該当する禁止文字を含む場合のウィンドウ(OK)
                    BaseMessageBox basemessagebox = new BaseMessageBox(this.Parent, CommonTeisu.TEXT_INPUT, CommonTeisu.LABEL_MISS, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                    basemessagebox.ShowDialog();
                    SendKeys.Send("+{TAB}");
                }

                this.ValueLabelText  = "";
                this.CodeTxtText     = "";
                this.AppendLabelText = "";

                //エラーメッセージを表示された
                blMessageOn = true;
                return;
            }


            // 全角数字を半角数字に変換
            this.CodeTxtText = StringUtl.JudZenToHanNum(this.CodeTxtText);

            // 数値チェック
            if (StringUtl.JudBanSelect(this.CodeTxtText, CommonTeisu.NUMBER_ONLY) == true)
            {
                if (this.CodeTxtText.Length < 4)
                {
                    this.CodeTxtText = this.CodeTxtText.ToString().PadLeft(4, '0');
                }
            }

            // 存在チェックを行い
            if (SearchOn == false)
            {
                return;
            }

            //データ渡し用
            lstStringSQL.Add("Common");
            lstStringSQL.Add("C_LIST_Tantousha_SELECT_LEAVE");

            OpenSQL opensql = new OpenSQL();

            try
            {
                string strSQLInput = opensql.setOpenSQL(lstStringSQL);

                if (strSQLInput == "")
                {
                    return;
                }

                strSQLInput = string.Format(strSQLInput, this.CodeTxtText);

                //SQLのインスタンス作成
                DBConnective dbconnective = new DBConnective();

                //SQL文を直書き(+戻り値を受け取る)
                dtSetCd = dbconnective.ReadSql(strSQLInput);

                if (dtSetCd.Rows.Count != 0)
                {
                    this.CodeTxtText    = dtSetCd.Rows[0]["担当者コード"].ToString();
                    this.ValueLabelText = dtSetCd.Rows[0]["担当者名"].ToString();

                    blMessageOn = false;
                }
                else
                {
                    //グループボックスかパネル内にいる場合
                    if (this.Parent is GroupBox || this.Parent is Panel)
                    {
                        //メッセージボックスの処理、項目のデータがない場合のウィンドウ(OK)
                        BaseMessageBox basemessagebox = new BaseMessageBox(this.Parent.Parent, CommonTeisu.TEXT_VIEW, CommonTeisu.LABEL_NOTDATA, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                        basemessagebox.ShowDialog();
                        SendKeys.Send("+{TAB}");
                    }
                    else
                    {
                        //メッセージボックスの処理、項目のデータがない場合のウィンドウ(OK)
                        BaseMessageBox basemessagebox = new BaseMessageBox(this.Parent, CommonTeisu.TEXT_VIEW, CommonTeisu.LABEL_NOTDATA, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                        basemessagebox.ShowDialog();
                        SendKeys.Send("+{TAB}");
                    }

                    this.ValueLabelText  = "";
                    this.CodeTxtText     = "";
                    this.AppendLabelText = "";

                    //エラーメッセージを表示された
                    blMessageOn = true;
                    return;
                }
            }
            catch (Exception ex)
            {
                //データロギング
                new CommonException(ex);

                //グループボックスかパネル内にいる場合
                if (this.Parent is GroupBox || this.Parent is Panel)
                {
                    //例外発生メッセージ(OK)
                    BaseMessageBox basemessagebox = new BaseMessageBox(this.Parent.Parent, CommonTeisu.TEXT_ERROR, CommonTeisu.LABEL_ERROR_MESSAGE, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                    basemessagebox.ShowDialog();
                    SendKeys.Send("+{TAB}");
                    return;
                }
                else
                {
                    //例外発生メッセージ(OK)
                    BaseMessageBox basemessagebox = new BaseMessageBox(this.Parent, CommonTeisu.TEXT_ERROR, CommonTeisu.LABEL_ERROR_MESSAGE, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                    basemessagebox.ShowDialog();
                    SendKeys.Send("+{TAB}");
                    return;
                }
            }
        }
Example #11
0
        ///<summary>
        /// chkTxtDaibunrui
        /// ファンクション機能の大分類コードエラーチェック処理
        /// 引数 :なし
        /// 戻り値:エラー発生【true】
        ///</summary>
        public bool chkTxtDaibunrui()
        {
            // データ渡し用
            List <string> lstStringSQL = new List <string>();

            DataTable dtSetCd;

            // 空白、文字数3以上の場合
            if (this.CodeTxtText == "" || String.IsNullOrWhiteSpace(this.CodeTxtText).Equals(true) || this.CodeTxtText.Length > 2)
            {
                this.ValueLabelText  = "";
                this.AppendLabelText = "";
                return(false);
            }

            // 前後の空白を取り除く
            this.CodeTxtText = this.CodeTxtText.Trim();

            if (StringUtl.JudBanSQL(this.CodeTxtText) == false ||
                StringUtl.JudBanSelect(this.CodeTxtText, CommonTeisu.NUMBER_ONLY) == false)
            {
                // メッセージボックスの処理、項目が該当する禁止文字を含む場合のウィンドウ(OK)
                BaseMessageBox basemessagebox = new BaseMessageBox(Parent, CommonTeisu.TEXT_INPUT, CommonTeisu.LABEL_MISS, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                basemessagebox.ShowDialog();

                this.ValueLabelText  = "";
                this.AppendLabelText = "";
                this.CodeTxtText     = "";

                return(true);
            }

            // ゼロ詰め処理
            if (this.CodeTxtText.Length == 1)
            {
                CodeTxtText = CodeTxtText.ToString().PadLeft(2, '0');
            }

            // データ渡し用
            lstStringSQL.Add("Common");
            lstStringSQL.Add("C_LIST_Daibun_SELECT_LEAVE");

            OpenSQL opensql = new OpenSQL();

            try
            {
                string strSQLInput = opensql.setOpenSQL(lstStringSQL);

                if (strSQLInput == "")
                {
                    return(false);
                }

                strSQLInput = string.Format(strSQLInput, this.CodeTxtText);

                // SQLのインスタンス作成
                DBConnective dbconnective = new DBConnective();

                // SQL文を直書き(+戻り値を受け取る)
                dtSetCd = dbconnective.ReadSql(strSQLInput);

                if (dtSetCd.Rows.Count != 0)
                {
                    this.CodeTxtText    = dtSetCd.Rows[0]["大分類コード"].ToString();
                    this.ValueLabelText = dtSetCd.Rows[0]["大分類名"].ToString();
                }
                else
                {
                    //メッセージボックスの処理、項目のデータがない場合のウィンドウ(OK)
                    BaseMessageBox basemessagebox = new BaseMessageBox(Parent, CommonTeisu.TEXT_INPUT, CommonTeisu.LABEL_NOTDATA, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                    basemessagebox.ShowDialog();

                    this.ValueLabelText  = "";
                    this.AppendLabelText = "";
                    this.CodeTxtText     = "";

                    return(true);
                }

                return(false);
            }
            catch (Exception ex)
            {
                //データロギング
                new CommonException(ex);

                //例外発生メッセージ(OK)
                BaseMessageBox basemessagebox = new BaseMessageBox(this.Parent, CommonTeisu.TEXT_ERROR, CommonTeisu.LABEL_ERROR_MESSAGE, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                basemessagebox.ShowDialog();
                return(true);
            }
        }
Example #12
0
        ///<summary>
        ///updTxtDaibunruiLeave
        ///code入力箇所からフォーカスが外れた時の処理
        ///</summary>
        public void setTxtDaibunruiLeave()
        {
            //データ渡し用
            List <string> lstStringSQL = new List <string>();

            DataTable dtSetCd;

            //情報を投げる必須項目になるため空の情報を作成
            object    sender = null;
            EventArgs e      = null;

            //空白、文字数3以上の場合
            if (this.CodeTxtText == "" || String.IsNullOrWhiteSpace(this.CodeTxtText).Equals(true) || this.CodeTxtText.Length > 2)
            {
                this.ValueLabelText  = "";
                this.AppendLabelText = "";
                return;
            }

            //前後の空白を取り除く
            this.CodeTxtText = this.CodeTxtText.Trim();

            // 禁止文字チェックと数値チェック
            if (StringUtl.JudBanSQL(this.CodeTxtText) == false ||
                StringUtl.JudBanSelect(this.CodeTxtText, CommonTeisu.NUMBER_ONLY) == false)
            {
                //Parent 内のすべてのコントロールを列挙する
                foreach (Control cControl in Parent.Controls)
                {
                    //列挙したコントロールにコントロールが含まれている場合は再帰呼び出しする
                    if (cControl is BaseButton)
                    {
                        if (cControl.Text == "F12:戻る")
                        {
                            //フォーカスがボタンを指している場合
                            Control ctrlParent = ParentForm.ActiveControl;

                            if (ctrlParent.Name == "btnF12")
                            {
                                //全てのフォームの中から
                                foreach (System.Windows.Forms.Form frm in Application.OpenForms)
                                {
                                    //商品のフォームを探す
                                    if (frm.Name == Parent.Name)
                                    {
                                        //中分類リストの場合
                                        if (frm.Name == "ChubunruiList")
                                        {
                                            //データを連れてくるため、newをしないこと
                                            ChubunruiList chubunlist = (ChubunruiList)frm;
                                            chubunlist.btnEndClick(sender, e);
                                            return;
                                        }
                                        //メーカーリストの場合
                                        else if (frm.Name == "MakerList")
                                        {
                                            //データを連れてくるため、newをしないこと
                                            MakerList makerlist = (MakerList)frm;
                                            makerlist.btnEndClick(sender, e);
                                            return;
                                        }
                                    }
                                }
                            }
                        }
                    }
                }

                //グループボックスかパネル内にいる場合
                if (this.Parent is GroupBox || this.Parent is Panel)
                {
                    //メッセージボックスの処理、項目が該当する禁止文字を含む場合のウィンドウ(OK)
                    BaseMessageBox basemessagebox = new BaseMessageBox(Parent.Parent, CommonTeisu.TEXT_INPUT, CommonTeisu.LABEL_MISS, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                    basemessagebox.ShowDialog();
                    SendKeys.Send("+{TAB}");
                }
                else
                {
                    //メッセージボックスの処理、項目が該当する禁止文字を含む場合のウィンドウ(OK)
                    BaseMessageBox basemessagebox = new BaseMessageBox(Parent, CommonTeisu.TEXT_INPUT, CommonTeisu.LABEL_MISS, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                    basemessagebox.ShowDialog();
                    SendKeys.Send("+{TAB}");
                }

                this.ValueLabelText  = "";
                this.AppendLabelText = "";
                this.CodeTxtText     = "";

                //エラーメッセージを表示された
                blMessageOn = true;
                return;
            }

            if (this.CodeTxtText.Length == 1)
            {
                CodeTxtText = CodeTxtText.ToString().PadLeft(2, '0');
            }

            //データ渡し用
            lstStringSQL.Add("Common");
            lstStringSQL.Add("C_LIST_Daibun_SELECT_LEAVE");

            OpenSQL opensql = new OpenSQL();

            try
            {
                string strSQLInput = opensql.setOpenSQL(lstStringSQL);

                if (strSQLInput == "")
                {
                    return;
                }

                strSQLInput = string.Format(strSQLInput, this.CodeTxtText);

                //SQLのインスタンス作成
                DBConnective dbconnective = new DBConnective();

                //SQL文を直書き(+戻り値を受け取る)
                dtSetCd = dbconnective.ReadSql(strSQLInput);

                if (dtSetCd.Rows.Count != 0)
                {
                    this.CodeTxtText    = dtSetCd.Rows[0]["大分類コード"].ToString();
                    this.ValueLabelText = dtSetCd.Rows[0]["大分類名"].ToString();

                    blMessageOn = false;
                }
                else
                {
                    this.ValueLabelText = "";

                    //グループボックスかパネル内にいる場合
                    if (this.Parent is GroupBox || this.Parent is Panel)
                    {
                        //メッセージボックスの処理、項目が該当する禁止文字を含む場合のウィンドウ(OK)
                        BaseMessageBox basemessagebox = new BaseMessageBox(Parent.Parent, CommonTeisu.TEXT_INPUT, CommonTeisu.LABEL_MISS, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                        basemessagebox.ShowDialog();
                        SendKeys.Send("+{TAB}");
                    }
                    else
                    {
                        //メッセージボックスの処理、項目が該当する禁止文字を含む場合のウィンドウ(OK)
                        BaseMessageBox basemessagebox = new BaseMessageBox(Parent, CommonTeisu.TEXT_INPUT, CommonTeisu.LABEL_MISS, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                        basemessagebox.ShowDialog();
                        SendKeys.Send("+{TAB}");
                    }


                    this.ValueLabelText  = "";
                    this.AppendLabelText = "";
                    this.CodeTxtText     = "";

                    //エラーメッセージを表示された
                    blMessageOn = true;
                    return;
                }

                //中分類のプロパティが空でない場合
                if (lschubundata != null)
                {
                    lschubundata.strDaibunCd = dtSetCd.Rows[0]["大分類コード"].ToString();
                }
                if (lsSubchubundata != null)
                {
                    lsSubchubundata.strDaibunCd = dtSetCd.Rows[0]["大分類コード"].ToString();
                }

                //メーカーのプロパティが空でない場合
                if (lsmakerdata != null)
                {
                    lsmakerdata.strDaibunCd = dtSetCd.Rows[0]["大分類コード"].ToString();
                }
                if (lsSubmakerdata != null)
                {
                    lsSubmakerdata.strDaibunCd = dtSetCd.Rows[0]["大分類コード"].ToString();
                }

                return;
            }
            catch (Exception ex)
            {
                //データロギング
                new CommonException(ex);

                //グループボックスかパネル内にいる場合
                if (this.Parent is GroupBox || this.Parent is Panel)
                {
                    //例外発生メッセージ(OK)
                    BaseMessageBox basemessagebox = new BaseMessageBox(this.Parent.Parent, CommonTeisu.TEXT_ERROR, CommonTeisu.LABEL_ERROR_MESSAGE, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                    basemessagebox.ShowDialog();
                    SendKeys.Send("+{TAB}");
                    return;
                }
                else
                {
                    //例外発生メッセージ(OK)
                    BaseMessageBox basemessagebox = new BaseMessageBox(this.Parent, CommonTeisu.TEXT_ERROR, CommonTeisu.LABEL_ERROR_MESSAGE, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                    basemessagebox.ShowDialog();
                    SendKeys.Send("+{TAB}");
                    return;
                }
            }
        }
Example #13
0
        /// <summary>
        /// getKaishajyokenLeave
        /// 会社コード入力箇所からフォーカスが外れた時。会社条件情報取得
        /// </summary>
        public void getKaishajyokenLeave(object sender, EventArgs e)
        {
            // 会社条件情報格納用DataTable
            DataTable dtKaishajyokenInfo;

            // 存在チェック【会社コード】
            if (txtKaisyaCode.blIsEmpty() == false)
            {
                // ファンクション機能を無効化
                this.btnF01.Enabled = false;       // 登録機能
                this.btnF03.Enabled = false;       // 削除機能
                this.btnF04.Enabled = false;       // 取消機能

                return;
            }

            // 会社コードをトリム
            txtKaisyaCode.Text = txtKaisyaCode.Text.Trim();

            // 禁止文字チェック
            if (StringUtl.JudBanSQL(txtKaisyaCode.Text) == false)
            {
                //メッセージボックスの処理、項目が該当する禁止文字を含む場合のウィンドウ(OK)
                BaseMessageBox basemessagebox = new BaseMessageBox(this, CommonTeisu.TEXT_INPUT, CommonTeisu.LABEL_MISS, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                basemessagebox.ShowDialog();

                this.txtKaisyaCode.Text = "";
                txtKaisyaCode.Focus();
                return;
            }

            // 会社コードの一桁で数値の場合パティング
            if (StringUtl.JudBanSelect(txtKaisyaCode.Text, CommonTeisu.NUMBER_ONLY) == true)
            {
                if (txtKaisyaCode.TextLength == 1)
                {
                    txtKaisyaCode.Text = txtKaisyaCode.Text.ToString().PadLeft(2, '0');
                }
            }


            // B層クラス宣言【会社条件】
            M1000_Kaishajyoken_B kaishajyokenB = new M1000_Kaishajyoken_B();

            try
            {
                // B層の会社条件情報取得処理
                dtKaishajyokenInfo = kaishajyokenB.getKaishajyoken(txtKaisyaCode.Text);

                // 会社条件情報の件数チェック
                if (dtKaishajyokenInfo.Rows.Count != 0)
                {
                    // 会社条件情報を画面出力
                    setKaishajyoken(dtKaishajyokenInfo);

                    // ファンクション機能を有効化
                    this.btnF01.Enabled = true;       // 登録機能
                    this.btnF03.Enabled = true;       // 削除機能
                    this.btnF04.Enabled = true;       // 取消機能
                }
                else
                {
                    // 会社コード以外表示クリア
                    txtKaishaName.Text      = "";
                    txtYubinNum.Text        = "";
                    txtJyusyo1.Text         = "";
                    txtJyusyo2.Text         = "";
                    txtDaihyosyaName.Text   = "";
                    txtDennwaNum.Text       = "";
                    txtFaxNum.Text          = "";
                    txtGetumatsusimebi.Text = "";
                    txtKaishiYMD.Text       = "";
                    txtShuryouYMD.Text      = "";

                    // ファンクション機能を有効化(削除以外)
                    this.btnF01.Enabled = true;      // 登録機能
                    this.btnF03.Enabled = false;     // 削除機能
                    this.btnF04.Enabled = false;     // 取消機能
                }

                // 会社名にフォーカスを移動
                txtKaishaName.Focus();
            }
            catch (Exception ex)
            {
                new CommonException(ex);
            }
        }
Example #14
0
        /// <summary>
        /// delKaishajyoken
        /// 会社条件画面の入力情報(会社条件情報)をDBに削除
        /// ※削除キー【会社コード】
        /// </summary>
        public void delKaishajyoken()
        {
            // 会社条件情報格納用DataTable
            DataTable dtKaishajyokenInfo;

            // データ渡し用
            List <string> lstString = new List <string>();

            // メッセージボックス宣言
            BaseMessageBox basemessagebox = null;

            // 存在チェック(会社コード)
            if (txtKaisyaCode.blIsEmpty() == false)
            {
                return;
            }

            // 禁止文字チェック
            if (StringUtl.JudBanSQL(txtKaisyaCode.Text) == false)
            {
                //メッセージボックスの処理、項目が該当する禁止文字を含む場合のウィンドウ(OK)
                basemessagebox = new BaseMessageBox(this, CommonTeisu.TEXT_INPUT, CommonTeisu.LABEL_MISS, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                basemessagebox.ShowDialog();

                this.txtKaisyaCode.Text = "";
                txtKaisyaCode.Focus();
                return;
            }

            // 会社コードの一桁で数値の場合パティング
            if (StringUtl.JudBanSelect(txtKaisyaCode.Text, CommonTeisu.NUMBER_ONLY) == true)
            {
                if (txtKaisyaCode.TextLength == 1)
                {
                    txtKaisyaCode.Text = txtKaisyaCode.Text.ToString().PadLeft(2, '0');
                }
            }

            // B層クラス宣言【会社条件】
            M1000_Kaishajyoken_B kaishajyokenB = new M1000_Kaishajyoken_B();

            try
            {
                // B層の会社条件情報取得処理
                dtKaishajyokenInfo = kaishajyokenB.getKaishajyoken(txtKaisyaCode.Text);

                //検索結果にデータが存在しなければ終了
                if (dtKaishajyokenInfo.Rows.Count == 0)
                {
                    return;
                }

                //メッセージボックスの処理、削除するか否かのウィンドウ(YES,NO)
                basemessagebox = new BaseMessageBox(this, CommonTeisu.TEXT_DEL, CommonTeisu.LABEL_DEL_BEFORE, CommonTeisu.BTN_YESNO, CommonTeisu.DIAG_QUESTION);
                //NOが押された場合
                if (basemessagebox.ShowDialog() == DialogResult.No)
                {
                    return;
                }

                // 画面情報【会社条件情報】を会社条件情報削除B層へのリスト格納
                lstString.Add(dtKaishajyokenInfo.Rows[0]["会社コード"].ToString());                     // 会社コード
                lstString.Add(dtKaishajyokenInfo.Rows[0]["会社名"].ToString());                       // 会社名
                lstString.Add(dtKaishajyokenInfo.Rows[0]["郵便番号"].ToString());                      // 郵便番号
                lstString.Add(dtKaishajyokenInfo.Rows[0]["住所1"].ToString());                       // 住所1
                lstString.Add(dtKaishajyokenInfo.Rows[0]["住所2"].ToString());                       // 住所2
                lstString.Add(dtKaishajyokenInfo.Rows[0]["代表者名"].ToString());                      // 代表者名
                lstString.Add(dtKaishajyokenInfo.Rows[0]["電話番号"].ToString());                      // 電話番号
                lstString.Add(dtKaishajyokenInfo.Rows[0]["FAX"].ToString());                       // FAX
                lstString.Add(dtKaishajyokenInfo.Rows[0]["期首月"].ToString());                       // 期首月
                lstString.Add(dtKaishajyokenInfo.Rows[0]["開始年月日"].ToString().Substring(0, 10));    // 開始年月日
                lstString.Add(dtKaishajyokenInfo.Rows[0]["終了年月日"].ToString().Substring(0, 10));    // 終了年月日
                lstString.Add(SystemInformation.UserName);                                         // ユーザ名

                // B層削除メソッド
                kaishajyokenB.delKaishajyoken(lstString);
                //メッセージボックスの処理、削除完了のウィンドウ(OK)
                basemessagebox = new BaseMessageBox(this, CommonTeisu.TEXT_DEL, CommonTeisu.LABEL_DEL_AFTER, CommonTeisu.BTN_OK, CommonTeisu.DIAG_INFOMATION);
                basemessagebox.ShowDialog();
                //テキストボックスを白紙にする
                delText();

                this.btnF01.Enabled = false;
                this.btnF03.Enabled = false;
                this.btnF04.Enabled = false;

                txtKaisyaCode.Focus();
            }
            catch (Exception ex)
            {
                new CommonException(ex);
            }
        }
Example #15
0
        /// <summary>
        /// addKaishajyoken
        /// 会社条件画面の入力情報(会社条件情報)をDBに登録及び更新
        /// </summary>
        private void addKaishajyoken()
        {
            // データ渡し用
            List <string> lstString = new List <string>();

            // 文字判定(会社名)
            if (txtKaisyaCode.blIsEmpty() == false)
            {
                //メッセージボックスの処理、項目が空の場合のウィンドウ(OK)
                BaseMessageBox basemessagebox = new BaseMessageBox(this, CommonTeisu.TEXT_INPUT, CommonTeisu.LABEL_NULL, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                basemessagebox.ShowDialog();
                txtKaisyaCode.Focus();
                return;
            }
            // 文字判定(会社名)
            if (txtKaishaName.blIsEmpty() == false)
            {
                //メッセージボックスの処理、項目が空の場合のウィンドウ(OK)
                BaseMessageBox basemessagebox = new BaseMessageBox(this, CommonTeisu.TEXT_INPUT, CommonTeisu.LABEL_NULL, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                basemessagebox.ShowDialog();
                txtKaishaName.Focus();
                return;
            }
            // 文字判定(郵便番号)
            if (txtYubinNum.blIsEmpty() == false)
            {
                //メッセージボックスの処理、項目が空の場合のウィンドウ(OK)
                BaseMessageBox basemessagebox = new BaseMessageBox(this, CommonTeisu.TEXT_INPUT, CommonTeisu.LABEL_NULL, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                basemessagebox.ShowDialog();
                txtYubinNum.Focus();
                return;
            }
            // 文字判定(住所1)
            if (txtJyusyo1.blIsEmpty() == false)
            {
                //メッセージボックスの処理、項目が空の場合のウィンドウ(OK)
                BaseMessageBox basemessagebox = new BaseMessageBox(this, CommonTeisu.TEXT_INPUT, CommonTeisu.LABEL_NULL, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                basemessagebox.ShowDialog();
                txtJyusyo1.Focus();
                return;
            }
            // 文字判定(電話番号)
            if (txtDennwaNum.blIsEmpty() == false)
            {
                //メッセージボックスの処理、項目が空の場合のウィンドウ(OK)
                BaseMessageBox basemessagebox = new BaseMessageBox(this, CommonTeisu.TEXT_INPUT, CommonTeisu.LABEL_NULL, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                basemessagebox.ShowDialog();
                txtDennwaNum.Focus();
                return;
            }
            // 文字判定(FAX番号)
            if (txtFaxNum.blIsEmpty() == false)
            {
                //メッセージボックスの処理、項目が空の場合のウィンドウ(OK)
                BaseMessageBox basemessagebox = new BaseMessageBox(this, CommonTeisu.TEXT_INPUT, CommonTeisu.LABEL_NULL, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                basemessagebox.ShowDialog();
                txtFaxNum.Focus();
                return;
            }
            // 文字判定(期首月)
            if (txtGetumatsusimebi.blIsEmpty() == false)
            {
                //メッセージボックスの処理、項目が空の場合のウィンドウ(OK)
                BaseMessageBox basemessagebox = new BaseMessageBox(this, CommonTeisu.TEXT_INPUT, CommonTeisu.LABEL_NULL, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                basemessagebox.ShowDialog();
                txtGetumatsusimebi.Focus();
                return;
            }
            // 文字判定(会計期間-開始年月日)
            if (txtKaishiYMD.blIsEmpty() == false)
            {
                //メッセージボックスの処理、項目が空の場合のウィンドウ(OK)
                BaseMessageBox basemessagebox = new BaseMessageBox(this, CommonTeisu.TEXT_INPUT, CommonTeisu.LABEL_NULL, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                basemessagebox.ShowDialog();
                txtKaishiYMD.Focus();
                return;
            }
            // 文字判定(会計期間-終了年月日)
            if (txtShuryouYMD.blIsEmpty() == false)
            {
                //メッセージボックスの処理、項目が空の場合のウィンドウ(OK)
                BaseMessageBox basemessagebox = new BaseMessageBox(this, CommonTeisu.TEXT_INPUT, CommonTeisu.LABEL_NULL, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                basemessagebox.ShowDialog();
                txtShuryouYMD.Focus();
                return;
            }

            // 禁止文字チェック
            if (StringUtl.JudBanSQL(txtKaisyaCode.Text) == false)
            {
                //メッセージボックスの処理、項目が該当する禁止文字を含む場合のウィンドウ(OK)
                BaseMessageBox basemessagebox = new BaseMessageBox(this, CommonTeisu.TEXT_INPUT, CommonTeisu.LABEL_MISS, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                basemessagebox.ShowDialog();

                this.txtKaisyaCode.Text = "";
                txtKaisyaCode.Focus();
                return;
            }

            // 会社コードの一桁で数値の場合パティング
            if (StringUtl.JudBanSelect(txtKaisyaCode.Text, CommonTeisu.NUMBER_ONLY) == true)
            {
                if (txtKaisyaCode.TextLength == 1)
                {
                    txtKaisyaCode.Text = txtKaisyaCode.Text.ToString().PadLeft(2, '0');
                }
            }

            // 画面情報【会社条件情報】を会社条件情報登録B層へのリスト格納
            lstString.Add(txtKaisyaCode.Text);         // 会社コード
            lstString.Add(txtKaishaName.Text);         // 会社名
            lstString.Add(txtYubinNum.Text);           // 郵便番号
            lstString.Add(txtJyusyo1.Text);            // 住所1
            lstString.Add(txtJyusyo2.Text);            // 住所2
            lstString.Add(txtDaihyosyaName.Text);      // 代表者名
            lstString.Add(txtDennwaNum.Text);          // 電話番号
            lstString.Add(txtFaxNum.Text);             // FAX
            lstString.Add(txtGetumatsusimebi.Text);    // 期首月
            lstString.Add(txtKaishiYMD.Text);          // 開始年月日
            lstString.Add(txtShuryouYMD.Text);         // 終了年月日
            lstString.Add(SystemInformation.UserName); // ユーザ名

            // B層クラス宣言【会社条件】
            M1000_Kaishajyoken_B kaishajyokenB = new M1000_Kaishajyoken_B();

            try
            {
                // B層登録及び更新メソッド
                kaishajyokenB.addKaishajyoken(lstString);

                // メッセージボックスの処理、登録完了のウィンドウ(OK)
                BaseMessageBox basemessagebox = new BaseMessageBox(this, CommonTeisu.TEXT_TOUROKU, CommonTeisu.LABEL_TOUROKU, CommonTeisu.BTN_OK, CommonTeisu.DIAG_INFOMATION);
                basemessagebox.ShowDialog();
                //テキストボックスを白紙にする
                delText();
            }
            // 例外処理(B層での例外をキャッチする)
            catch (Exception ex)
            {
                // ログ出力処理
                new CommonException(ex);
            }
        }