/// <summary>gvwGridView1の行選択後イベント</summary>
 /// <param name="fxEventArgs">イベントハンドラの共通引数</param>
 /// <returns>URL</returns>
 protected string UOC_gvwGridView1_SelectedIndexChanged(FxEventArgs fxEventArgs)
 {
     // 画面遷移(詳細表示)
     return("ProductsDetail.aspx");
 }
 /// <summary>btnButton3のClickイベント</summary>
 /// <param name="fxEventArgs">Event Handlerの共通引数</param>
 /// <returns>URL</returns>
 /// <remarks>画面遷移不可能(×)</remarks>
 protected string UOC_btnButton5_Click(FxEventArgs fxEventArgs)
 {
     return("1→5");
 }
 /// <summary>btnButton21のClickイベント</summary>
 /// <param name="fxEventArgs">Event Handlerの共通引数</param>
 /// <returns>URL</returns>
 /// <remarks>window open</remarks>
 protected string UOC_btnButton21_Click(FxEventArgs fxEventArgs)
 {
     this.ShowNormalScreen("./WebForm5.aspx");
     return("");
 }
Exemple #4
0
        /// <summary>gvwGridView1のコマンドイベント</summary>
        /// <param name="fxEventArgs">Event Handlerの共通引数</param>
        /// <returns>URL</returns>
        protected string UOC_gvwGridView1_RowCommand(FxEventArgs fxEventArgs)
        {
            // ソートの場合は無視
            if (fxEventArgs.InnerButtonID == "Sort")
            {
                return(string.Empty);
            }

            // DataTableの取得
            DataTable dt = (DataTable)Session["SearchResult"];

            // インデックスを取得
            int index = int.Parse(fxEventArgs.PostBackValue);

            // e.NewSelectedIndexRowsのインデックスが一致しないので。
            // キーで探すのは主キーを意識するため自動生成では面倒になる。
            int i = -1;

            switch (fxEventArgs.InnerButtonID)
            {
            case "Delete":

                // 選択されたレコードを削除
                foreach (DataRow dr in dt.Rows)
                {
                    if (dr.RowState == DataRowState.Added)
                    {
                        // Added行はDeleteできないのでスキップ
                        continue;
                    }
                    else if (dr.RowState != DataRowState.Deleted)
                    {
                        // != Added、Deleted

                        // e.NewSelectedIndexとRowsのインデックスをチェック
                        i++;
                        if (index == i)
                        {
                            // 削除
                            dr.Delete();
                            break;
                        }
                    }
                    else
                    {
                        // Delete行は表示されないのでスキップ
                        continue;
                    }
                }

                break;

            case "Update":

                // 選択されたレコードを更新
                foreach (DataRow dr in dt.Rows)
                {
                    if (dr.RowState != DataRowState.Deleted)
                    {
                        // != Deleted

                        // e.NewSelectedIndexとRowsのインデックスをチェック
                        i++;
                        if (index == i)
                        {
                            // 更新
                            GridViewRow gvRow = this.gvwGridView1.Rows[index];
                            foreach (DataColumn dc in dt.Columns)
                            {
                                TextBox txtBox = ((TextBox)gvRow.FindControl("txt" + dc.ColumnName));

                                if (txtBox != null)
                                {
                                    dr[dc] = txtBox.Text;
                                }

                                #region 追加コード(ComboBox化)

                                DropDownList ddl = ((DropDownList)gvRow.FindControl("ddl" + dc.ColumnName));

                                if (ddl != null)
                                {
                                    dr[dc] = ddl.SelectedValue;
                                }

                                #endregion
                            }

                            break;
                        }
                    }
                    else
                    {
                        // Delete行はスキップ
                        continue;
                    }
                }

                break;

            default:
                // 不明
                return(string.Empty);
            }

            // GridViewをリセット
            this.gvwGridView1.PageIndex = 0;
            this.gvwGridView1.Sort("", SortDirection.Ascending);

            // ページングの中止
            this.gvwGridView1.AllowPaging = false;

            // GridViewのDataSourceを変更してDataBindする。
            this.gvwGridView1.DataSource   = dt;
            this.gvwGridView1.DataSourceID = null;
            this.gvwGridView1.DataBind();

            // DataTableの設定
            Session["SearchResult"] = dt;

            // 更新Buttonの活性化
            this.btnBatUpd.Enabled = true;

            // 画面遷移しない。
            return(string.Empty);
        }
