示例#1
0
        private bool ErrorCheck()
        {
            //必須入力(Entry required)、入力なければエラー(If there is no input, an error)E102
            if (string.IsNullOrWhiteSpace(txtSalesDate.Text))
            {
                //E102
                bbl.ShowMessage("E102");
                txtSalesDate.Focus();
                return(false);
            }

            txtSalesDate.Text = bbl.FormatDate(txtSalesDate.Text);

            //日付として正しいこと(Be on the correct date)E103
            if (!bbl.CheckDate(txtSalesDate.Text))
            {
                //E103
                bbl.ShowMessage("E103");
                txtSalesDate.Focus();
                return(false);
            }
            //入力できる範囲内の日付であること
            if (!bbl.CheckInputPossibleDate(txtSalesDate.Text))
            {
                //E115
                bbl.ShowMessage("E115");
                txtSalesDate.Focus();
                return(false);
            }
            //過去日付でないこと
            //共通処理-日付チェック-会計チェック
            if (!bbl.CheckInputPossibleDateWithFisicalMonth(txtSalesDate.Text))
            {
                //E115
                bbl.ShowMessage("E115");
                txtSalesDate.Focus();
                return(false);
            }

            return(true);
        }