示例#1
0
        /// <summary>
        /// 「読み込み」アクション
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void readFile_Click(object sender, EventArgs e)
        {
            if (String.IsNullOrEmpty(this.filePath.Text))
            {
                errorProvider1.SetError(this.filePath, MessageConst.ERR_001);
                return;
            }

            IkkatsuTorokuReadFileService     readFileService     = new IkkatsuTorokuReadFileService();
            IkkatsuTorokuReadFileServiceInBo readFileServiceInBo = new IkkatsuTorokuReadFileServiceInBo();

            readFileServiceInBo.Filename = this.filePath.Text;
            readFileServiceInBo.registeredPairsIkkatsu = this.registeredPairsIkkatsuCbx.Checked;
            readFileService.setInBo(readFileServiceInBo);
            IkkatsuTorokuReadFileServiceOutBo registServiceOutBo = readFileService.execute();

            if (!String.IsNullOrEmpty(registServiceOutBo.errorMessage))
            {
                MessageBox.Show(
                    registServiceOutBo.errorMessage,
                    MessageConst.ERR_003,
                    MessageBoxButtons.OK,
                    MessageBoxIcon.Warning);

                return;
            }
        }
示例#2
0
        /// <summary>
        /// 「読み込み」アクション
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void readFile_Click(object sender, EventArgs e)
        {
            if (String.IsNullOrEmpty(this.filePath.Text))
            {
                errorProvider1.SetError(this.filePath, MessageConst.ERR_001);
                return;
            }

            IkkatsuTorokuReadFileService readFileService = new IkkatsuTorokuReadFileService();
            IkkatsuTorokuReadFileServiceInBo readFileServiceInBo = new IkkatsuTorokuReadFileServiceInBo();
            readFileServiceInBo.Filename = this.filePath.Text;
            readFileService.setInBo(readFileServiceInBo);
            IkkatsuTorokuReadFileServiceOutBo registServiceOutBo = readFileService.execute();

            if (!String.IsNullOrEmpty(registServiceOutBo.errorMessage))
            {
                MessageBox.Show(
                    registServiceOutBo.errorMessage,
                    MessageConst.ERR_003,
                    MessageBoxButtons.OK,
                    MessageBoxIcon.Warning);

                return;
            }
        }