Exemple #5
0
 /// <summary>User ControlにEvent Handlerを実装可能にしたのでそのテスト。</summary>
 /// <param name="fxEventArgs">Event Handlerの共通引数</param>
 /// <returns>URL</returns>
 protected string UOC_btnUCButton_Click(FxEventArgs fxEventArgs)
 {
     this.lblResult.Text = "UOC_btnUCButton_Clickを実行できた。";
     return("");
 }
        // #z-start

        /// <summary>Finally節の処理を実装</summary>
        /// <param name="fxEventArgs">イベントハンドラの共通引数</param>
        /// <remarks>画面コード親クラス1から利用される派生の末端</remarks>
        protected override void UOC_Finally(FxEventArgs fxEventArgs)
        {
            //// Log4Netへログ出力
            //LogIF.InfoLog("ACCESS", "UOC_Finally:" + fxEventArgs.ButtonID);
        }
Exemple #7
0
        /// <summary>検索Button</summary>
        /// <param name="fxEventArgs">Event Handlerの共通引数</param>
        /// <returns>URL</returns>
        protected string UOC_btnSearch_Click(FxEventArgs fxEventArgs)
        {
            // 更新Buttonの非活性化
            this.btnBatUpd.Enabled = false;

            // GridViewをリセット
            this.gvwGridView1.PageIndex = 0;
            this.gvwGridView1.Sort("", SortDirection.Ascending);

            // 検索条件の収集
            // AndEqualSearchConditions
            Dictionary <string, object> andEqualSearchConditions = new Dictionary <string, object>();

            andEqualSearchConditions.Add("ProductID", this.txtProductID_And.Text);
            andEqualSearchConditions.Add("ProductName", this.txtProductName_And.Text);

            //andEqualSearchConditions.Add("SupplierID", this.txtSupplierID_And.Text);
            andEqualSearchConditions.Add("SupplierID", this.ddlSupplierID_And.SelectedValue);
            //andEqualSearchConditions.Add("CategoryID", this.txtCategoryID_And.Text);
            andEqualSearchConditions.Add("CategoryID", this.ddlCategoryID_And.SelectedValue);

            andEqualSearchConditions.Add("QuantityPerUnit", this.txtQuantityPerUnit_And.Text);
            andEqualSearchConditions.Add("UnitPrice", this.txtUnitPrice_And.Text);
            andEqualSearchConditions.Add("UnitsInStock", this.txtUnitsInStock_And.Text);
            andEqualSearchConditions.Add("UnitsOnOrder", this.txtUnitsOnOrder_And.Text);
            andEqualSearchConditions.Add("ReorderLevel", this.txtReorderLevel_And.Text);
            andEqualSearchConditions.Add("Discontinued", this.txtDiscontinued_And.Text);
            Session["AndEqualSearchConditions"] = andEqualSearchConditions;

            // AndLikeSearchConditions
            Dictionary <string, string> andLikeSearchConditions = new Dictionary <string, string>();

            andLikeSearchConditions.Add("ProductID", this.txtProductID_And_Like.Text);
            andLikeSearchConditions.Add("ProductName", this.txtProductName_And_Like.Text);

            andLikeSearchConditions.Add("SupplierID", this.txtSupplierID_And_Like.Text);
            andLikeSearchConditions.Add("CategoryID", this.txtCategoryID_And_Like.Text);

            andLikeSearchConditions.Add("QuantityPerUnit", this.txtQuantityPerUnit_And_Like.Text);
            andLikeSearchConditions.Add("UnitPrice", this.txtUnitPrice_And_Like.Text);
            andLikeSearchConditions.Add("UnitsInStock", this.txtUnitsInStock_And_Like.Text);
            andLikeSearchConditions.Add("UnitsOnOrder", this.txtUnitsOnOrder_And_Like.Text);
            andLikeSearchConditions.Add("ReorderLevel", this.txtReorderLevel_And_Like.Text);
            andLikeSearchConditions.Add("Discontinued", this.txtDiscontinued_And_Like.Text);
            Session["AndLikeSearchConditions"] = andLikeSearchConditions;

            // OrEqualSearchConditions
            Dictionary <string, object[]> orEqualSearchConditions = new Dictionary <string, object[]>();

            orEqualSearchConditions.Add("ProductID", this.txtProductID_OR.Text.Split(' '));
            orEqualSearchConditions.Add("ProductName", this.txtProductName_OR.Text.Split(' '));
            orEqualSearchConditions.Add("SupplierID", this.txtSupplierID_OR.Text.Split(' '));
            orEqualSearchConditions.Add("CategoryID", this.txtCategoryID_OR.Text.Split(' '));
            orEqualSearchConditions.Add("QuantityPerUnit", this.txtQuantityPerUnit_OR.Text.Split(' '));
            orEqualSearchConditions.Add("UnitPrice", this.txtUnitPrice_OR.Text.Split(' '));
            orEqualSearchConditions.Add("UnitsInStock", this.txtUnitsInStock_OR.Text.Split(' '));
            orEqualSearchConditions.Add("UnitsOnOrder", this.txtUnitsOnOrder_OR.Text.Split(' '));
            orEqualSearchConditions.Add("ReorderLevel", this.txtReorderLevel_OR.Text.Split(' '));
            orEqualSearchConditions.Add("Discontinued", this.txtDiscontinued_OR.Text.Split(' '));
            Session["OrEqualSearchConditions"] = orEqualSearchConditions;

            // OrLikeSearchConditions
            Dictionary <string, string[]> orLikeSearchConditions = new Dictionary <string, string[]>();

            orLikeSearchConditions.Add("ProductID", this.txtProductID_OR_Like.Text.Split(' '));
            orLikeSearchConditions.Add("ProductName", this.txtProductName_OR_Like.Text.Split(' '));
            orLikeSearchConditions.Add("SupplierID", this.txtSupplierID_OR_Like.Text.Split(' '));
            orLikeSearchConditions.Add("CategoryID", this.txtCategoryID_OR_Like.Text.Split(' '));
            orLikeSearchConditions.Add("QuantityPerUnit", this.txtQuantityPerUnit_OR_Like.Text.Split(' '));
            orLikeSearchConditions.Add("UnitPrice", this.txtUnitPrice_OR_Like.Text.Split(' '));
            orLikeSearchConditions.Add("UnitsInStock", this.txtUnitsInStock_OR_Like.Text.Split(' '));
            orLikeSearchConditions.Add("UnitsOnOrder", this.txtUnitsOnOrder_OR_Like.Text.Split(' '));
            orLikeSearchConditions.Add("ReorderLevel", this.txtReorderLevel_OR_Like.Text.Split(' '));
            orLikeSearchConditions.Add("Discontinued", this.txtDiscontinued_OR_Like.Text.Split(' '));
            Session["OrLikeSearchConditions"] = orLikeSearchConditions;

            //// ElseSearchConditions
            //Dictionary<string, object> ElseSearchConditions = new Dictionary<string, object>();
            //ElseSearchConditions.Add("myp1", 1);
            //ElseSearchConditions.Add("myp2", 40);
            //Session["ElseSearchConditions"] = ElseSearchConditions;
            //Session["ElseWhereSQL"] = "AND [ProductID] BETWEEN @myp1 AND @myp2";

            // ソート条件の初期化
            Session["SortExpression"] = "ProductID"; // 主キーを指定
            Session["SortDirection"]  = "ASC";       // ASCを指定

            // ページング
            this.gvwGridView1.AllowPaging = true;

            // gvwGridView1をObjectDataSourceに連結。
            this.gvwGridView1.DataSource   = null;
            this.gvwGridView1.DataSourceID = "ObjectDataSource1";

            // ヘッダーを設定する。
            this.gvwGridView1.Columns[0].HeaderText  = "削除";
            this.gvwGridView1.Columns[1].HeaderText  = "更新";
            this.gvwGridView1.Columns[2].HeaderText  = "ProductID";
            this.gvwGridView1.Columns[3].HeaderText  = "ProductName";
            this.gvwGridView1.Columns[4].HeaderText  = "SupplierID";
            this.gvwGridView1.Columns[5].HeaderText  = "CategoryID";
            this.gvwGridView1.Columns[6].HeaderText  = "QuantityPerUnit";
            this.gvwGridView1.Columns[7].HeaderText  = "UnitPrice";
            this.gvwGridView1.Columns[8].HeaderText  = "UnitsInStock";
            this.gvwGridView1.Columns[9].HeaderText  = "UnitsOnOrder";
            this.gvwGridView1.Columns[10].HeaderText = "ReorderLevel";
            this.gvwGridView1.Columns[11].HeaderText = "Discontinued";

            // 画面遷移しない。
            return(string.Empty);
        }
        /// <summary>gvwGridView1のSortingイベント</summary>
        /// <param name="fxEventArgs">Event Handlerの共通引数</param>
        /// <param name="e">オリジナルのイベント引数</param>
        /// <returns>URL</returns>
        protected string UOC_gvwGridView1_Sorting(FxEventArgs fxEventArgs, GridViewSortEventArgs e)
        {
            // 元のデータ
            DataTable dt1 = (DataTable)Session["SampleData"];

            // ソート後のデータを格納するためのDataTable
            DataTable dt2 = dt1.Clone();

            // データソート用のDataView
            DataView dv = new DataView(dt1);

            if (Session["SortDirection"] == null)
            {
                // ソートの定義情報を格納するためのDictionaryがない場合は作成する
                Session["SortDirection"] = new Dictionary <string, SortDirection>();
            }

            // ソート定義情報にしたがい、データをソートする
            if (!((Dictionary <string, SortDirection>)Session["SortDirection"]).ContainsKey(e.SortExpression))
            {
                // ソート定義情報がない場合。デフォルトは昇順とする
                dv.Sort = e.SortExpression;

                // ソート定義情報を追加する
                ((Dictionary <string, SortDirection>)Session["SortDirection"]).Add(e.SortExpression, SortDirection.Descending);
            }
            else
            {
                // ソート定義情報をもとに、当該列のソート方向を取得する
                SortDirection direction = ((Dictionary <string, SortDirection>)Session["SortDirection"])[e.SortExpression];

                if (direction == SortDirection.Ascending)
                {
                    // 昇順
                    dv.Sort = e.SortExpression;

                    // ソート定義情報を更新する
                    ((Dictionary <string, SortDirection>)Session["SortDirection"])[e.SortExpression] = SortDirection.Descending;
                }
                else
                {
                    // 降順
                    dv.Sort = e.SortExpression + " DESC";

                    // ソート定義情報を更新する
                    ((Dictionary <string, SortDirection>)Session["SortDirection"])[e.SortExpression] = SortDirection.Ascending;
                }
            }

            // ソート後のデータをDataTableにインポートする
            foreach (DataRowView drv in dv)
            {
                dt2.ImportRow(drv.Row);
            }

            // データの再バインド
            Session["SampleData"] = dt2;
            this.BindGridData();

            return("");
        }
    /// <summary>マスタページにイベントハンドラを実装可能にしたのでそのテスト。</summary>
    /// <param name="fxEventArgs">イベントハンドラの共通引数</param>
    /// <returns>URL</returns>
    protected string UOC_sampleScreen_btnMPButton_Click(FxEventArgs fxEventArgs)
    {
        Response.Write("UOC_sampleScreen_btnMPButton_Clickを実行できた。");

        return("");
    }
 /// <summary>追加ボタン</summary>
 /// <param name="fxEventArgs">イベントハンドラの共通引数</param>
 /// <returns>URL</returns>
 protected string UOC_btnInsert_Click(FxEventArgs fxEventArgs)
 {
     // 画面遷移(詳細表示)
     return("_TableName_Detail.aspx");
 }
