Esempio n. 1
0
        //────────────────────────────────────────
        #endregion



        #region アクション
        //────────────────────────────────────────

        /// <summary>
        /// ユーザー定義プログラムの実行。
        /// </summary>
        /// <returns></returns>
        public override string Execute5_Main(
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

            log_Method.BeginMethod(Info_Expr.Name_Library, this, "Execute5_Main", log_Reports);
            //
            //

            Configuration_Node parent_Configurationtree_Node_Query = this.Cur_Configuration;

            StringBuilder sb_Result = new StringBuilder();

            //
            // 外観
            //
            // <f-text-template table="Ut:条件テーブル" lookup-id="100">
            //
            // ・lookup-id は、lookup-value という名前の方が良かった。
            //

            //
            // 指定のテーブルの ID列を指定して、TEXT列の内容を取得。
            Builder_TexttemplateP1pImpl p1pText = new Builder_TexttemplateP1pImpl();
            {
                // <f-text-template>要素。
                Selectstatement selectSt = new SelectstatementImpl(this, this.Cur_Configuration);

                // TODO: logic属性がある版も要るはず。
                Recordcondition recCond1;
                bool            bSuccessful = RecordconditionImpl.TryBuild(out recCond1, EnumLogic.None, Expression_SftextTemplate.S_FIELD_ID, parent_Configurationtree_Node_Query, log_Reports);
                selectSt.List_Recordcondition.Add(recCond1);

                ////
                //// (1)キー_フィールド名
                //{
                //    recCond1.Name_Field = "ID";
                //}

                //
                // (2)探したいキー値
                {
                    //
                    // thisは、<f-text-template>。
                    //

                    string sLookupId;
                    bool   bHit = this.TrySelectAttribute(out sLookupId, PmNames.S_LOOKUP_ID.Name_Pm, EnumHitcount.One, log_Reports);
                    if (bHit)
                    {
                        recCond1.Value = sLookupId;
                    }

                    string sLookupValue;
                    if (log_Reports.Successful)
                    {
                        sLookupValue = recCond1.Value;
                    }
                    else
                    {
                        // エラー
                        goto gt_Error_NotFoundVariable;
                    }

                    // bug:
                    if ("" == sLookupValue.Trim())
                    {
                        //
                        // 検索キーが空欄の場合。
                        sb_Result.Length = 0; //空文字列にする。
                        goto gt_EndMethod;
                    }
                }

                //
                // (3)検索ヒットの必須の有無
                {
                    // 必須指定。
                    selectSt.Required = Expression_SftextTemplate.S_TRUE;
                }

                //
                // (4)テーブル名
                {
                    Expression_Node_String ec_Result;//ソース情報利用
                    bool bHit = this.TrySelectAttribute(out ec_Result, PmNames.S_TABLE.Name_Pm, EnumHitcount.One, log_Reports);
                    selectSt.Expression_From = ec_Result;
                }

                //
                // (5)欲しいデータのあるフィールド名
                selectSt.List_SName_SelectField.Add(Expression_SftextTemplate.S_FIELD_TEXT);



                //
                // (1)レコードセットの絞り込み。
                RecordSet dst_Rs;
                {
                    Table_Humaninput o_Tbl = this.Owner_MemoryApplication.MemoryTables.GetTable_HumaninputByName(
                        selectSt.Expression_From,//これが空文字列の場合がある??
                        true,
                        log_Reports
                        );
                    dst_Rs = new RecordSetImpl(o_Tbl);
                }
                //dst_Rs.Selectstatement = selectSt;//★


                {
                    // テーブル名。
                    if ("" == selectSt.Expression_From.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports).Trim())
                    {
                        //
                        // エラー。
                        goto gt_Error_EmptyTableName;
                    }

                    Table_Humaninput o_Table = this.Owner_MemoryApplication.MemoryTables.GetTable_HumaninputByName(selectSt.Expression_From, true, log_Reports);

                    if (null == o_Table)
                    {
                        goto gt_Error_NullTable;
                    }



                    bool isRequired_ExpectedValue;
                    {
                        bool parseSuccessful = bool.TryParse(selectSt.Required, out isRequired_ExpectedValue);
                    }


                    //
                    //
                    //
                    // 条件
                    //
                    //
                    //
                    string          name_KeyField;
                    Fielddefinition fielddefinition_Key;
                    string          value_Expected;
                    P2_ReccondImpl  sel2 = new P2_ReccondImpl();
                    sel2.GetFirstAwhrReccond(
                        out name_KeyField,
                        out fielddefinition_Key,
                        out value_Expected,
                        selectSt.List_Recordcondition,
                        o_Table,
                        log_Reports
                        );

                    List <DataRow> dst_Row = new List <DataRow>();

                    if (log_Reports.Successful)
                    {
                        SelectPerformerImpl sp = new SelectPerformerImpl();
                        sp.Select(
                            out dst_Row,
                            name_KeyField,
                            value_Expected,
                            isRequired_ExpectedValue,
                            fielddefinition_Key,
                            o_Table.DataTable,
                            parent_Configurationtree_Node_Query,
                            log_Reports
                            );
                    }

                    if (log_Reports.Successful)
                    {
                        dst_Rs.AddList(dst_Row, log_Reports);
                    }

                    if (!log_Reports.Successful)
                    {
                        // 既エラー。
                        goto gt_EndMethod;
                    }
                }


                if (!log_Reports.Successful)
                {
                    //
                    // エラーが出ていたら、さっさと抜ける。
                    //sResult = "";
                    goto gt_EndMethod;
                }

                //
                // フィールド値の取得。
                P5_CellsSelecterImpl  sel5            = new P5_CellsSelecterImpl(this.Owner_MemoryApplication);
                List <List <string> > sListList_reslt = sel5.P5_Select_CellType(
                    dst_Rs,
                    selectSt,
                    null,//nwhere_recordSetSaveTo,
                    this.Cur_Configuration,
                    log_Reports
                    );



                if (0 < sListList_reslt.Count)
                {
                    // 先頭行の、
                    List <string> sList_Fld = sListList_reslt[0];
                    // 先頭フィールドの値。
                    string sString = sList_Fld[0];

                    //e_string.SetValidation(...);
                    p1pText.Text = sString;
                }
                else
                {
                    // エラー

                    Log_TextIndented txt = new Log_TextIndentedImpl();
                    txt.Append(this.GetType().Name);
                    txt.Append("#GetString:(" + Info_Expr.Name_Library + ") エラー。該当なし。");

                    txt.Append(" 選択フィールド=[");

                    txt.Append(selectSt.ToSelectFieldNameListCsv());

                    txt.Append("]");

                    txt.Append(" テーブル=[");

                    txt.Append(selectSt.Expression_From.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports));
                    txt.Append("]");

                    // キーフィールド
                    txt.Append(" [");

                    txt.Append(recCond1.Name_Field);

                    txt.Append("]が");

                    // 探す値。
                    txt.Append("[");
                    txt.Append(recCond1.Value);
                    txt.Append("]のとき");



                    p1pText.Text = txt.ToString();
                }
            }



            List <int> nList_P1p = p1pText.ExistsP1pNumbers(
                this.Dictionary_Expression_Attribute,
                log_Reports
                );

            foreach (int n_P1p in nList_P1p)
            {
                string p1pValue;
                {
                    bool bHit = this.TrySelectAttribute(
                        out p1pValue,
                        "p" + n_P1p + "p",
                        EnumHitcount.One,
                        log_Reports
                        );

                    if (log_Reports.Successful)
                    {
                    }
                    else
                    {
                        p1pValue = null;
                    }

                    p1pText.Dictionary_NumberAndValue_Parameter.Add(n_P1p, p1pValue);
                }
            }


            Expression_Node_String ec_TextTemplate = p1pText.Compile(
                log_Reports
                );

            sb_Result.Append(ec_TextTemplate.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports));


            //
            //
            //
            // TODO: 制約の判定
            //
            //
            //

            goto gt_EndMethod;
            //
            //
            #region 異常系
            //────────────────────────────────────────
