예제 #1
0
        private Res GetInBlock(Res res, bool set)
        {
            foreach (string str in query.GetResData().Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries))
            {
                if (str.Contains("레코드명:") && str.Contains("InBlock"))
                {
                    res.InBlock = str.Replace("*", string.Empty).Replace("레코드명:", string.Empty).Trim();

                    continue;
                }
                else if (str.Contains("레코드명:") && str.Contains("OutBlock"))
                {
                    OutBlock  = str.Replace("*", string.Empty).Replace("레코드명:", string.Empty).Trim();
                    FieldName = new List <string>();
                    set       = false;

                    continue;
                }
                else if (str.Contains("No,한글명,필드명,영문명,"))
                {
                    continue;
                }

                var temp = str.Split(',');

                if (set)
                {
                    res.Filed       = temp[2];
                    res.OccursIndex = int.Parse(temp[6]);

                    continue;
                }
                FieldName.Add(temp[2]);
            }
            return(res);
        }