Exemple #11
0
 /// <summary>btnButton3のClickイベント</summary>
 /// <param name="fxEventArgs">Event Handlerの共通引数</param>
 /// <returns>URL</returns>
 /// <remarks>画面遷移不可能(×)</remarks>
 protected string UOC_btnButton4_Click(FxEventArgs fxEventArgs)
 {
     return("4→4");
 }
    /// <summary>検索ボタン</summary>
    /// <param name="fxEventArgs">イベントハンドラの共通引数</param>
    /// <returns>URL</returns>
    protected string UOC_btnSearch_Click(FxEventArgs fxEventArgs)
    {
        // 更新ボタンの非活性化
        this.btnBatUpd.Enabled = false;

        // GridViewをリセット
        this.gvwGridView1.PageIndex = 0;
        this.gvwGridView1.Sort("", SortDirection.Ascending);

        // 検索条件の収集
        // AndEqualSearchConditions
        Dictionary <string, object> andEqualSearchConditions = new Dictionary <string, object>();

        // ControlComment:LoopStart-PKColumn
        andEqualSearchConditions.Add("_ColumnName_", this.txt_ColumnName__And.Text);
        // ControlComment:LoopEnd-PKColumn
        // ControlComment:LoopStart-ElseColumn
        andEqualSearchConditions.Add("_ColumnName_", this.txt_ColumnName__And.Text);
        // ControlComment:LoopEnd-ElseColumn
        Session["AndEqualSearchConditions"] = andEqualSearchConditions;


        // AndLikeSearchConditions
        Dictionary <string, string> andLikeSearchConditions = new Dictionary <string, string>();

        // ControlComment:LoopStart-PKColumn
        andLikeSearchConditions.Add("_ColumnName_", this.txt_ColumnName__And_Like.Text);
        // ControlComment:LoopEnd-PKColumn
        // ControlComment:LoopStart-ElseColumn
        andLikeSearchConditions.Add("_ColumnName_", this.txt_ColumnName__And_Like.Text);
        // ControlComment:LoopEnd-ElseColumn
        Session["AndLikeSearchConditions"] = andLikeSearchConditions;

        // OrEqualSearchConditions
        Dictionary <string, object[]> orEqualSearchConditions = new Dictionary <string, object[]>();

        // ControlComment:LoopStart-PKColumn
        orEqualSearchConditions.Add("_ColumnName_", this.txt_ColumnName__OR.Text.Split(' '));
        // ControlComment:LoopEnd-PKColumn
        // ControlComment:LoopStart-ElseColumn
        orEqualSearchConditions.Add("_ColumnName_", this.txt_ColumnName__OR.Text.Split(' '));
        // ControlComment:LoopEnd-ElseColumn
        Session["OrEqualSearchConditions"] = orEqualSearchConditions;

        // OrLikeSearchConditions
        Dictionary <string, string[]> orLikeSearchConditions = new Dictionary <string, string[]>();

        // ControlComment:LoopStart-PKColumn
        orLikeSearchConditions.Add("_ColumnName_", this.txt_ColumnName__OR_Like.Text.Split(' '));
        // ControlComment:LoopEnd-PKColumn
        // ControlComment:LoopStart-ElseColumn
        orLikeSearchConditions.Add("_ColumnName_", this.txt_ColumnName__OR_Like.Text.Split(' '));
        // ControlComment:LoopEnd-ElseColumn
        Session["OrLikeSearchConditions"] = orLikeSearchConditions;

        //// ElseSearchConditions
        //Dictionary<string, object> ElseSearchConditions = new Dictionary<string, object>();
        //ElseSearchConditions.Add("myp1", 1);
        //ElseSearchConditions.Add("myp2", 40);
        //Session["ElseSearchConditions"] = ElseSearchConditions;
        //Session["ElseWhereSQL"] = "AND [ProductID] BETWEEN @myp1 AND @myp2";

        // ソート条件の初期化
        Session["SortExpression"] = "_PKFirstColumn_"; // 主キーを指定
        Session["SortDirection"]  = "ASC";             // ASCを指定

        // ページング
        this.gvwGridView1.AllowPaging = true;

        // gvwGridView1をObjectDataSourceに連結。
        this.gvwGridView1.DataSource   = null;
        this.gvwGridView1.DataSourceID = "ObjectDataSource1";

        // ヘッダーを設定する。
        this.gvwGridView1.Columns[_ColumnNmbr_].HeaderText = "削除";
        this.gvwGridView1.Columns[_ColumnNmbr_].HeaderText = "更新";
        // ControlComment:LoopStart-PKColumn
        this.gvwGridView1.Columns[_ColumnNmbr_].HeaderText = "_ColumnName_";
        // ControlComment:LoopEnd-PKColumn
        // ControlComment:LoopStart-ElseColumn
        this.gvwGridView1.Columns[_ColumnNmbr_].HeaderText = "_ColumnName_";
        // ControlComment:LoopEnd-ElseColumn

        // 画面遷移しない。
        return(string.Empty);
    }
