//////////////////////////////////////////////////////////////////////////// // イベント名 : SishoMstButton_click /// <summary> /// /// </summary> /// <param name="e"></param> /// <param name="sender"></param> /// <history> /// 日付 担当者 内容 /// 2014/06/24 YS.CHEW 新規作成 /// </history> //////////////////////////////////////////////////////////////////////////// private void KatasikiMstButton_click(object sender, EventArgs e) { KatashikiMstListForm frm = new KatashikiMstListForm(); 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) { KatashikiMstListForm frm = new KatashikiMstListForm(); Program.mForm.ShowForm(frm); } } else { KatashikiMstListForm frm = new KatashikiMstListForm(); Program.mForm.ShowForm(frm); } } else { KatashikiMstListForm frm = new KatashikiMstListForm(); 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.KatashikiMakerCd = katashikiMakerCdTextBox.Text; alInput.KatashikiCd = katashikiCdTextBox.Text; IDeleteBtnClickALOutput alOutput = new DeleteBtnClickApplicationLogic().Execute(alInput); if (string.IsNullOrEmpty(alOutput.ErrorMessage)) { KatashikiMstListForm form = new KatashikiMstListForm(); Program.mForm.ShowForm(form); } else { MessageForm.Show2(MessageForm.DispModeType.Error, alOutput.ErrorMessage); } } } 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); } }