private bool CheckDetail(int index)
        {
            switch (index)
            {
            case (int)EIndex.DayStart:
            case (int)EIndex.DayEnd:
            case (int)EIndex.InputStart:
            case (int)EIndex.InputEnd:
                if (string.IsNullOrWhiteSpace(detailControls[index].Text))
                {
                    return(true);
                }

                detailControls[index].Text = nnbl.FormatDate(detailControls[index].Text);

                //日付として正しいこと(Be on the correct date)E103
                if (!nnbl.CheckDate(detailControls[index].Text))
                {
                    //E103
                    nnbl.ShowMessage("E103");
                    return(false);
                }
                //(From) ≧ (To)である場合Error
                if (index == (int)EIndex.DayEnd || index == (int)EIndex.InputEnd)
                {
                    if (!string.IsNullOrWhiteSpace(detailControls[index - 1].Text) && !string.IsNullOrWhiteSpace(detailControls[index].Text))
                    {
                        int result = detailControls[index].Text.CompareTo(detailControls[index - 1].Text);
                        if (result < 0)
                        {
                            //E106
                            nnbl.ShowMessage("E104");
                            detailControls[index].Focus();
                            return(false);
                        }
                    }
                }

                break;
            }

            return(true);
        }
        /// <summary>
        /// コードチェック
        /// </summary>
        /// <param name="index"></param>
        /// <returns></returns>
        private bool CheckDetail(int index)
        {
            if (detailControls[index].GetType().Equals(typeof(CKM_Controls.CKM_TextBox)))
            {
                if (((CKM_Controls.CKM_TextBox)detailControls[index]).isMaxLengthErr)
                {
                    return(false);
                }
            }

            switch (index)
            {
            case (int)EIndex.BillingGakuStart:
            case (int)EIndex.BillingGakuStartEnd:
                //入力必須(Entry required)	入力なければError(If there is no input, an error)
                if (string.IsNullOrWhiteSpace(detailControls[index].Text))
                {
                    nnbl.ShowMessage("E102");
                    return(false);
                }
                //表示単位が納品書の場合、項目名は「売上額」
                //(From) ≧ (To)である場合Error
                if (index == (int)EIndex.BillingGakuStartEnd)
                {
                    if (nnbl.Z_Set(detailControls[index - 1].Text) > nnbl.Z_Set(detailControls[index].Text))
                    {
                        //E106
                        nnbl.ShowMessage("E104");
                        return(false);
                    }
                }
                break;

            case (int)EIndex.InputStart:
            case (int)EIndex.InputEnd:
                //入金状況:入金済ONの場合、入力必須(Entry required)
                if (ckM_CheckBox2.Checked)
                {
                    if (string.IsNullOrWhiteSpace(detailControls[index].Text))
                    {
                        nnbl.ShowMessage("E102");
                        return(false);
                    }
                }

                if (string.IsNullOrWhiteSpace(detailControls[index].Text))
                {
                    return(true);
                }

                detailControls[index].Text = nnbl.FormatDate(detailControls[index].Text);

                //日付として正しいこと(Be on the correct date)E103
                if (!nnbl.CheckDate(detailControls[index].Text))
                {
                    //E103
                    nnbl.ShowMessage("E103");
                    return(false);
                }
                //(From) ≧ (To)である場合Error
                if (index == (int)EIndex.InputEnd)
                {
                    if (!string.IsNullOrWhiteSpace(detailControls[index - 1].Text) && !string.IsNullOrWhiteSpace(detailControls[index].Text))
                    {
                        int result = detailControls[index].Text.CompareTo(detailControls[index - 1].Text);
                        if (result < 0)
                        {
                            //E106
                            nnbl.ShowMessage("E104");
                            detailControls[index].Focus();
                            return(false);
                        }
                    }
                }
                else
                {
                    //入金日ToがNullの場合、入金日Fromを入金日Toにコピー
                    if (string.IsNullOrWhiteSpace(detailControls[index + 1].Text))
                    {
                        detailControls[index + 1].Text = detailControls[index].Text;
                    }
                }

                break;

            case (int)EIndex.StoreCD:
                //選択必須(Entry required)
                if (!RequireCheck(new Control[] { CboStoreCD }))
                {
                    CboStoreCD.MoveNext = false;
                    return(false);
                }
                else
                {
                    //店舗権限のチェック、引数で処理可能店舗の配列をセットしたい
                    if (!base.CheckAvailableStores(CboStoreCD.SelectedValue.ToString()))
                    {
                        CboStoreCD.MoveNext = false;
                        nnbl.ShowMessage("E141");
                        return(false);
                    }
                }
                break;

            case (int)EIndex.CustomerName:
                //入力必須(Entry required)
                if (string.IsNullOrWhiteSpace(detailControls[index].Text))
                {
                    nnbl.ShowMessage("E102");
                    return(false);
                }

                break;

            case (int)EIndex.Chk2:

                //両方チェックが入っていない場合、Error(If both are not checked, Error)
                if (!ckM_CheckBox1.Checked && !ckM_CheckBox2.Checked)
                {
                    //E111
                    nnbl.ShowMessage("E111");
                    ckM_CheckBox1.Focus();
                    return(false);
                }
                break;
            }

            return(true);
        }
        private bool CheckDetail(int index)
        {
            switch (index)
            {
            case (int)EIndex.DayStart:
            case (int)EIndex.DayEnd:
            case (int)EIndex.InputStart:
            case (int)EIndex.InputEnd:
                if (string.IsNullOrWhiteSpace(detailControls[index].Text))
                {
                    return(true);
                }

                detailControls[index].Text = nnbl.FormatDate(detailControls[index].Text);

                //日付として正しいこと(Be on the correct date)E103
                if (!nnbl.CheckDate(detailControls[index].Text))
                {
                    //E103
                    nnbl.ShowMessage("E103");
                    return(false);
                }
                //(From) ≧ (To)である場合Error
                if (index == (int)EIndex.DayEnd || index == (int)EIndex.InputEnd)
                {
                    if (!string.IsNullOrWhiteSpace(detailControls[index - 1].Text) && !string.IsNullOrWhiteSpace(detailControls[index].Text))
                    {
                        int result = detailControls[index].Text.CompareTo(detailControls[index - 1].Text);
                        if (result < 0)
                        {
                            //E106
                            nnbl.ShowMessage("E104");
                            detailControls[index].Focus();
                            return(false);
                        }
                    }
                }

                break;

            case (int)EIndex.StoreCD:
                if (CboStoreCD.SelectedIndex == -1)
                {
                    nnbl.ShowMessage("E102");
                    CboStoreCD.Focus();
                    return(false);
                }
                else
                {
                    //店舗権限のチェック、引数で処理可能店舗の配列をセットしたい
                    if (!base.CheckAvailableStores(CboStoreCD.SelectedValue.ToString()))
                    {
                        nnbl.ShowMessage("E141");
                        CboStoreCD.Focus();
                        return(false);
                    }
                }
                break;

            case (int)EIndex.CustomerCD:
                if (string.IsNullOrWhiteSpace(detailControls[index].Text))
                {
                    ScCustomer.LabelText = "";
                    return(true);
                }

                //[M_Customer_Select]
                M_Customer_Entity mce = new M_Customer_Entity
                {
                    CustomerCD = detailControls[index].Text,
                    ChangeDate = nnbl.GetDate()         // detailControls[(int)EIndex.MitsumoriDate].Text
                };
                Customer_BL sbl = new Customer_BL();
                bool        ret = sbl.M_Customer_Select(mce);
                if (ret)
                {
                    ScCustomer.LabelText = mce.CustomerName;
                }
                else
                {
                    nnbl.ShowMessage("E101");
                    ScCustomer.LabelText = "";
                    return(false);
                }

                break;
            }

            return(true);
        }