//////////////////////////////////////////////////////////////////////////// // メソッド名 : 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); } }
//////////////////////////////////////////////////////////////////////////// // イベント名 : closeButton_Click /// <summary> /// /// </summary> /// <param name="e"></param> /// <param name="sender"></param> /// <history> /// 日付 担当者 内容 /// 2014/06/30 DatNT 新規作成 /// </history> //////////////////////////////////////////////////////////////////////////// private void closeButton_Click(object sender, EventArgs e) { TraceLog.StartWrite(MethodInfo.GetCurrentMethod()); Cursor preCursor = Cursor.Current; try { Cursor.Current = Cursors.WaitCursor; if (_dispMode != DispMode.Detail) { if (!CheckEdit()) { if (MessageForm.Show2(MessageForm.DispModeType.Question, "編集内容が破棄されます。よろしいですか?") == System.Windows.Forms.DialogResult.Yes) { ShoriHoshikiMstListForm frm = new ShoriHoshikiMstListForm(); Program.mForm.ShowForm(frm); } } else { ShoriHoshikiMstListForm frm = new ShoriHoshikiMstListForm(); Program.mForm.ShowForm(frm); } } else { ShoriHoshikiMstListForm frm = new ShoriHoshikiMstListForm(); 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()); } }
//////////////////////////////////////////////////////////////////////////// // イベント名 : deleteButton_Click /// <summary> /// /// </summary> /// <param name="e"></param> /// <param name="sender"></param> /// <history> /// 日付 担当者 内容 /// 2014/06/30 DatNT 新規作成 /// </history> //////////////////////////////////////////////////////////////////////////// private void deleteButton_Click(object sender, EventArgs e) { TraceLog.StartWrite(MethodInfo.GetCurrentMethod()); Cursor preCursor = Cursor.Current; try { Cursor.Current = Cursors.WaitCursor; // データを削除する際に、警告を表示する。 if (MessageForm.Show2(MessageForm.DispModeType.Question, "表示されているデータが削除されます。よろしいですか?") == System.Windows.Forms.DialogResult.Yes) { // 保健所マスタに対象となる保健所コードが登録されている事を確認する。 IDeleteBtnClickALInput alInput = new DeleteBtnClickALInput(); alInput.ShoriHoshikiKbn = shoriHoshikiKbnTextBox.Text.Trim(); alInput.ShoriHoshikiCd = shoriHoshikiCdTextBox.Text.Trim(); IDeleteBtnClickALOutput alOutput = new DeleteBtnClickApplicationLogic().Execute(alInput); if (alOutput.Result) { ShoriHoshikiMstListForm form = new ShoriHoshikiMstListForm(); Program.mForm.ShowForm(form); } else { MessageForm.Show2(MessageForm.DispModeType.Error, string.Format("該当するデータは登録されていません。[処理方式区分:{0}、処理方式コード:{1}]", new string[] { shoriHoshikiKbnTextBox.Text, shoriHoshikiCdTextBox.Text })); } } } 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()); } }
//////////////////////////////////////////////////////////////////////////// // イベント名 : SishoMstButton_click /// <summary> /// /// </summary> /// <param name="e"></param> /// <param name="sender"></param> /// <history> /// 日付 担当者 内容 /// 2014/06/24 YS.CHEW 新規作成 /// </history> //////////////////////////////////////////////////////////////////////////// private void ShoriMstButton_click(object sender, EventArgs e) { ShoriHoshikiMstListForm frm = new ShoriHoshikiMstListForm(); Program.mForm.ShowForm(frm); }