Exemple #13
0
        /// <summary>
        /// ddlMDropDownList4のSelectedIndexChangedイベント
        /// </summary>
        /// <param name="fxEventArgs">Event Handlerの共通引数</param>
        /// <returns>URL</returns>
        protected string UOC_testAspNetAjaxExtension_Single_ddlMDropDownList4_SelectedIndexChanged(FxEventArgs fxEventArgs)
        {
            // 待機する(二重送信確認用)
            System.Threading.Thread.Sleep(this.SleepCnt);

            // テキストボックスの値を変更
            TextBox textBox = (TextBox)this.GetMasterWebControl("TextBox8");

            textBox.Text = "通常のPost Back(DDLのSelected Index Changed)";

            return("");
        }
Exemple #14
0
        /// <summary>
        /// ddlMDropDownList3のSelectedIndexChangedイベント
        /// </summary>
        /// <param name="fxEventArgs">Event Handlerの共通引数</param>
        /// <returns>URL</returns>
        protected string UOC_testAspNetAjaxExtension_Single_ddlMDropDownList3_SelectedIndexChanged(FxEventArgs fxEventArgs)
        {
            // 待機する(UpdateProgress、二重送信確認用)
            System.Threading.Thread.Sleep(this.SleepCnt);

            // テキストボックスの値を変更
            TextBox textBox = (TextBox)this.GetMasterWebControl("TextBox7");

            textBox.Text = "ajaxのPost Back(DDLのSelected Index Changed)";

            // ajaxのEvent Handlerでは画面遷移しないこと。
            return("");
        }
 /// <summary>
 /// lbnMLinkButton2のクリックイベント
 /// </summary>
 /// <param name="fxEventArgs">イベントハンドラの共通引数</param>
 /// <returns>URL</returns>
 public string UOC_TestScreen1_lbnMLinkButton2_Click(FxEventArgs fxEventArgs)
 {
     return("~/Aspx/testFxLayerP/testTransitionAheadScreen.aspx");
 }
    /// <summary>ユーザコントロールにイベントハンドラを実装可能にしたのでそのテスト。</summary>
    /// <param name="fxEventArgs">イベントハンドラの共通引数</param>
    /// <returns>URL</returns>
    protected string UOC_sampleControl1_btnUCButton_Click(FxEventArgs fxEventArgs)
    {
        Response.Write("UOC_sampleControl1_btnUCButton_Clickを実行できた。");

        return("");
    }
 /// <summary>
 /// impMImageMap2のクリックイベント
 /// </summary>
 /// <param name="fxEventArgs">イベントハンドラの共通引数</param>
 /// <returns>URL</returns>
 public string UOC_TestScreen1_impMImageMap2_Click(FxEventArgs fxEventArgs)
 {
     return("~/Aspx/testFxLayerP/testTransitionAheadScreen.aspx");
 }
