Exemple #1
0
        ///<summary>
        ///setDatagridView
        ///データグリッドビュー表示
        ///作成者:大河内
        ///作成日:2017/3/14
        ///更新者:大河内
        ///更新日:2017/3/23
        ///カラム論理名
        ///</summary>
        private void setDatagridView()
        {
            //処理部に移動
            EigyoushoList_B eigyoulistB = new EigyoushoList_B();

            //データグリッドビュー部分
            dgvSeihin.DataSource = eigyoulistB.setDatagridView();

            //幅の値を設定
            dgvSeihin.Columns["業種コード"].Width = 150;
            dgvSeihin.Columns["業種名"].Width   = 150;

            //中央揃え
            dgvSeihin.Columns["業種名"].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter;

            //検索件数を表示
            lblRecords.Text = "該当件数( " + dgvSeihin.RowCount.ToString() + "件)";

            //件数が0の場合
            if (lblRecords.Text.Equals("0"))
            {
                //表示を変える
                MessageBox.Show("データが見つかりませんでした。");
                return;
            }
        }
Exemple #2
0
        ///<summary>
        ///setEndAction
        ///戻るボタンの処理
        ///作成者:大河内
        ///作成日:2017/3/14
        ///更新者:大河内
        ///更新日:2017/3/23
        ///カラム論理名
        ///</summary>
        private void setEndAction()
        {
            this.Close();

            //処理部に移動
            EigyoushoList_B eigyoulistB = new EigyoushoList_B();

            //データグリッドビュー部分
            eigyoulistB.setEndAction(intFrmKind);
        }
Exemple #3
0
        ///<summary>
        ///setdgvSeihinDoubleClick
        ///データグリッドビュー内のデータ選択後の処理
        ///作成者:大河内
        ///作成日:2017/3/6
        ///更新者:大河内
        ///更新日:2017/3/6
        ///カラム論理名
        ///</summary>
        private void setSelectItem()
        {
            if (intFrmKind == 0)
            {
                return;
            }

            //選択行の大分類コード取得
            string strSelectid = (string)dgvSeihin.CurrentRow.Cells[0].Value;

            //処理部に移動
            EigyoushoList_B eigyoulistB = new EigyoushoList_B();

            eigyoulistB.setSelectItem(intFrmKind, strSelectid);

            //選択行の営業所コード取得
            string selectid = (string)dgvSeihin.CurrentRow.Cells[0].Value;

            setEndAction();
        }