gt_Error_NotFoundVariable:
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, Log_RecordReportsImpl.ToText_Configuration(parent_Configurationtree_Node_Query), log_Reports);//設定位置パンくずリスト

                this.Owner_MemoryApplication.CreateErrorReport("Er:6009;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
gt_Error_EmptyTableName:
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, Log_RecordReportsImpl.ToText_Configuration(parent_Configurationtree_Node_Query), log_Reports);//設定位置パンくずリスト

                this.Owner_MemoryApplication.CreateErrorReport("Er:6010;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
gt_Error_NullTable:
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, Log_RecordReportsImpl.ToText_Configuration(parent_Configurationtree_Node_Query), log_Reports);//設定位置パンくずリスト

                this.Owner_MemoryApplication.CreateErrorReport("Er:6011;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
            //
gt_EndMethod:
            log_Method.EndMethod(log_Reports);
            return(sb_Result.ToString());
        }
Esempio n. 2
0
        //────────────────────────────────────────
        /// <summary>
        /// ユーザー定義プログラムの実行。
        /// </summary>
        /// <returns></returns>
        public override string Execute5_Main(
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);
            log_Method.BeginMethod(Info_Expr.Name_Library, this, "Execute5_Main", log_Reports);
            //
            //

            //
            //
            // 「this」は、<f-cell>に当たる。
            //
            // record-set-load-from などを使っている場合は、keyFldName等の情報が足りなくなる場合がある。
            //
            //

            string sResult;

            if (!log_Reports.Successful)
            {
                // エラーが出ていたら、さっさと抜ける。
                sResult = "<「E■f-cell」エラー101>";
                goto gt_EndMethod;
            }

            //
            // (102)セレクト文の作成。
            //
            Selectstatement selectSt;
            bool bOneCellSelectCondition;//「フィールド名 = 値」の形のみ true。
            bool bExists_Awhr;
            if (log_Reports.Successful)
            {
                this.E_Execute_P1_CleateSelect(
                    out bOneCellSelectCondition,
                    out selectSt,
                    out bExists_Awhr,
                    this.Cur_Configuration,
                    log_Reports
                    );
            }
            else
            {
                // エラーが出ていたら、さっさと抜ける。
                sResult = "<「E■f-cell」エラー102a>";
                goto gt_EndMethod;
            }

            bool bExists_Into;
            if (log_Reports.Successful)
            {
                // into属性の有無。
                if ("" != selectSt.Expression_Into.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports).Trim())
                {
                    bExists_Into = true;
                }
                else
                {
                    bExists_Into = false;
                }
            }
            else
            {
                // エラーが出ていたら、さっさと抜ける。
                sResult = "<「E■f-cell」エラー102b>";
                goto gt_EndMethod;
            }

            if (!log_Reports.Successful)
            {
                // エラーが出ていたら、さっさと抜ける。
                sResult = "<「E■f-cell」エラー103>";
                goto gt_EndMethod;
            }

            // from句のテーブルを読み込みます。
            Table_Humaninput o_FromTable = this.Owner_MemoryApplication.MemoryTables.GetTable_HumaninputByName(selectSt.Expression_From, true, log_Reports);

            if (!log_Reports.Successful)
            {
                // エラーが出ていたら、さっさと抜ける。
                sResult = "<「E■f-cell」エラー104>";
                goto gt_EndMethod;
            }

            //
            // (105)セレクト文を指定して、レコードセットの絞り込み。
            //
            RecordSet recordSet;
            // 行リスト<列リスト>
            List<List<string>> sFieldListList;
            if (
                bOneCellSelectCondition || //「フィールド名=値」の検索条件があり、セル1件を絞り込む場合。
                selectSt.List_Recordcondition.Count < 1 //無条件な場合。
                )
            {
                // セレクト文を指定することで、レコードセットを取得。
                recordSet = this.E_Execute_P2_Select(
                    bExists_Awhr,
                    selectSt,
                    this.Cur_Configuration,
                    log_Reports
                    );

                if (!log_Reports.Successful)
                {
                    // エラーが出ていたら、さっさと抜ける。
                    sResult = "<「E■f-cell」エラー105>";
                    goto gt_EndMethod;
                }
                else if (null == recordSet)
                {
                    //
                    // エラー。
                    goto gt_Error_NotFoundRecordSet;
                }

                // (1)「E■rec-cond」が1つだけ入っている形式

                // (300)フィールドから値を取得。
                P5_CellsSelecterImpl sel5 = new P5_CellsSelecterImpl(this.Owner_MemoryApplication);
                sFieldListList = sel5.P5_Select_CellType(
                    recordSet,
                    selectSt,
                    null,//eWhere_recordSetSaveTo,
                    this.Cur_Configuration,
                    log_Reports
                    );

                if (!log_Reports.Successful)
                {
                    // エラーが出ていたら、さっさと抜ける。
                    sResult = "<「E■f-cell」エラー106>";
                    goto gt_EndMethod;
                }

            }
            else
            {
                // TODO:それ以外のタイプにも対応したい。
                sFieldListList = new List<List<string>>();

                // (2)「E■rec-cond」が1つ以上入っている形式
                // TODO: 対応したい。現状、into属性が付いている場合、結果を返していない。
                if (bExists_Into)
                {
                }
                else
                {
                    // 仮。動かないと思う。
                    //List<Fielddefinition> out_O_NewFldDefList_Dammy = new List<Fielddefinition>();
                    //TableUtil.SelectFieldListList(
                    //    out sFieldListList,
                    //    out out_O_NewFldDefList_Dammy,
                    //    selectSt.List_SName_SelectField,//                        sNewFieldNameList,
                    //    selectSt.E_Where,
                    //    o_FromTable,
                    //    log_Reports
                    //    );
                }
            }

            //
            // (400)制約の判定
            //
            this.E_Execute_P4(
                sFieldListList.Count,
                this.EnumHitcount,
                log_Reports
                );
            if (!log_Reports.Successful)
            {
                // エラーが出ていたら、さっさと抜ける。
                sResult = "<「E■f-cell」エラー401>";
                goto gt_EndMethod;
            }

            //
            // (500)結果
            StringBuilder sb = new StringBuilder();
            foreach (List<string> sList_Field in sFieldListList)
            {
                // 先頭フィールド
                if (0 < sList_Field.Count)
                {
                    string sChild = sList_Field[0];

                    // TODO:制約を付けたい。
                    //eChild.SetValidation(this.requestItems);

                    sb.Append(sChild);
                }
                else
                {
                    // エラー
                    sResult = "<「E■f-cell」エラー501:該当レコードなし>";
                    goto gt_Error_ZeroField;
                }
            }
            sResult = sb.ToString();

            // into="" 属性が指定されていれば、結果をテーブルとして保持したい。
            if (bExists_Into)
            {

                // into句のテーブルの、情報を読み込みます。
                Table_Humaninput o_IntoTableInfoOnly;
                //ystem.Console.WriteLine(Info_E.LibraryName + ":E_FcellImpl#Execute5_Main: into属性が指定されています。e_Into=[" + selectSt.Expression_Into.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports) + "]");
                o_IntoTableInfoOnly = this.Owner_MemoryApplication.MemoryTables.GetTable_HumaninputByName(selectSt.Expression_Into, true, log_Reports);

                if (!log_Reports.Successful)
                {
                    // エラーが出ていたら、さっさと抜ける。
                    sResult = "<「E■f-cell」エラー601>";
                    goto gt_EndMethod;
                }

                // テーブルから、指定の列だけを抽出したサブ・テーブルを作ります。
                Table_Humaninput o_NewTable = Utility_Table.CreateSubTableBySelect(
                    o_FromTable.Name + "のサブテーブル<E_FcellImpl.cs>",
                    selectSt.List_SName_SelectField,
                    o_IntoTableInfoOnly.Expression_Filepath_ConfigStack,
                    selectSt.EnumWherelogic,
                    selectSt.List_Recordcondition,
                    o_FromTable,
                    log_Reports
                    );

                if (!log_Reports.Successful)
                {
                    // エラーが出ていたら、さっさと抜ける。
                    sResult = "<「E■f-cell」エラー602>";
                    goto gt_EndMethod;
                }

                // 作ったテーブルをセット。
                //
                // 新規なら追加、既存なら上書き。
                this.Owner_MemoryApplication.MemoryTables.Dictionary_Table_Humaninput[selectSt.Expression_Into.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports)] = o_NewTable;

                if (!log_Reports.Successful)
                {
                    // エラーが出ていたら、さっさと抜ける。
                    sResult = "<「E■f-cell」エラー603>";
                    goto gt_EndMethod;
                }

            }

            goto gt_EndMethod;
            //
            //
            #region 異常系
            //────────────────────────────────────────
            gt_Error_NotFoundRecordSet:
            sResult = "<「E■f-cell」エラー192:該当レコードなし>";
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, Log_RecordReportsImpl.ToText_Configuration(this.Cur_Configuration), log_Reports);//設定位置パンくずリスト

                this.Owner_MemoryApplication.CreateErrorReport("Er:6012;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            gt_Error_ZeroField:
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, sFieldListList.Count.ToString(), log_Reports);//行数
                tmpl.SetParameter(2, Log_RecordReportsImpl.ToText_Configuration(this.Cur_Configuration), log_Reports);//設定位置パンくずリスト

                this.Owner_MemoryApplication.CreateErrorReport("Er:6013;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
            //
            gt_EndMethod:
            log_Method.EndMethod(log_Reports);
            return sResult;
        }