Exemple #18
0
 /// <summary>
 /// btnButton2のクリックイベント(システム例外)
 /// </summary>
 /// <param name="fxEventArgs">イベントハンドラの共通引数</param>
 /// <returns>URL</returns>
 protected string UOC_btnButton2_Click(FxEventArgs fxEventArgs)
 {
     throw new BusinessSystemException(
               "P層で「システム例外」をスロー",
               "P層で「システム例外」をスロー");
 }
        /// <summary>業務例外発生時の処理を実装</summary>
        /// <param name="baEx">BusinessApplicationException</param>
        /// <param name="fxEventArgs">イベントハンドラの共通引数</param>
        /// <remarks>画面コード親クラス1から利用される派生の末端</remarks>
        protected override void UOC_ABEND(BusinessApplicationException baEx, FxEventArgs fxEventArgs)
        {
            // 業務例外発生時の処理を実装
            // TODO:

            // ここに、メッセージの組み立てロジックを実装する。

            // メッセージ編集処理 ------------------------------------------

            string messageID          = baEx.messageID;
            string messageDescription = "";

            // メッセージIDから、対応するメッセージを取得する。
            messageDescription = GetMessage.GetMessageDescription(messageID);
            if (messageDescription == "")
            {
                // メッセージが取得できなかった場合
                messageDescription = baEx.Message;
            }
            else
            {
                // メッセージが取得できた場合、
                // 必要なら、メッセージに、可変文字列を組み込む。

                // 方式は、プロジェクト毎に検討のこと。
                messageDescription = messageDescription.Replace("%1", baEx.Message);
                messageDescription = messageDescription.Replace("%2", baEx.Information);
            }

            // -------------------------------------------------------------

            // メッセージ表示処理 ------------------------------------------

            #region メッセージボックスを使用して表示する場合。

            // 「OK」メッセージダイアログの表示処理
            this.ShowOKMessageDialog(
                messageID, messageDescription,
                FxEnum.IconType.Exclamation,
                "BusinessApplicationExceptionを使用したダイアログ表示");

            #endregion

            #region マスタ ページ上のラベルに表示する場合。

            //// 結果表示するメッセージ エリア
            //Label label = (Label)this.GetMasterWebControl("Label1");
            //label.Text = "";

            //// 結果(業務続行可能なエラー)
            //label.Text = "ErrorMessageID:" + baEx.messageID + "\r\n";
            //label.Text += "ErrorMessage:" + baEx.Message + "\r\n";
            //label.Text += "ErrorInfo:" + baEx.Information + "\r\n";

            #endregion

            // -------------------------------------------------------------

            // 性能測定終了

            // イベント処理開始前にエラーが発生した場合は、
            // this.perfRecがnullの場合があるので、null対策コードを挿入する。
            if (this.perfRec == null)
            {
                // nullの場合、新しいインスタンスを生成し、性能測定開始。
                this.perfRec = new PerformanceRecorder();
                perfRec.StartsPerformanceRecord();
            }

            this.perfRec.EndsPerformanceRecord();

            // 認証ユーザ情報を取得する ------------------------------------
            this.GetUserInfo();

            // ACCESSログ出力-----------------------------------------------

            // ------------
            // メッセージ部
            // ------------
            // ユーザ名, IPアドレス,
            // レイヤ, 画面名, コントロール名, 処理名
            // 処理時間(実行時間), 処理時間(CPU時間)
            // エラーメッセージID, エラーメッセージ等
            // ------------
            string strLogMessage =
                "," + UserInfo.UserName +
                "," + Request.UserHostAddress +
                "," + "<-----" +
                "," + this.ContentPageFileNoEx +
                "," + fxEventArgs.ButtonID +
                "," + "" +
                "," + this.perfRec.ExecTime +
                "," + this.perfRec.CpuTime +
                "," + baEx.messageID +
                "," + baEx.Message; // baEx

            // Log4Netへログ出力
            LogIF.WarnLog("ACCESS", strLogMessage);

            // -------------------------------------------------------------
        }
