Esempio n. 1
0
        ///<summary>
        ///setDatagridView
        ///データグリッドビュー表示
        ///</summary>
        private void setDatagridView()
        {
            //ビジネス層のインスタンス生成
            ShiharaiList_B shiharailistB = new ShiharaiList_B();

            try
            {
                if (lblset_Shiresaki.chkTxtTorihikisaki())
                {
                    lblset_Shiresaki.codeTxt.Focus();
                    return;
                }

                //データグリッドビュー部分
                gridTokui.DataSource = shiharailistB.getDatagridView(lblset_Shiresaki.CodeTxtText);

                //表示数を記載
                lblRecords.Text = "該当件数( " + gridTokui.RowCount.ToString() + "件)";
            }
            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>
        ///setSelectItem
        ///データグリッドビュー内のデータ選択後の処理
        ///</summary>
        private void setSelectItem()
        {
            //取引コードを入れる用
            DataTable dtShiharai = new DataTable();

            //検索結果にデータが存在しなければ終了
            if (gridTokui.RowCount == 0)
            {
                return;
            }

            //ビジネス層のインスタンス生成
            ShiharaiList_B shiharailistB = new ShiharaiList_B();

            try
            {
                //ビジネス層、検索ロジックに移動
                dtShiharai = shiharailistB.getSelectItem(intFrmKind, (gridTokui.CurrentRow.Cells["伝票番号"].Value).ToString());

                //検索結果がない場合
                if (dtShiharai.Rows.Count <= 0)
                {
                    return;
                }

                setEndAction(dtShiharai);
            }
            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;
            }
        }