Esempio n. 1
0
        ///<summary>
        ///setEndAction
        ///戻るボタンの処理
        ///</summary>
        private void setEndAction(List <string> lstSelectCd)
        {
            //データグリッドビューからデータを選択且つセット系から来た場合(ラベルセットの場合)
            if (lblSetTorikbn != null && lstSelectCd.Count != 0)
            {
                //セットの中に検索結果データを入れる
                lblSetTorikbn.CodeTxtText    = lstSelectCd[0];
                lblSetTorikbn.ValueLabelText = lstSelectCd[1];
            }

            this.Close();

            //処理部に移動
            TorihikikbnList_B torikbnListB = new TorihikikbnList_B();

            try
            {
                torikbnListB.FormMove(intFrmKind);
            }
            catch (Exception ex)
            {
                //エラーロギング
                new CommonException(ex);
                //例外発生メッセージ(OK)
                BaseMessageBox basemessagebox = new BaseMessageBox(this, CommonTeisu.TEXT_ERROR, CommonTeisu.LABEL_ERROR_MESSAGE, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                basemessagebox.ShowDialog();
                return;
            }
        }
Esempio n. 2
0
        ///<summary>
        ///setDatagridView
        ///データグリッドビュー表示
        ///</summary>
        private void setDatagridView()
        {
            //ビジネス層のインスタンス生成
            TorihikikbnList_B torikbnListB = new TorihikikbnList_B();

            try
            {
                //データグリッドビューに表示
                gridSeihin.DataSource = torikbnListB.getDatagridView();

                //中央揃え
                gridSeihin.Columns[1].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter;

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

                //件数が0の場合
                if (lblRecords.Text == "0")
                {
                    //メッセージボックスの処理、項目のデータがない場合のウィンドウ(OK)
                    BaseMessageBox basemessagebox = new BaseMessageBox(this, CommonTeisu.TEXT_VIEW, CommonTeisu.LABEL_NOTDATA, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                    basemessagebox.ShowDialog();
                    return;
                }
            }
            catch (Exception ex)
            {
                //エラーロギング
                new CommonException(ex);
                //例外発生メッセージ(OK)
                BaseMessageBox basemessagebox = new BaseMessageBox(this, CommonTeisu.TEXT_ERROR, CommonTeisu.LABEL_ERROR_MESSAGE, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                basemessagebox.ShowDialog();
                return;
            }
        }
Esempio n. 3
0
        ///<summary>
        ///setSelectItem
        ///データグリッドビュー内のデータ選択後の処理
        ///</summary>
        private void setSelectItem()
        {
            //検索結果にデータが存在しなければ終了
            if (gridSeihin.RowCount == 0)
            {
                return;
            }

            //データ渡し用
            List <string> lstSelectId = new List <string>();

            //選択行の取引区分取得
            string strSelectId   = (string)gridSeihin.CurrentRow.Cells["取引区分コード"].Value;
            string strSelectName = (string)gridSeihin.CurrentRow.Cells["取引区分名"].Value;

            //検索情報を入れる
            lstSelectId.Add(strSelectId);
            lstSelectId.Add(strSelectName);

            //処理部に移動
            TorihikikbnList_B torikbnListB = new TorihikikbnList_B();

            try
            {
                torikbnListB.getSelectItem(intFrmKind, strSelectId);

                setEndAction(lstSelectId);
            }
            catch (Exception ex)
            {
                //エラーロギング
                new CommonException(ex);
                //例外発生メッセージ(OK)
                BaseMessageBox basemessagebox = new BaseMessageBox(this, CommonTeisu.TEXT_ERROR, CommonTeisu.LABEL_ERROR_MESSAGE, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                basemessagebox.ShowDialog();
            }
        }