/// <summary> /// 追加アクション /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void addBtn_Click(object sender, EventArgs e) { bool isNgRequired = false; if (String.IsNullOrEmpty(this.ronrimei1TextBox.Text)) { errorProvider1.SetError(this.ronrimei1TextBox, MessageConst.ERR_001); isNgRequired = true; } if (String.IsNullOrEmpty(this.dataTypeCbx.Text)) { errorProvider1.SetError(this.dataTypeCbx, MessageConst.ERR_001); isNgRequired = true; } if (String.IsNullOrEmpty(this.butsurimeiTextBox.Text)) { errorProvider1.SetError(this.butsurimeiTextBox, MessageConst.ERR_001); isNgRequired = true; } if (isNgRequired) { return; } TanitsuTorokuAddServiceInBo addServiseInBo = new TanitsuTorokuAddServiceInBo(); TanitsuTorokuAddService addService = new TanitsuTorokuAddService(); addServiseInBo.ronrimei1TextBox = this.ronrimei1TextBox.Text; addServiseInBo.butsurimeiTextBox = this.butsurimeiTextBox.Text; addServiseInBo.dataType = this.dataTypeCbx.Text; addServiseInBo.tanitsuDataGridView = this.tanitsuDataGridView; addServiseInBo.registeredPairsFlg = this.registeredPairsCbx.Checked; addService.setInBo(addServiseInBo); TanitsuTorokuAddServiceOutBo addServiseOutBo = addService.execute(); if (!String.IsNullOrEmpty(addServiseOutBo.errorMessage)) { MessageBox.Show( addServiseOutBo.errorMessage, MessageConst.ERR_003, MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } this.henshuViewDispSetthing(ref this.tanitsuDataGridView, addServiseOutBo.wordList); }
/// <summary> /// 追加アクション /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void addBtn_Click(object sender, EventArgs e) { bool isNgRequired = false; if (String.IsNullOrEmpty(this.ronrimei1TextBox.Text)) { errorProvider1.SetError(this.ronrimei1TextBox, MessageConst.ERR_001); isNgRequired = true; } if (String.IsNullOrEmpty(this.ronrimei2TextBox.Text)) { errorProvider1.SetError(this.ronrimei2TextBox, MessageConst.ERR_001); isNgRequired = true; } if (String.IsNullOrEmpty(this.butsurimeiTextBox.Text)) { errorProvider1.SetError(this.butsurimeiTextBox, MessageConst.ERR_001); isNgRequired = true; } if (isNgRequired) { return; } TanitsuTorokuAddServiceInBo addServiseInBo = new TanitsuTorokuAddServiceInBo(); TanitsuTorokuAddService addService = new TanitsuTorokuAddService(); addServiseInBo.ronrimei1TextBox = this.ronrimei1TextBox.Text; addServiseInBo.ronrimei2TextBox = this.ronrimei2TextBox.Text; addServiseInBo.butsurimeiTextBox = this.butsurimeiTextBox.Text; addServiseInBo.tanitsuDataGridView = this.tanitsuDataGridView; addService.setInBo(addServiseInBo); TanitsuTorokuAddServiceOutBo addServiseOutBo = addService.execute(); if (!String.IsNullOrEmpty(addServiseOutBo.errorMessage)) { MessageBox.Show( addServiseOutBo.errorMessage, MessageConst.ERR_003, MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } this.henshuViewDispSetthing(ref this.tanitsuDataGridView, addServiseOutBo.wordList); }