示例#1
0
        //────────────────────────────────────────

        /// <summary>
        ///
        /// </summary>
        /// <param name="namelist_Field"></param>
        /// <param name="value_TableH"></param>
        /// <param name="log_Reports"></param>
        public void AddField(
            string namelist_Field,
            Table_Humaninput value_TableH,
            Log_Reports log_Reports
            )
        {
            List <string>         list_NameField = new CsvTo_ListImpl().Read(namelist_Field);
            RecordFielddefinition recordFielddefinition;

            bool bHit = value_TableH.TryGetFieldDefinitionByName(
                out recordFielddefinition,
                list_NameField,
                true,
                log_Reports
                );

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

            int nIx = 0;

            recordFielddefinition.ForEach(delegate(Fielddefinition fielddefinition, ref bool isBreak2, Log_Reports log_Reports2)
            {
                this.list_FieldKeies.Add(
                    new Fieldkey(list_NameField[nIx], fielddefinition.ToString_Type(), fielddefinition.Comment));

                nIx++;
            }, log_Reports);


            //
            //
            //
            //
gt_EndMethod:
            return;
        }
示例#2
0
        //────────────────────────────────────────
        /// <summary>
        /// 
        /// </summary>
        /// <param name="namelist_Field"></param>
        /// <param name="value_TableH"></param>
        /// <param name="log_Reports"></param>
        public void AddField(
            string namelist_Field,
            Table_Humaninput value_TableH,
            Log_Reports log_Reports
            )
        {
            List<string> list_NameField = new CsvTo_ListImpl().Read(namelist_Field);
            RecordFielddefinition recordFielddefinition;

             bool bHit = value_TableH.TryGetFieldDefinitionByName(
                out recordFielddefinition,
                list_NameField,
                true,
                log_Reports
                );
            if (!log_Reports.Successful || !bHit)
            {
                // 既エラー。
                goto gt_EndMethod;
            }

            int nIx = 0;
            recordFielddefinition.ForEach(delegate(Fielddefinition fielddefinition, ref bool isBreak2, Log_Reports log_Reports2)
            {
                this.list_FieldKeies.Add(
                    new Fieldkey(list_NameField[nIx], fielddefinition.ToString_Type(), fielddefinition.Comment));

                nIx++;
            }, log_Reports);

            //
            //
            //
            //
            gt_EndMethod:
            return;
        }
示例#3
0
        //────────────────────────────────────────
        #endregion



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

        /// <summary>
        /// where句の最初の条件を引っこ抜く。
        /// 条件に合うものを一気に集めてくる形になっているが、
        /// SelectedRecords に機能を持たせるか?
        /// </summary>
        /// <param name="out_Name_KeyField"></param>
        /// <param name="out_FielddefinitionKey2"></param>
        /// <param name="out_Value_Expected"></param>
        /// <param name="childReccondList"></param>
        /// <param name="tableH"></param>
        /// <param name="log_Reports"></param>
        public void GetFirstAwhrReccond(
            out string out_Name_KeyField,
            out Fielddefinition out_FielddefinitionKey2,
            out string out_Value_Expected,
            List <Recordcondition> list_ChildReccond,
            Table_Humaninput tableH,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

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


            Recordcondition err_Recordcondition = null;

            if (0 < list_ChildReccond.Count)
            {
                Recordcondition recCond_First = list_ChildReccond[0];

                err_Recordcondition = recCond_First;

                //
                // 検索のキーとなるフィールドの定義を調べます。

                List <string> list_Name_KeyFld;
                {
                    // 要素数1個
                    list_Name_KeyFld = new List <string>();
                    list_Name_KeyFld.Add(recCond_First.Name_Field);
                }



                // 該当なしの場合、ヌルを返す。
                RecordFielddefinition recordFielddefinition;
                bool bHit = tableH.TryGetFieldDefinitionByName(
                    out recordFielddefinition,
                    list_Name_KeyFld,
                    true,// 必須指定。
                    log_Reports
                    );
                if (!log_Reports.Successful || !bHit)
                {
                    // エラー
                    out_Name_KeyField       = "";
                    out_FielddefinitionKey2 = null;
                    out_Value_Expected      = "";
                    goto gt_EndMethod;
                }

                //正常
                out_FielddefinitionKey2 = recordFielddefinition.ValueAt(0);
                out_Name_KeyField       = recCond_First.Name_Field;
                out_Value_Expected      = recCond_First.Value;
            }
            else
            {
                //正常
                out_Name_KeyField       = "";
                out_FielddefinitionKey2 = null;
                out_Value_Expected      = "";
            }

            goto gt_EndMethod;


            //
            //
            //
            //
gt_EndMethod:
            log_Method.EndMethod(log_Reports);
        }
示例#4
0
        //────────────────────────────────────────
        /// <summary>
        /// where句の最初の条件を引っこ抜く。
        /// 条件に合うものを一気に集めてくる形になっているが、
        /// SelectedRecords に機能を持たせるか?
        /// </summary>
        /// <param name="out_Name_KeyField"></param>
        /// <param name="out_FielddefinitionKey2"></param>
        /// <param name="out_Value_Expected"></param>
        /// <param name="childReccondList"></param>
        /// <param name="tableH"></param>
        /// <param name="log_Reports"></param>
        public void GetFirstAwhrReccond(
            out string out_Name_KeyField,
            out Fielddefinition out_FielddefinitionKey2,
            out string out_Value_Expected,
            List<Recordcondition> list_ChildReccond,
            Table_Humaninput tableH,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);
            log_Method.BeginMethod(Info_Expr.Name_Library, this, "GetFirstAwhrReccond",log_Reports);
            //
            //

            Recordcondition err_Recordcondition = null;
            if (0 < list_ChildReccond.Count)
            {
                Recordcondition recCond_First = list_ChildReccond[0];

                err_Recordcondition = recCond_First;

                //
                // 検索のキーとなるフィールドの定義を調べます。

                List<string> list_Name_KeyFld;
                {
                    // 要素数1個
                    list_Name_KeyFld = new List<string>();
                    list_Name_KeyFld.Add(recCond_First.Name_Field);
                }

                // 該当なしの場合、ヌルを返す。
                RecordFielddefinition recordFielddefinition;
                bool bHit = tableH.TryGetFieldDefinitionByName(
                    out recordFielddefinition,
                    list_Name_KeyFld,
                    true,// 必須指定。
                    log_Reports
                    );
                if (!log_Reports.Successful || !bHit)
                {
                    // エラー
                    out_Name_KeyField = "";
                    out_FielddefinitionKey2 = null;
                    out_Value_Expected = "";
                    goto gt_EndMethod;
                }

                //正常
                out_FielddefinitionKey2 = recordFielddefinition.ValueAt(0);
                out_Name_KeyField = recCond_First.Name_Field;
                out_Value_Expected = recCond_First.Value;
            }
            else
            {
                //正常
                out_Name_KeyField = "";
                out_FielddefinitionKey2 = null;
                out_Value_Expected = "";
            }

            goto gt_EndMethod;

            //
            //
            //
            //
            gt_EndMethod:
            log_Method.EndMethod(log_Reports);
        }