//////////////////////////////////////////////////////////////////////////// // メソッド名 : DoFormLoad /// <summary> /// /// </summary> /// <history> /// 日付 担当者 内容 /// 2014/07/03 HuyTX 新規作成 /// </history> //////////////////////////////////////////////////////////////////////////// private void DoFormLoad() { IFormLoadALInput alInput = new FormLoadALInput(); alInput.SuishitsuShikenKoumokuCd = this._suishitsuShikenKoumokuCd; IFormLoadALOutput alOutput = new FormLoadApplicationLogic().Execute(alInput); this._suishitsuShikenKoumokuDT = alOutput.SuishitsuShikenKoumokuMstDataTable; if (!string.IsNullOrEmpty(this._suishitsuShikenKoumokuCd)) { _displayMode = DispMode.Detail; this.Text = "水質試験項目マスタ詳細"; SetDefaultValueControl(); } }
//////////////////////////////////////////////////////////////////////////// // メソッド名 : CreateSuishitsuShikenKoumokuMstInsert /// <summary> /// /// </summary> /// <history> /// 日付 担当者 内容 /// 2014/07/04 HuyTX 新規作成 /// </history> //////////////////////////////////////////////////////////////////////////// private SuishitsuShikenKoumokuMstDataSet.SuishitsuShikenKoumokuMstDataTable CreateSuishitsuShikenKoumokuMstInsert() { SuishitsuShikenKoumokuMstDataSet.SuishitsuShikenKoumokuMstDataTable suishitsuShikenKoumokuMstDT = new SuishitsuShikenKoumokuMstDataSet.SuishitsuShikenKoumokuMstDataTable(); SuishitsuShikenKoumokuMstDataSet.SuishitsuShikenKoumokuMstRow newRow = suishitsuShikenKoumokuMstDT.NewSuishitsuShikenKoumokuMstRow(); DateTime currentDateTime = Common.Common.GetCurrentTimestamp(); string shokuinNm = Utility.ShokuinInfo.GetShokuinInfo().Shokuin.ShokuinNm; //水質試験項目コード(1) // UPD 20140724 START ZynasSou //newRow.SuishitsuShikenKoumokuCd = suishitsuShikenKoumokuCdTextBox.Text; newRow.SuishitsuShikenKoumokuCd = Common.Common.GetKeyRenban("SuishitsuShikenKoumokuMst", "", "", "").PadLeft(3,'0'); // UPD 20140724 START ZynasSou //正式名称(2) newRow.SeishikiNm = seishikiNmTextBox.Text; //略式名称(3) newRow.RyakushikiNm = ryakushikiNmTextBox.Text; //計量方法名称(上段)(4) newRow.KeiryouHouhouNmUp = keiryouHouhouNmUpTextBox.Text; //計量方法名称(上段)(5) newRow.KeiryouHouhouNmDown = keiryouHouhouNmDownTextBox.Text; //水質試験項目料金(6) newRow.SuishitsuShikenKomokuAmt = Convert.ToDecimal(suishitsuShikenKomokuAmtTextBox.Text); //印字区分(7, 8) newRow.InjiKbn = (injiKbnUpRadioButton.Checked) ? "1" : "2"; //印字順(9) newRow.InjiJyun = injiJyunTextBox.Text; //外注委託区分(10) newRow.GaichuItakuKbn = (gaichuItakuKbnCheckBox.Checked) ? "1" : "0"; //小数部桁数(11) newRow.ShosubuKetasu = shosubuKetasuTextBox.Text; //有効桁数(12) newRow.YukoKetasu = yukoKetasuTextBox.Text; //単位(13) newRow.Unit = unitTextBox.Text.Trim(); //ゼロ表示(14) newRow.ZeroHyojiKbn = (zeroHyojiKbnCheckBox.Checked) ? "1" : "2"; //結果入力省略不可(15) newRow.KekkaNyuryokuShoryakuKbn = (kekkaNyuryokuShoryakuKbnCheckBox.Checked) ? "1" : "2"; //定量下限値1(16) newRow.TeiryoKagenchi1 = (string.IsNullOrEmpty(teiryoKagenchi1TextBox.Text)) ? 0 : Double.Parse(teiryoKagenchi1TextBox.Text); //定量下限値2(17) newRow.TeiryoKagenchi2 = (string.IsNullOrEmpty(teiryoKagenchi2TextBox.Text)) ? 0 : Double.Parse(teiryoKagenchi2TextBox.Text); //定量表示用1(18) newRow.TeiryoHyojiyo1 = teiryoHyojiyo1TextBox.Text.PadLeft(5, ' '); //定量表示用2(19) newRow.TeiryoHyojiyo2 = teiryoHyojiyo2TextBox.Text.PadLeft(5, ' '); //登録日 newRow.InsertDt = currentDateTime; //登録者 newRow.InsertUser = shokuinNm; //登録端末 newRow.InsertTarm = Dns.GetHostName(); //更新日 newRow.UpdateDt = currentDateTime; //更新者 newRow.UpdateUser = shokuinNm; //更新端末 newRow.UpdateTarm = Dns.GetHostName(); // 行を挿入 suishitsuShikenKoumokuMstDT.AddSuishitsuShikenKoumokuMstRow(newRow); //行の状態を設定 newRow.AcceptChanges(); newRow.SetAdded(); return suishitsuShikenKoumokuMstDT; }