//////////////////////////////////////////////////////////////////////////// // イベント名 : exChangeButton_Click /// <summary> /// /// </summary> /// <param name="e"></param> /// <param name="sender"></param> /// <history> /// 日付 担当者 内容 /// 2014/08/11 HuyTX 新規作成 /// </history> //////////////////////////////////////////////////////////////////////////// private void exChangeButton_Click(object sender, EventArgs e) { TraceLog.StartWrite(MethodInfo.GetCurrentMethod()); Cursor preCursor = Cursor.Current; try { Cursor.Current = Cursors.WaitCursor; if (!IsValidData()) return; IExChangeBtnClickALInput alInput = new ExChangeBtnClickALInput(); //count up shisho array CountUpShishoArray(alInput); if (!string.IsNullOrEmpty(_errMsgExistCheck.ToString())) { MessageForm.Show2(MessageForm.DispModeType.Error, _errMsgExistCheck.ToString()); return; } alInput.IsUpdate = true; alInput.HoshoTorokuInfoDataGridView = oldHoshoTorokuInfoDataGridView; alInput.ShishoArr = _shishoCdArr; IExChangeBtnClickALOutput alOutput = new ExChangeBtnClickApplicationLogic().Execute(alInput); KinoMenuForm frm = new KinoMenuForm(); 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()); } }
/////////////////////////////////////////////////////////////// //メソッド名 : CountUpShishoArray /// <summary> /// /// </summary> /// <param name="alInput"></param> /// <history> /// 日付 担当者 内容 /// 2014/08/13 HuyTX 新規作成 /// </history> /////////////////////////////////////////////////////////////// private void CountUpShishoArray(IExChangeBtnClickALInput alInput) { alInput.IsUpdate = false; IExChangeBtnClickALOutput alOutput = new ExChangeBtnClickApplicationLogic().Execute(alInput); _errMsgExistCheck = new StringBuilder(); for (int i = 0; i < oldHoshoTorokuInfoDataGridView.RowCount - 1; i++) { DataGridViewRow row = oldHoshoTorokuInfoDataGridView.Rows[i]; string shishoKbn = row.Cells["HoshoTorokuShishoKbnCol"].Value.ToString(); _shishoCdArr[shishoKbn] = shishoKbn; decimal newHoshoTorokuNoFrom = Decimal.Parse(newHoshoTorokuNoFromTextBox.Text.Trim()); object newHoshoTorokuNo = row.Cells["NewHoshoTorokuNoCol"].Value = (newHoshoTorokuNoFrom + i).ToString().PadLeft(11, '0'); //exist check if ((alOutput.HoshoTorokuShinseiKokanInfoDataTable.Select(string.Format("HoshoTorokuNo = '{0}'", row.Cells["NewHoshoTorokuNoCol"].Value.ToString()))).Length == 0) { _errMsgExistCheck.AppendLine(string.Format("該当Noの申請書は発行されていません。[新保証No:{0}]", newHoshoTorokuNo)); } } }