Esempio n. 1
0
        public static XQt9907OutBlock1[] ListFromQuery(XQt9907 query)
        {
            int count = query.GetBlockCount(XQt9907OutBlock1.BlockName);
            List <XQt9907OutBlock1> list = new List <XQt9907OutBlock1>();

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