//////////////////////////////////////////////////////////////////////////// // イベント名 : decisionButton_Click /// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> /// <history> /// 日付 担当者 内容 /// 2014/06/26 AnhNV 新規作成 /// </history> //////////////////////////////////////////////////////////////////////////// private void decisionButton_Click(object sender, EventArgs e) { TraceLog.StartWrite(MethodInfo.GetCurrentMethod()); Cursor preCursor = Cursor.Current; try { Cursor.Current = Cursors.WaitCursor; this._dispMode = string.IsNullOrEmpty(this._shishoCd) ? DispMode.Add : DispMode.Edit; IDecisionBtnClickALInput decInput = new DecisionBtnClickALInput(); decInput.DispMode = this._dispMode; decInput.ShishoMstDataTable = (this._dispMode == DispMode.Add) ? CreateShishoMstInsert() : CreateShishoMstUpdate(_dispTable); IDecisionBtnClickALOutput decOutput = new DecisionBtnClickApplicationLogic().Execute(decInput); // Edit mode if (!string.IsNullOrEmpty(decOutput.ErrMsg)) { MessageForm.Show2(MessageForm.DispModeType.Error, decOutput.ErrMsg); return; } ShishoMstListForm frm = new ShishoMstListForm(); Program.mForm.ShowForm(frm); } catch (Exception ex) { TraceLog.ErrorWrite(MethodInfo.GetCurrentMethod(), ex.ToString()); MessageForm.Show(MessageForm.DispModeType.Error, MessageResouce.MSGID_E00001, ex.Message); } finally { Cursor.Current = preCursor; TraceLog.EndWrite(MethodInfo.GetCurrentMethod()); } }
//////////////////////////////////////////////////////////////////////////// // メソッド名 : DoUpdate /// <summary> /// /// </summary> /// <history> /// 日付 担当者 内容 /// 2014/06/30 DatNT 新規作成 /// </history> //////////////////////////////////////////////////////////////////////////// private void DoUpdate() { ShoriHoshikiMstDataSet.ShoriHoshikiMstDataTable updateDT = new ShoriHoshikiMstDataSet.ShoriHoshikiMstDataTable(); if (_updateMode == DispMode.Add) { updateDT = CreateDataInsert(); } else { updateDT = CreateDataUpdate(_dispDT); } IDecisionBtnClickALInput alInput = new DecisionBtnClickALInput(); alInput.DispMode = _updateMode; alInput.ShoriHoshikiMstDT = updateDT; IDecisionBtnClickALOutput alOutput = new DecisionBtnClickApplicationLogic().Execute(alInput); if (!string.IsNullOrEmpty(alOutput.ErrMessage)) { MessageForm.Show2(MessageForm.DispModeType.Error, alOutput.ErrMessage); return; } else { ShoriHoshikiMstListForm frm = new ShoriHoshikiMstListForm(); Program.mForm.ShowForm(frm); } }
//////////////////////////////////////////////////////////////////////////// // イベント名 : decisionButton_Click /// <summary> /// /// </summary> /// <param name="e"></param> /// <param name="sender"></param> /// <history> /// 日付 担当者 内容 /// 2014/07/29 HuyTX 新規作成 /// </history> //////////////////////////////////////////////////////////////////////////// private void decisionButton_Click(object sender, EventArgs e) { TraceLog.StartWrite(MethodInfo.GetCurrentMethod()); Cursor preCursor = Cursor.Current; try { Cursor.Current = Cursors.WaitCursor; IDecisionBtnClickALInput alInput = new DecisionBtnClickALInput(); //insert data if (string.IsNullOrEmpty(this._kenchikuyotoDaibunruiCd) && string.IsNullOrEmpty(this._kenchikuyotoShobunruiCd) && string.IsNullOrEmpty(this._kenchikuyotoRenban)) { alInput.DisplayMode = DispMode.Add; alInput.KenchikuyotoMstDataTable = CreateKenchikuyotoMstInsert(); } else { //update data alInput.DisplayMode = DispMode.Edit; alInput.KenchikuyotoMstDataTable = CreateKenchikuyotoMstUpdate(_kenchikuyotoMstDataTable); } IDecisionBtnClickALOutput alOutput = new DecisionBtnClickApplicationLogic().Execute(alInput); if (!string.IsNullOrEmpty(alOutput.ErrMessage)) { string kenchikuyotoDaibunruiNm = kenchikuyotoDaibunruiListBox.GetItemText(kenchikuyotoDaibunruiListBox.SelectedItem); string kenchikuyotoShobunruiNm = kenchikuyotoShobunruiListBox.GetItemText(kenchikuyotoShobunruiListBox.SelectedItem); MessageForm.Show2(MessageForm.DispModeType.Error, string.Format(alOutput.ErrMessage, new string[] { kenchikuyotoDaibunruiNm, kenchikuyotoShobunruiNm, alInput.KenchikuyotoMstDataTable[0].KenchikuyotoRenban.ToString() })); return; } //close form and redirect KenchikuyotoMstListForm KenchikuyotoMstListForm frm = new KenchikuyotoMstListForm(); Program.mForm.ShowForm(frm); } catch (Exception ex) { TraceLog.ErrorWrite(MethodInfo.GetCurrentMethod(), ex.ToString()); MessageForm.Show(MessageForm.DispModeType.Error, MessageResouce.MSGID_E00001, ex.Message); } finally { Cursor.Current = preCursor; TraceLog.EndWrite(MethodInfo.GetCurrentMethod()); } }
//////////////////////////////////////////////////////////////////////////// // イベント名 : decisionButton_Click /// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> /// <history> /// 日付 担当者 内容 /// 2014/07/03 HuyTX 新規作成 /// </history> //////////////////////////////////////////////////////////////////////////// private void decisionButton_Click(object sender, EventArgs e) { TraceLog.StartWrite(MethodInfo.GetCurrentMethod()); Cursor preCursor = Cursor.Current; try { Cursor.Current = Cursors.WaitCursor; IDecisionBtnClickALInput alInput = new DecisionBtnClickALInput(); //insert data if (string.IsNullOrEmpty(this._suishitsuShikenKoumokuCd)) { alInput.DisplayMode = DispMode.Add; alInput.SuishitsuShikenKoumokuMstDataTable = CreateSuishitsuShikenKoumokuMstInsert(); } else { //update data alInput.DisplayMode = DispMode.Edit; alInput.SuishitsuShikenKoumokuMstDataTable = CreateSuishitsuShikenKoumokuMstUpdate(this._suishitsuShikenKoumokuDT); } IDecisionBtnClickALOutput alOutput = new DecisionBtnClickApplicationLogic().Execute(alInput); if (!string.IsNullOrEmpty(alOutput.ErrMessage)) { MessageForm.Show2(MessageForm.DispModeType.Error, alOutput.ErrMessage); return; } //close form and redirect SuishitsuShikenKoumokuMstListForm SuishitsuShikenKoumokuMstListForm frm = new SuishitsuShikenKoumokuMstListForm(); Program.mForm.ShowForm(frm); } catch (Exception ex) { TraceLog.ErrorWrite(MethodInfo.GetCurrentMethod(), ex.ToString()); MessageForm.Show(MessageForm.DispModeType.Error, MessageResouce.MSGID_E00001, ex.Message); } finally { Cursor.Current = preCursor; TraceLog.EndWrite(MethodInfo.GetCurrentMethod()); } }
//////////////////////////////////////////////////////////////////////////// // メソッド名 : DoUpdate /// <summary> /// /// </summary> /// <history> /// 日付 担当者 内容 /// 2014/07/08 DatNT 新規作成 /// </history> //////////////////////////////////////////////////////////////////////////// private void DoUpdate() { // KatashikiMst KatashikiMstDataSet.KatashikiMstDataTable mstDT = new KatashikiMstDataSet.KatashikiMstDataTable(); // KatashikiBurowaMst KatashikiBurowaMstDataSet.KatashikiBurowaMstDataTable buroDT = new KatashikiBurowaMstDataSet.KatashikiBurowaMstDataTable(); // KatashikiBetsuTaniSochiMst KatashikiBetsuTaniSochiMstDataSet.KatashikiBetsuTaniSochiMstDataTable sochiDT = new KatashikiBetsuTaniSochiMstDataSet.KatashikiBetsuTaniSochiMstDataTable(); // current time DateTime now = Common.Common.GetCurrentTimestamp(); if (_updateMode == DispMode.Add) { mstDT = CreateMstDTInsert(now); buroDT = CreateBuroDTInsert(now); sochiDT = CreateSochiDTInsert(now); } else { mstDT = CreateMstDTUpdate(_mstDT, now); buroDT = CreateBuroDTUpdate(now); sochiDT = CreateSochiDTInsert(now); } IDecisionBtnClickALInput alInput = new DecisionBtnClickALInput(); alInput.DispMode = _updateMode; alInput.KatashikiMstDT = mstDT; alInput.KatashikiBurowaMstDT = buroDT; alInput.KatashikiBetsuTaniSochiMstDT = sochiDT; IDecisionBtnClickALOutput alOutput = new DecisionBtnClickApplicationLogic().Execute(alInput); if (!string.IsNullOrEmpty(alOutput.ErrorMessage)) { MessageForm.Show2(MessageForm.DispModeType.Error, alOutput.ErrorMessage); } else { KatashikiMstListForm frm = new KatashikiMstListForm(); Program.mForm.ShowForm(frm); } }
//////////////////////////////////////////////////////////////////////////// // イベント名 : decisionButton_Click /// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> /// <history> /// 日付 担当者 内容 /// 2014/07/21 AnhNV 新規作成 /// </history> //////////////////////////////////////////////////////////////////////////// private void decisionButton_Click(object sender, EventArgs e) { TraceLog.StartWrite(MethodInfo.GetCurrentMethod()); Cursor preCursor = Cursor.Current; try { Cursor.Current = Cursors.WaitCursor; IDecisionBtnClickALInput alInput = new DecisionBtnClickALInput(); alInput.UpdateData = MakeUpdateData(); IDecisionBtnClickALOutput alOutput = new DecisionBtnClickApplicationLogic().Execute(alInput); // Update error if (!string.IsNullOrEmpty(alOutput.ErrMsg)) { MessageForm.Show2(MessageForm.DispModeType.Error, alOutput.ErrMsg); return; } // Close this form this.Close(); // Open the list form TyumonListForm frm = new TyumonListForm(); frm.ShowDialog(); } catch (Exception ex) { TraceLog.ErrorWrite(MethodInfo.GetCurrentMethod(), ex.ToString()); MessageForm.Show(MessageForm.DispModeType.Error, MessageResouce.MSGID_E00001, ex.Message); } finally { Cursor.Current = preCursor; TraceLog.EndWrite(MethodInfo.GetCurrentMethod()); } }
//////////////////////////////////////////////////////////////////////////// // メソッド名 : DoUpdate /// <summary> /// /// </summary> /// <history> /// 日付 担当者 内容 /// 2014/07/18 AnhNV 新規作成 /// </history> //////////////////////////////////////////////////////////////////////////// private bool DoUpdate() { // Warning message for delete if (_dispMode == DispMode.Delete && MessageForm.Show2(MessageForm.DispModeType.Question, "表示されているデータが削除されます。よろしいですか?") != DialogResult.Yes) { return false; } IDecisionBtnClickALInput alInput = new DecisionBtnClickALInput(); alInput.HoshoTorokuTblDT = _dispMode == DispMode.Edit ? CreateHoshoTorokuTblUpdate(_hoshoTorokuTbl) : CreateHoshoTorokuTblDelete(_hoshoTorokuTbl); IDecisionBtnClickALOutput alOutput = new DecisionBtnClickApplicationLogic().Execute(alInput); // Update failed if (!string.IsNullOrEmpty(alOutput.ErrMsg)) { MessageForm.Show2(MessageForm.DispModeType.Error, alOutput.ErrMsg); return false; } return true; }