Example #1
0
        /// <summary>
        /// XML Documentに変換。
        /// </summary>
        /// <param name="xmlText"></param>
        /// <returns></returns>
        public XmlDocument Perform(
            MemoryGloballistconfig moGlcnf,
            Log_Reports log_Reports
            )
        {
            XmlDocument doc = new XmlDocument();

            XmlElement rootElm = doc.CreateElement("global-list-config");

            doc.AppendChild(rootElm);

            rootElm.AppendChild(doc.CreateComment(" 変数の型名を、グローバルリストに並んでいる順番に並べてください "));

            // 変数の型名の追加
            foreach (GloballistconfigTypesection typeSection in moGlcnf.TypesectionList.List_Item)
            {
                XmlElement typeElm = doc.CreateElement("type");
                typeElm.SetAttribute(SrsAttrName.S_NAME, typeSection.Name_Type);
                rootElm.AppendChild(typeElm);
            }

            rootElm.AppendChild(doc.CreateComment(" 担当者の情報を記述してください。担当者名、変数の型名、変数番号のそれぞれ、順不同です。 "));
            // 担当者情報の追加
            foreach (GloballistconfigHuman human in moGlcnf.Dictionary_Human.Values)
            {
                XmlElement humanElm = doc.CreateElement("human");
                humanElm.SetAttribute(SrsAttrName.S_NAME, human.Name);
                rootElm.AppendChild(humanElm);

                // 担当変数の型の情報の追加
                foreach (GloballistconfigVariable var in human.Dictionary_Variable.Values)
                {
                    XmlElement varElm = doc.CreateElement("variable");
                    varElm.SetAttribute("type", var.Name_Type);
                    humanElm.AppendChild(varElm);

                    // 担当変数の情報の追加
                    foreach (GloballistconfigNumber num in var.Dictionary_Number.Values)
                    {
                        XmlElement numElm = doc.CreateElement("number");
                        numElm.SetAttribute("range", num.Text_Range);
                        numElm.SetAttribute("priority", num.Priority.Text);
                        varElm.AppendChild(numElm);
                    }
                }
            }
            return(doc);
        }
Example #2
0
        /// <summary>
        /// XML Documentに変換。
        /// </summary>
        /// <param name="xmlText"></param>
        /// <returns></returns>
        public XmlDocument Perform(
            MemoryGloballistconfig moGlcnf,
            Log_Reports log_Reports
            )
        {
            XmlDocument doc = new XmlDocument();

            XmlElement rootElm = doc.CreateElement("global-list-config");
            doc.AppendChild(rootElm);

            rootElm.AppendChild(doc.CreateComment(" 変数の型名を、グローバルリストに並んでいる順番に並べてください "));

            // 変数の型名の追加
            foreach (GloballistconfigTypesection typeSection in moGlcnf.TypesectionList.List_Item)
            {
                XmlElement typeElm = doc.CreateElement("type");
                typeElm.SetAttribute(SrsAttrName.S_NAME, typeSection.Name_Type);
                rootElm.AppendChild(typeElm);
            }

            rootElm.AppendChild(doc.CreateComment(" 担当者の情報を記述してください。担当者名、変数の型名、変数番号のそれぞれ、順不同です。 "));
            // 担当者情報の追加
            foreach (GloballistconfigHuman human in moGlcnf.Dictionary_Human.Values)
            {
                XmlElement humanElm = doc.CreateElement("human");
                humanElm.SetAttribute(SrsAttrName.S_NAME, human.Name);
                rootElm.AppendChild(humanElm);

                // 担当変数の型の情報の追加
                foreach (GloballistconfigVariable var in human.Dictionary_Variable.Values)
                {
                    XmlElement varElm = doc.CreateElement("variable");
                    varElm.SetAttribute("type", var.Name_Type);
                    humanElm.AppendChild(varElm);

                    // 担当変数の情報の追加
                    foreach (GloballistconfigNumber num in var.Dictionary_Number.Values)
                    {
                        XmlElement numElm = doc.CreateElement("number");
                        numElm.SetAttribute("range", num.Text_Range);
                        numElm.SetAttribute("priority", num.Priority.Text);
                        varElm.AppendChild(numElm);
                    }
                }
            }
            return doc;
        }
Example #3
0
        //────────────────────────────────────────
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sHuman">担当者名</param>
        /// <param name="moGlcnf"></param>
        /// <param name="log_Reports"></param>
        /// <returns></returns>
        public List<ResultOfGloballistconfigElementSearch> Perform(
            string sHuman,
            MemoryGloballistconfig moGlcnf,
            Log_Reports log_Reports
            )
        {
            List<ResultOfGloballistconfigElementSearch> resultList = new List<ResultOfGloballistconfigElementSearch>();

            if (null == sHuman)
            {
                // 担当者名が未指定の場合

                // 空リストになります。
            }
            else
            {
                // 担当者
                GloballistconfigHuman human = moGlcnf.Dictionary_Human[sHuman];

                // 各変数の型について
                foreach (GloballistconfigTypesection typeSection in moGlcnf.TypesectionList.List_Item)
                {
                    if (human.Dictionary_Variable.ContainsKey(typeSection.Name_Type))
                    {
                        // この型について
                        GloballistconfigVariable variable = human.Dictionary_Variable[typeSection.Name_Type];

                        // その変数番号要素をリストにします。

                        // 番号別優先順位設定について
                        foreach (GloballistconfigNumber numberObj in variable.Dictionary_Number.Values)
                        {
                            ResultOfGloballistconfigElementSearchImpl resultItem = new ResultOfGloballistconfigElementSearchImpl();
                            resultItem.Name_Type = variable.Name_Type;
                            resultItem.Text_NumberRange = numberObj.Text_Range;
                            resultItem.Priority = numberObj.Priority.Text;

                            resultList.Add(resultItem);
                        }
                    }
                }
            }

            return resultList;
        }
Example #4
0
        //────────────────────────────────────────

        /// <summary>
        ///
        /// </summary>
        /// <param name="sHuman">担当者名</param>
        /// <param name="moGlcnf"></param>
        /// <param name="log_Reports"></param>
        /// <returns></returns>
        public List <ResultOfGloballistconfigElementSearch> Perform(
            string sHuman,
            MemoryGloballistconfig moGlcnf,
            Log_Reports log_Reports
            )
        {
            List <ResultOfGloballistconfigElementSearch> resultList = new List <ResultOfGloballistconfigElementSearch>();

            if (null == sHuman)
            {
                // 担当者名が未指定の場合

                // 空リストになります。
            }
            else
            {
                // 担当者
                GloballistconfigHuman human = moGlcnf.Dictionary_Human[sHuman];

                // 各変数の型について
                foreach (GloballistconfigTypesection typeSection in moGlcnf.TypesectionList.List_Item)
                {
                    if (human.Dictionary_Variable.ContainsKey(typeSection.Name_Type))
                    {
                        // この型について
                        GloballistconfigVariable variable = human.Dictionary_Variable[typeSection.Name_Type];

                        // その変数番号要素をリストにします。

                        // 番号別優先順位設定について
                        foreach (GloballistconfigNumber numberObj in variable.Dictionary_Number.Values)
                        {
                            ResultOfGloballistconfigElementSearchImpl resultItem = new ResultOfGloballistconfigElementSearchImpl();
                            resultItem.Name_Type        = variable.Name_Type;
                            resultItem.Text_NumberRange = numberObj.Text_Range;
                            resultItem.Priority         = numberObj.Priority.Text;

                            resultList.Add(resultItem);
                        }
                    }
                }
            }

            return(resultList);
        }