//////////////////////////////////////////////////////////////////////////// // メソッド名 : DoUpdate /// <summary> /// /// </summary> /// <history> /// 日付 担当者 内容 /// 2014/07/07 DatNT 新規作成 /// </history> //////////////////////////////////////////////////////////////////////////// private void DoUpdate() { YakushokuMstDataSet.YakushokuMstDataTable updateDT = new YakushokuMstDataSet.YakushokuMstDataTable(); if (_updateMode == DispMode.Add) { updateDT = CreateDataInsert(); } else { updateDT = CreateDataUpdate(_dispDT); } IDecisionBtnClickALInput alInput = new DecisionBtnClickALInput(); alInput.DispMode = _updateMode; alInput.YakushokuMstDT = updateDT; IDecisionBtnClickALOutput alOutput = new DecisionBtnClickApplicationLogic().Execute(alInput); if (!string.IsNullOrEmpty(alOutput.ErrMessage)) { MessageForm.Show2(MessageForm.DispModeType.Error, alOutput.ErrMessage); return; } else { YakushokuMstListForm frm = new YakushokuMstListForm(); Program.mForm.ShowForm(frm); } }
//////////////////////////////////////////////////////////////////////////// // イベント名 : closeButton_Click /// <summary> /// /// </summary> /// <param name="e"></param> /// <param name="sender"></param> /// <history> /// 日付 担当者 内容 /// 2014/07/07 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) { YakushokuMstListForm frm = new YakushokuMstListForm(); Program.mForm.ShowForm(frm); } } else { YakushokuMstListForm frm = new YakushokuMstListForm(); Program.mForm.ShowForm(frm); } } else { YakushokuMstListForm frm = new YakushokuMstListForm(); 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/07/07 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.YakushokuCd = yakushokuCdTextBox.Text; IDeleteBtnClickALOutput alOutput = new DeleteBtnClickApplicationLogic().Execute(alInput); if (alOutput.Result) { YakushokuMstListForm form = new YakushokuMstListForm(); Program.mForm.ShowForm(form); } else { MessageForm.Show2(MessageForm.DispModeType.Error, string.Format("該当するデータは登録されていません。[役職コード:{0}]", new string[] { yakushokuCdTextBox.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 YakushokuMstButton_click(object sender, EventArgs e) { YakushokuMstListForm frm = new YakushokuMstListForm(); Program.mForm.ShowForm(frm); }