//////////////////////////////////////////////////////////////////////////// // メソッド名 : DoFormLoad /// <summary> /// /// </summary> /// <history> /// 日付 担当者 内容 /// 2014/06/30 DatNT 新規作成 /// </history> //////////////////////////////////////////////////////////////////////////// private void DoFormLoad() { IFormLoadALInput alInput = new FormLoadALInput(); alInput.ShoriHoshikiKbn = _shoriHoshikiKbn; alInput.ShoriHoshikiCd = _shoriHoshikiCd; IFormLoadALOutput alOutput = new FormLoadApplicationLogic().Execute(alInput); if (alOutput.ShoriHoshikiMstDT != null && alOutput.ShoriHoshikiMstDT.Count > 0) { SetValues(alOutput.ShoriHoshikiMstDT[0]); _dispDT = alOutput.ShoriHoshikiMstDT; } SetControlModeView(); }
//////////////////////////////////////////////////////////////////////////// // メソッド名 : DoUpdate /// <summary> /// /// </summary> /// <history> /// 日付 担当者 内容 /// 2014/06/30 DatNT 新規作成 /// </history> //////////////////////////////////////////////////////////////////////////// private void DoUpdate() { ShoriHoshikiMstDataSet.ShoriHoshikiMstDataTable updateDT = new ShoriHoshikiMstDataSet.ShoriHoshikiMstDataTable(); if (_updateMode == DispMode.Add) { updateDT = CreateDataInsert(); } else { updateDT = CreateDataUpdate(_dispDT); } IDecisionBtnClickALInput alInput = new DecisionBtnClickALInput(); alInput.DispMode = _updateMode; alInput.ShoriHoshikiMstDT = updateDT; IDecisionBtnClickALOutput alOutput = new DecisionBtnClickApplicationLogic().Execute(alInput); if (!string.IsNullOrEmpty(alOutput.ErrMessage)) { MessageForm.Show2(MessageForm.DispModeType.Error, alOutput.ErrMessage); return; } else { ShoriHoshikiMstListForm frm = new ShoriHoshikiMstListForm(); Program.mForm.ShowForm(frm); } }
//////////////////////////////////////////////////////////////////////////// // メソッド名 : CreateDataInsert /// <summary> /// /// </summary> /// <history> /// 日付 担当者 内容 /// 2014/06/30 DatNT 新規作成 /// </history> //////////////////////////////////////////////////////////////////////////// private ShoriHoshikiMstDataSet.ShoriHoshikiMstDataTable CreateDataInsert() { DateTime now = Common.Common.GetCurrentTimestamp(); ShoriHoshikiMstDataSet.ShoriHoshikiMstDataTable insertDT = new ShoriHoshikiMstDataSet.ShoriHoshikiMstDataTable(); ShoriHoshikiMstDataSet.ShoriHoshikiMstRow insertRow = insertDT.NewShoriHoshikiMstRow(); // 処理方式区分 2 insertRow.ShoriHoshikiKbn = shoriHoshikiKbnTextBox.Text.Trim(); // 処理方式コード 3 // UPD 20140724 START ZynasSou //insertRow.ShoriHoshikiCd = shoriHoshikiCdTextBox.Text.Trim(); insertRow.ShoriHoshikiCd = Common.Common.GetKeyRenban("ShoriHoshikiMst", shoriHoshikiKbnTextBox.Text.Trim(), "", "").PadLeft(3,'0'); // UPD 20140724 END ZynasSou // 処理方式種別名 4 insertRow.ShoriHoshikiShubetsuNm = shoriHoshikiShubetsuNmTextBox.Text.Trim(); // 処理方式名 5 insertRow.ShoriHoshikiNm = shoriHoshikiNmTextBox.Text.Trim(); // 処理方式種別区分 6 insertRow.ShoriHoshikiShubetsuKbn = shoriHoshikiShubetsuKbnTextBox.Text.Trim(); // 処理方式内部名 7 insertRow.ShoriHoshikiNaibuNm = shoriHoshikiNaibuNmTextBox.Text.Trim(); insertRow.InsertDt = now; insertRow.InsertTarm = terminal; insertRow.InsertUser = loginUser; insertRow.UpdateDt = now; insertRow.UpdateTarm = terminal; insertRow.UpdateUser = loginUser; // 行を挿入 insertDT.AddShoriHoshikiMstRow(insertRow); // 行の状態を設定 insertRow.AcceptChanges(); // 行の状態を設定(新規) insertRow.SetAdded(); return insertDT; }