//////////////////////////////////////////////////////////////////////////// // イベント名 : SuisitsuMstButton_Click /// <summary> /// /// </summary> /// <param name="e"></param> /// <param name="sender"></param> /// <history> /// 日付 担当者 内容 /// 2014/06/24 YS.CHEW 新規作成 /// </history> //////////////////////////////////////////////////////////////////////////// private void SuisitsuMstButton_Click(object sender, EventArgs e) { SuishitsuMstListForm frm = new SuishitsuMstListForm(); Program.mForm.ShowForm(frm); }
//////////////////////////////////////////////////////////////////////////// // イベント名 : DecisionButton_Click /// <summary> /// /// </summary> /// <param name="e"></param> /// <param name="sender"></param> /// <history> /// 日付 担当者 内容 /// 2014/06/25 DatNT 新規作成 /// </history> //////////////////////////////////////////////////////////////////////////// private void DecisionButton_Click(object sender, EventArgs e) { TraceLog.StartWrite(MethodInfo.GetCurrentMethod()); Cursor preCursor = Cursor.Current; try { Cursor.Current = Cursors.WaitCursor; // Update successfully! if (DoUpdate()) { SuishitsuMstListForm frm = new SuishitsuMstListForm(); 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/25 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.SuishitsuShishoCd = _suishitsuShishoCd; alInput.SuishitsuCd = _suishitsuCd; IDeleteBtnClickALOutput alOutput = new DeleteBtnClickApplicationLogic().Execute(alInput); if (alOutput.Result) { SuishitsuMstListForm form = new SuishitsuMstListForm(); Program.mForm.ShowForm(form); } else { MessageForm.Show2(MessageForm.DispModeType.Error, string.Format("該当するデータは登録されていません。[水質コード:{0}]", new string[] { suishitsuCdTextBox.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()); } }
//////////////////////////////////////////////////////////////////////////// // イベント名 : CloseButton_Click /// <summary> /// /// </summary> /// <param name="e"></param> /// <param name="sender"></param> /// <history> /// 日付 担当者 内容 /// 2014/06/25 DatNT 新規作成 /// </history> //////////////////////////////////////////////////////////////////////////// private void CloseButton_Click(object sender, EventArgs e) { TraceLog.StartWrite(MethodInfo.GetCurrentMethod()); Cursor preCursor = Cursor.Current; try { Cursor.Current = Cursors.WaitCursor; // Detail mode if (this._dispMode == DispMode.Detail) { goto SHOWFORM; } // Add mode if (string.IsNullOrEmpty(_suishitsuCd)) { if (!EditControl() || MessageForm.Show2(MessageForm.DispModeType.Question, "編集内容が破棄されます。よろしいですか?") == DialogResult.Yes) { goto SHOWFORM; } return; } // Other modes if (!CheckEdit()) { if (MessageForm.Show2(MessageForm.DispModeType.Question, "編集内容が破棄されます。よろしいですか?") == DialogResult.Yes) { goto SHOWFORM; } return; } SHOWFORM: SuishitsuMstListForm frm = new SuishitsuMstListForm(); 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()); } }