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

            if (query.QueryResult != null && query.QueryResult.IsSystemError == true)
            {
                return(list.ToArray());
            }
            for (int i = 0; i < count; i++)
            {
                XQt0150OutBlock1 block = new XQt0150OutBlock1();
                block.IsValidData   = true;
                block.InvalidReason = "";
                try
                {
                    block.medosu  = query.GetFieldData(block.GetBlockName(), "medosu", i).TrimEnd('?');                  // char 10
                    block.expcode = query.GetFieldData(block.GetBlockName(), "expcode", i).TrimEnd('?');                 // char 12
                    block.qty     = query.GetFieldData(block.GetBlockName(), "qty", i).ParseLong("qty");                 // long 9
                    block.price   = query.GetFieldData(block.GetBlockName(), "price", i).ParseLong("price");             // long 9
                    block.amt     = query.GetFieldData(block.GetBlockName(), "amt", i).ParseLong("amt");                 // long 18
                    block.fee     = query.GetFieldData(block.GetBlockName(), "fee", i).ParseLong("fee");                 // long 18
                    block.tax     = query.GetFieldData(block.GetBlockName(), "tax", i).ParseLong("tax");                 // long 18
                    block.argtax  = query.GetFieldData(block.GetBlockName(), "argtax", i).ParseLong("argtax");           // long 18
                    block.adjamt  = query.GetFieldData(block.GetBlockName(), "adjamt", i).ParseLong("adjamt");           // long 18
                    block.middiv  = query.GetFieldData(block.GetBlockName(), "middiv", i).TrimEnd('?');                  // char 20
                } 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 XQt0150OutBlock1[] GetBlock1s()
 {
     XQt0150OutBlock1[] instance = XQt0150OutBlock1.ListFromQuery(this);
     return(instance);
 }