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

            if (query.QueryResult != null && query.QueryResult.IsSystemError == true)
            {
                return(list.ToArray());
            }
            for (int i = 0; i < count; i++)
            {
                XQt1615OutBlock1 block = new XQt1615OutBlock1();
                block.IsValidData   = true;
                block.InvalidReason = "";
                try
                {
                    block.hname = query.GetFieldData(block.GetBlockName(), "hname", i).TrimEnd('?');                     // char 20
                    block.sv_08 = query.GetFieldData(block.GetBlockName(), "sv_08", i).ParseLong("sv_08");               // long 12
                    block.sv_17 = query.GetFieldData(block.GetBlockName(), "sv_17", i).ParseLong("sv_17");               // long 12
                    block.sv_18 = query.GetFieldData(block.GetBlockName(), "sv_18", i).ParseLong("sv_18");               // long 12
                    block.sv_07 = query.GetFieldData(block.GetBlockName(), "sv_07", i).ParseLong("sv_07");               // long 12
                } catch (InvalidDataFormatException e) {
                    block.IsValidData   = false;
                    block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\"";
                }
                list.Add(block);
            }
            return(list.ToArray());
        }
Ejemplo n.º 2
0
 public XQt1615OutBlock1[] GetBlock1s()
 {
     XQt1615OutBlock1[] instance = XQt1615OutBlock1.ListFromQuery(this);
     return(instance);
 }