Exemple #20
0
 /// <summary>
 /// btnButton3のクリックイベント(その他、一般的な例外)
 /// </summary>
 /// <param name="fxEventArgs">イベントハンドラの共通引数</param>
 /// <returns>URL</returns>
 protected string UOC_btnButton3_Click(FxEventArgs fxEventArgs)
 {
     throw new Exception("P層で「その他、一般的な例外」をスロー");
 }
Exemple #21
0
 /// <summary>追加Button</summary>
 /// <param name="fxEventArgs">Event Handlerの共通引数</param>
 /// <returns>URL</returns>
 protected string UOC_btnInsert_Click(FxEventArgs fxEventArgs)
 {
     // 画面遷移(詳細表示)
     return("ProductsDetail.aspx");
 }
Exemple #22
0
 /// <summary>btnButton3のクリックイベント</summary>
 /// <param name="fxEventArgs">イベントハンドラの共通引数</param>
 /// <returns>URL</returns>
 /// <remarks>画面遷移可能(○)</remarks>
 protected string UOC_btnButton5_Click(FxEventArgs fxEventArgs)
 {
     return("0→5?testPN2=testPV2");
 }
 /// <summary>btnButton1のClickイベント</summary>
 /// <param name="fxEventArgs">Event Handlerの共通引数</param>
 /// <returns>URL</returns>
 protected string UOC_btnButton1_Click(FxEventArgs fxEventArgs)
 {
     // Post Backをまたいで値が保存されるかの確認
     return("");
 }
