//////////////////////////////////////////////////////////////////////////// // イベント名 : ChikuMstButton_click /// <summary> /// /// </summary> /// <param name="e"></param> /// <param name="sender"></param> /// <history> /// 日付 担当者 内容 /// 2014/06/24 YS.CHEW 新規作成 /// </history> //////////////////////////////////////////////////////////////////////////// private void ChikuMstButton_click(object sender, EventArgs e) { ChikuMstListForm frm = new ChikuMstListForm(); Program.mForm.ShowForm(frm); }
//////////////////////////////////////////////////////////////////////////// // イベント名 : decisionButton_Click /// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> /// <history> /// 日付 担当者 内容 /// 2014/06/25 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(); if (string.IsNullOrEmpty(this._chikuCd)) { alInput.DisplayMode = DispMode.Add; alInput.ChikuMstDT = CreateChikuMstInsert(); } else { alInput.DisplayMode = DispMode.Edit; alInput.ChikuMstDT = CreateChikuMstUpdate(this._displayDT); } IDecisionBtnClickALOutput alOutput = new DecisionBtnClickApplicationLogic().Execute(alInput); if (!string.IsNullOrEmpty(alOutput.ErrMessage)) { MessageForm.Show2(MessageForm.DispModeType.Error, alOutput.ErrMessage); return; } ChikuMstListForm frm = new ChikuMstListForm(); 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="sender"></param> /// <param name="e"></param> /// <history> /// 日付 担当者 内容 /// 2014/06/25 HuyTX 新規作成 /// </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, "表示されているデータが削除されます。よろしいですか?") == DialogResult.Yes) { IDeleteBtnClickALInput alInput = new DeleteBtnClickALInput(); alInput.ChikuMstCd = chikuCdTextBox.Text; IDeleteBtnClickALOutput alOutput = new DeleteBtnClickApplicationLogic().Execute(alInput); //check ChikuCd not exist if (!string.IsNullOrEmpty(alOutput.ErrMessage)) { MessageForm.Show2(MessageForm.DispModeType.Error, alOutput.ErrMessage); return; } //close form and redirect ChikuMstListForm ChikuMstListForm frm = new ChikuMstListForm(); 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()); } }
//////////////////////////////////////////////////////////////////////////// // イベント名 : closeButton_Click /// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> /// <history> /// 日付 担当者 内容 /// 2014/06/25 HuyTX 新規作成 /// </history> //////////////////////////////////////////////////////////////////////////// private void closeButton_Click(object sender, EventArgs e) { TraceLog.StartWrite(MethodInfo.GetCurrentMethod()); Cursor preCursor = Cursor.Current; try { Cursor.Current = Cursors.WaitCursor; ChikuMstListForm frm = new ChikuMstListForm(); if (this._displayMode == DispMode.Detail) { //close form and redirect ChikuMstListForm Program.mForm.ShowForm(frm); } else { if (!CheckEditControl()) { //close form and redirect ChikuMstListForm Program.mForm.ShowForm(frm); } else if (MessageForm.Show2(MessageForm.DispModeType.Question, "編集内容が破棄されます。よろしいですか?") == DialogResult.Yes) { //close form and redirect ChikuMstListForm 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()); } }