using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Bellmonzo.Koubai.Common;
using Bellmonzo.Koubai.Common.Windows.Validate;

namespace Bellmonzo.Koubai.Forms
{
    public partial class FrmCond : Bellmonzo.Koubai.Forms.FrmBase
    {
        public FrmCond()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            FormValidator.ErrorClear(this);
            int code;
            try {
                code = FormValidator.InRangeCheck("科目コード", txtCode, 0, 9999);
                FormValidator.RequiredCheck("科目名", txtName);

            } catch (ValidateException ex){
                MessageBox.Show(ex.GetDisplayMessage(), Text, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
        }
    }
}
