Exemplo n.º 1
0
        public static XQt1866OutBlock1[] ListFromQuery(XQt1866 query)
        {
            int count = query.GetBlockCount(XQt1866OutBlock1.BlockName);
            List <XQt1866OutBlock1> list = new List <XQt1866OutBlock1>();

            if (query.QueryResult != null && query.QueryResult.IsSystemError == true)
            {
                return(list.ToArray());
            }
            for (int i = 0; i < count; i++)
            {
                XQt1866OutBlock1 block = new XQt1866OutBlock1();
                block.IsValidData   = true;
                block.InvalidReason = "";
                try
                {
                    block.query_index = query.GetFieldData(block.GetBlockName(), "query_index", i).TrimEnd('?');                   // char 12
                    block.group_name  = query.GetFieldData(block.GetBlockName(), "group_name", i).TrimEnd('?');                    // char 40
                    block.query_name  = query.GetFieldData(block.GetBlockName(), "query_name", i).TrimEnd('?');                    // char 40
                } catch (InvalidDataFormatException e) {
                    block.IsValidData   = false;
                    block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\"";
                }
                list.Add(block);
            }
            return(list.ToArray());
        }
Exemplo n.º 2
0
 public XQt1866OutBlock1[] GetBlock1s()
 {
     XQt1866OutBlock1[] instance = XQt1866OutBlock1.ListFromQuery(this);
     return(instance);
 }