Exemple #24
0
 /// <summary>btnButton26のクリックイベント</summary>
 /// <param name="fxEventArgs">イベントハンドラの共通引数</param>
 /// <returns>URL</returns>
 /// <remarks>dialog</remarks>
 protected string UOC_btnButton26_Click(FxEventArgs fxEventArgs)
 {
     this.ShowModalScreen("/ProjectX_sample/Aspx/testScreenCtrl/WebForm5.aspx");
     return("");
 }
 /// <summary>
 /// ibnMImageButton1のClickイベント
 /// </summary>
 /// <param name="fxEventArgs">Event Handlerの共通引数</param>
 /// <returns>URL</returns>
 protected string UOC_testScreenCtrl_ibnMImageButton1_Click(FxEventArgs fxEventArgs)
 {
     // 外部サイトへ(QueryString付き)
     return("google?q=WebForm1");
 }
Exemple #26
0
 /// <summary>btnButton27のクリックイベント</summary>
 /// <param name="fxEventArgs">イベントハンドラの共通引数</param>
 /// <returns>URL</returns>
 protected string UOC_btnButton27_Click(FxEventArgs fxEventArgs)
 {
     // ブラウザ ウィンドウ別セッション領域 - 設定
     this.SetDataToBrowserWindow("msg", this.TextBox1.Text);
     return("");
 }
 /// <summary>btnButton16のClickイベント</summary>
 /// <param name="fxEventArgs">Event Handlerの共通引数</param>
 /// <returns>URL</returns>
 /// <remarks>違法な画面遷移(Redirect)(×)</remarks>
 protected string UOC_btnButton16_Click(FxEventArgs fxEventArgs)
 {
     this.ShowOKMessageDialog("Post Backの", "テストです", FxEnum.IconType.Information, "テスト");
     return("");
 }
