示例#1
0
        public static XQt1826OutBlock[] ListFromQuery(XQt1826 query)
        {
            int count = query.GetBlockCount(XQt1826OutBlock.BlockName);
            List <XQt1826OutBlock> list = new List <XQt1826OutBlock>();

            if (query.QueryResult != null && query.QueryResult.IsSystemError == true)
            {
                return(list.ToArray());
            }
            for (int i = 0; i < count; i++)
            {
                XQt1826OutBlock block = new XQt1826OutBlock();
                block.IsValidData   = true;
                block.InvalidReason = "";
                try
                {
                    block.search_cd = query.GetFieldData(block.GetBlockName(), "search_cd", i).TrimEnd('?');                     // char 4
                    block.search_nm = query.GetFieldData(block.GetBlockName(), "search_nm", i).TrimEnd('?');                     // char 40
                } catch (InvalidDataFormatException e) {
                    block.IsValidData   = false;
                    block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\"";
                }
                list.Add(block);
            }
            return(list.ToArray());
        }
示例#2
0
 public XQt1826OutBlock[] GetBlocks()
 {
     XQt1826OutBlock[] instance = XQt1826OutBlock.ListFromQuery(this);
     return(instance);
 }