Esempio n. 3
0
        //────────────────────────────────────────
        /// <summary>
        /// ユーザー定義プログラムの実行。
        /// </summary>
        /// <returns></returns>
        public override string Execute5_Main(
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);
            log_Method.BeginMethod(Info_Expr.Name_Library, this, "Execute5_Main", log_Reports);
            //
            //

            Configuration_Node parent_Configurationtree_Node_Query = this.Cur_Configuration;

            StringBuilder sb_Result = new StringBuilder();

            //
            // 外観
            //
            // <f-text-template table="Ut:条件テーブル" lookup-id="100">
            //
            // ・lookup-id は、lookup-value という名前の方が良かった。
            //

            //
            // 指定のテーブルの ID列を指定して、TEXT列の内容を取得。
            Builder_TexttemplateP1pImpl p1pText = new Builder_TexttemplateP1pImpl();
            {
                // <f-text-template>要素。
                Selectstatement selectSt = new SelectstatementImpl(this, this.Cur_Configuration);

                // TODO: logic属性がある版も要るはず。
                Recordcondition recCond1;
                bool bSuccessful = RecordconditionImpl.TryBuild(out recCond1, EnumLogic.None, Expression_SftextTemplate.S_FIELD_ID, parent_Configurationtree_Node_Query, log_Reports);
                selectSt.List_Recordcondition.Add(recCond1);

                ////
                //// (1)キー_フィールド名
                //{
                //    recCond1.Name_Field = "ID";
                //}

                //
                // (2)探したいキー値
                {
                    //
                    // thisは、<f-text-template>。
                    //

                    string sLookupId;
                    bool bHit = this.TrySelectAttribute(out sLookupId, PmNames.S_LOOKUP_ID.Name_Pm, EnumHitcount.One, log_Reports);
                    if (bHit)
                    {
                        recCond1.Value = sLookupId;
                    }

                    string sLookupValue;
                    if (log_Reports.Successful)
                    {
                        sLookupValue = recCond1.Value;
                    }
                    else
                    {
                        // エラー
                        goto gt_Error_NotFoundVariable;
                    }

                    // bug:
                    if ("" == sLookupValue.Trim())
                    {
                        //
                        // 検索キーが空欄の場合。
                        sb_Result.Length = 0; //空文字列にする。
                        goto gt_EndMethod;
                    }
                }

                //
                // (3)検索ヒットの必須の有無
                {
                    // 必須指定。
                    selectSt.Required = Expression_SftextTemplate.S_TRUE;
                }

                //
                // (4)テーブル名
                {
                    Expression_Node_String ec_Result;//ソース情報利用
                    bool bHit = this.TrySelectAttribute(out ec_Result, PmNames.S_TABLE.Name_Pm, EnumHitcount.One, log_Reports);
                    selectSt.Expression_From = ec_Result;
                }

                //
                // (5)欲しいデータのあるフィールド名
                selectSt.List_SName_SelectField.Add(Expression_SftextTemplate.S_FIELD_TEXT);

                //
                // (1)レコードセットの絞り込み。
                RecordSet dst_Rs;
                {
                    Table_Humaninput o_Tbl = this.Owner_MemoryApplication.MemoryTables.GetTable_HumaninputByName(
                        selectSt.Expression_From,//これが空文字列の場合がある??
                        true,
                        log_Reports
                        );
                    dst_Rs = new RecordSetImpl(o_Tbl);
                }
                //dst_Rs.Selectstatement = selectSt;//★

                {

                    // テーブル名。
                    if ("" == selectSt.Expression_From.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports).Trim())
                    {
                        //
                        // エラー。
                        goto gt_Error_EmptyTableName;
                    }

                    Table_Humaninput o_Table = this.Owner_MemoryApplication.MemoryTables.GetTable_HumaninputByName(selectSt.Expression_From, true, log_Reports);

                    if (null == o_Table)
                    {
                        goto gt_Error_NullTable;
                    }

                    bool isRequired_ExpectedValue;
                    {
                        bool parseSuccessful = bool.TryParse(selectSt.Required, out isRequired_ExpectedValue);
                    }

                    //
                    //
                    //
                    // 条件
                    //
                    //
                    //
                    string name_KeyField;
                    Fielddefinition fielddefinition_Key;
                    string value_Expected;
                    P2_ReccondImpl sel2 = new P2_ReccondImpl();
                    sel2.GetFirstAwhrReccond(
                        out name_KeyField,
                        out fielddefinition_Key,
                        out value_Expected,
                        selectSt.List_Recordcondition,
                        o_Table,
                        log_Reports
                        );

                    List<DataRow> dst_Row = new List<DataRow>();

                    if (log_Reports.Successful)
                    {
                        SelectPerformerImpl sp = new SelectPerformerImpl();
                        sp.Select(
                            out dst_Row,
                            name_KeyField,
                            value_Expected,
                            isRequired_ExpectedValue,
                            fielddefinition_Key,
                            o_Table.DataTable,
                            parent_Configurationtree_Node_Query,
                            log_Reports
                            );
                    }

                    if (log_Reports.Successful)
                    {
                        dst_Rs.AddList(dst_Row, log_Reports);
                    }

                    if (!log_Reports.Successful)
                    {
                        // 既エラー。
                        goto gt_EndMethod;
                    }
                }

                if (!log_Reports.Successful)
                {
                    //
                    // エラーが出ていたら、さっさと抜ける。
                    //sResult = "";
                    goto gt_EndMethod;
                }

                //
                // フィールド値の取得。
                P5_CellsSelecterImpl sel5 = new P5_CellsSelecterImpl(this.Owner_MemoryApplication);
                List<List<string>> sListList_reslt = sel5.P5_Select_CellType(
                    dst_Rs,
                    selectSt,
                    null,//nwhere_recordSetSaveTo,
                    this.Cur_Configuration,
                    log_Reports
                    );

                if (0 < sListList_reslt.Count)
                {
                    // 先頭行の、
                    List<string> sList_Fld = sListList_reslt[0];
                    // 先頭フィールドの値。
                    string sString = sList_Fld[0];

                    //e_string.SetValidation(...);
                    p1pText.Text = sString;
                }
                else
                {
                    // エラー

                    Log_TextIndented txt = new Log_TextIndentedImpl();
                    txt.Append(this.GetType().Name);
                    txt.Append("#GetString:(" + Info_Expr.Name_Library + ") エラー。該当なし。");

                    txt.Append(" 選択フィールド=[");

                    txt.Append(selectSt.ToSelectFieldNameListCsv());

                    txt.Append("]");

                    txt.Append(" テーブル=[");

                    txt.Append(selectSt.Expression_From.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports));
                    txt.Append("]");

                    // キーフィールド
                    txt.Append(" [");

                    txt.Append(recCond1.Name_Field);

                    txt.Append("]が");

                    // 探す値。
                    txt.Append("[");
                    txt.Append(recCond1.Value);
                    txt.Append("]のとき");

                    p1pText.Text = txt.ToString();
                }

            }

            List<int> nList_P1p = p1pText.ExistsP1pNumbers(
                this.Dictionary_Expression_Attribute,
                log_Reports
                );

            foreach (int n_P1p in nList_P1p)
            {
                string p1pValue;
                {
                    bool bHit = this.TrySelectAttribute(
                        out p1pValue,
                        "p" + n_P1p+"p",
                        EnumHitcount.One,
                        log_Reports
                        );

                    if (log_Reports.Successful)
                    {
                    }
                    else
                    {
                        p1pValue = null;
                    }

                    p1pText.Dictionary_NumberAndValue_Parameter.Add(n_P1p, p1pValue);
                }
            }

            Expression_Node_String ec_TextTemplate = p1pText.Compile(
                log_Reports
                );

            sb_Result.Append(ec_TextTemplate.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports));

            //
            //
            //
            // TODO: 制約の判定
            //
            //
            //

            goto gt_EndMethod;
            //
            //
            #region 異常系
            //────────────────────────────────────────
            gt_Error_NotFoundVariable:
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, Log_RecordReportsImpl.ToText_Configuration(parent_Configurationtree_Node_Query), log_Reports);//設定位置パンくずリスト

                this.Owner_MemoryApplication.CreateErrorReport("Er:6009;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            gt_Error_EmptyTableName:
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, Log_RecordReportsImpl.ToText_Configuration(parent_Configurationtree_Node_Query), log_Reports);//設定位置パンくずリスト

                this.Owner_MemoryApplication.CreateErrorReport("Er:6010;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            gt_Error_NullTable:
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, Log_RecordReportsImpl.ToText_Configuration(parent_Configurationtree_Node_Query), log_Reports);//設定位置パンくずリスト

                this.Owner_MemoryApplication.CreateErrorReport("Er:6011;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
            //
            gt_EndMethod:
            log_Method.EndMethod(log_Reports);
            return sb_Result.ToString();
        }