Example #1
0
        ////////////////////////////////////////////////////////////////////////////
        //  メソッド名 : DoFormLoad
        /// <summary>
        /// 
        /// </summary>
        /// <history>
        /// 日付    担当者   内容
        /// 2014/07/29 HuyTX    新規作成
        /// </history>
        ////////////////////////////////////////////////////////////////////////////
        private void DoFormLoad()
        {
            IFormLoadALInput alInput = new FormLoadALInput();

            alInput.HenchikuyotoDaibunruiCd = _kenchikuyotoDaibunruiCd;
            alInput.KenchikuyotoShobunruiCd = _kenchikuyotoShobunruiCd;
            alInput.KenchikuyotoRenban = (string.IsNullOrEmpty(_kenchikuyotoRenban))? 0 : Int32.Parse(_kenchikuyotoRenban);

            IFormLoadALOutput alOutput = new FormLoadApplicationLogic().Execute(alInput);

            this._kenchikuyotoMstDataTable = alOutput.KenchikuyotoMstDataTable;
            this._kenchikuyotoDaibunruiMstDataTable = alOutput.KenchikuyotoDaibunruiMstDataTable;
            this._kenchikuyotoShobunruiMstDataTable = alOutput.KenchikuyotoShobunruiMstDataTable;

            if (!string.IsNullOrEmpty(_kenchikuyotoDaibunruiCd)
                && !string.IsNullOrEmpty(_kenchikuyotoShobunruiCd)
                && !string.IsNullOrEmpty(_kenchikuyotoRenban))
            {
                this._displayMode = DispMode.Detail;
                this.Text = "建築用途マスタ詳細";

                SetDefaultValueControl();
            }
            else
            {
                // Set data Daibunrui listbox
                Utility.Utility.SetListBoxSource(kenchikuyotoDaibunruiListBox, _kenchikuyotoDaibunruiMstDataTable, "KenchikuyotoDaibunruiNm", "KenchikuyotoDaibunruiCd");

                // Set data Shobunrui listbox
                Utility.Utility.SetListBoxSource(kenchikuyotoShobunruiListBox, _kenchikuyotoShobunruiMstDataTable, "KenchikuyotoShobunruiNm", "KenchikuyotoShobunruiCd");
            }

            kenchikuyotoDaibunruiListBox.SelectedIndex = 0;
            kenchikuyotoShobunruiListBox.SelectedIndex = 0;
        }
Example #2
0
        ////////////////////////////////////////////////////////////////////////////
        //  メソッド名 : CreateKenchikuyotoMstInsert
        /// <summary>
        /// 
        /// </summary>
        /// <history>
        /// 日付    担当者   内容
        /// 2014/07/29  HuyTX      新規作成
        /// </history>
        ////////////////////////////////////////////////////////////////////////////
        private KenchikuyotoMstDataSet.KenchikuyotoMstDataTable CreateKenchikuyotoMstInsert()
        {
            KenchikuyotoMstDataSet.KenchikuyotoMstDataTable kenchikuyotoMstDataTable = new KenchikuyotoMstDataSet.KenchikuyotoMstDataTable();
            KenchikuyotoMstDataSet.KenchikuyotoMstRow newRow = kenchikuyotoMstDataTable.NewKenchikuyotoMstRow();

            DateTime currentDateTime = Common.Common.GetCurrentTimestamp();
            string loginUser = Utility.ShokuinInfo.GetShokuinInfo().Shokuin.ShokuinNm;
            string tarmName = Dns.GetHostName();

            //建築用途大分類
            newRow.KenchikuyotoDaibunrui = kenchikuyotoDaibunruiListBox.SelectedValue.ToString();

            //建築用途小分類
            newRow.KenchikuyotoShobunrui = kenchikuyotoShobunruiListBox.SelectedValue.ToString();

            //建築用途連番
            newRow.KenchikuyotoRenban = Int32.Parse(Common.Common.GetKeyRenban("KenchikuyotoMst", kenchikuyotoDaibunruiListBox.SelectedValue.ToString(), kenchikuyotoShobunruiListBox.SelectedValue.ToString(), ""));

            //建築用途名称
            newRow.KenchikuyotoNm = kenchikuyotoNmTextBox.Text.Trim();

            //登録日
            newRow.InsertDt = currentDateTime;

            //登録者
            newRow.InsertUser = loginUser;

            //登録端末
            newRow.InsertTarm = tarmName;

            //更新日
            newRow.UpdateDt = currentDateTime;

            //更新者
            newRow.UpdateUser = loginUser;

            //更新端末
            newRow.UpdateTarm = tarmName;

            // 行を挿入
            kenchikuyotoMstDataTable.AddKenchikuyotoMstRow(newRow);

            //行の状態を設定
            newRow.AcceptChanges();

            newRow.SetAdded();

            return kenchikuyotoMstDataTable;
        }