Exemple #28
0
 /// <summary>btnButton28のクリックイベント</summary>
 /// <param name="fxEventArgs">イベントハンドラの共通引数</param>
 /// <returns>URL</returns>
 protected string UOC_btnButton28_Click(FxEventArgs fxEventArgs)
 {
     // ブラウザ ウィンドウ別セッション領域 - 取得
     this.TextBox1.Text = (string)this.GetDataFromBrowserWindow("msg");
     return("");
 }
 /// <summary>btnButton23のClickイベント</summary>
 /// <param name="fxEventArgs">Event Handlerの共通引数</param>
 /// <returns>URL</returns>
 /// <remarks>dialog</remarks>
 protected string UOC_btnButton23_Click(FxEventArgs fxEventArgs)
 {
     this.ShowModalScreen("~/Aspx/TestScreenCtrl/WebForm2.aspx");
     return("");
 }
 /// <summary>
 /// ibnImageButton21のClickイベント
 /// </summary>
 /// <param name="fxEventArgs">Event Handlerの共通引数</param>
 /// <returns>URL</returns>
 protected string UOC_ibnImageButton21_Click(FxEventArgs fxEventArgs)
 {
     // 親画面別セッション領域 - キー:msgのみ削除
     this.DeleteDataFromModalInterface("msg");
     return("");
 }