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

            if (query.QueryResult != null && query.QueryResult.IsSystemError == true)
            {
                return(list.ToArray());
            }
            for (int i = 0; i < count; i++)
            {
                XQt0424OutBlock1 block = new XQt0424OutBlock1();
                block.IsValidData   = true;
                block.InvalidReason = "";
                try
                {
                    block.expcode    = query.GetFieldData(block.GetBlockName(), "expcode", i).TrimEnd('?');               // char 12
                    block.jangb      = query.GetFieldData(block.GetBlockName(), "jangb", i).TrimEnd('?');                 // char 10
                    block.janqty     = query.GetFieldData(block.GetBlockName(), "janqty", i).ParseLong("janqty");         // long 18
                    block.mdposqt    = query.GetFieldData(block.GetBlockName(), "mdposqt", i).ParseLong("mdposqt");       // long 18
                    block.pamt       = query.GetFieldData(block.GetBlockName(), "pamt", i).ParseLong("pamt");             // long 18
                    block.mamt       = query.GetFieldData(block.GetBlockName(), "mamt", i).ParseLong("mamt");             // long 18
                    block.sinamt     = query.GetFieldData(block.GetBlockName(), "sinamt", i).ParseLong("sinamt");         // long 18
                    block.lastdt     = query.GetFieldData(block.GetBlockName(), "lastdt", i).TrimEnd('?');                // char 8
                    block.msat       = query.GetFieldData(block.GetBlockName(), "msat", i).ParseLong("msat");             // long 18
                    block.mpms       = query.GetFieldData(block.GetBlockName(), "mpms", i).ParseLong("mpms");             // long 18
                    block.mdat       = query.GetFieldData(block.GetBlockName(), "mdat", i).ParseLong("mdat");             // long 18
                    block.mpmd       = query.GetFieldData(block.GetBlockName(), "mpmd", i).ParseLong("mpmd");             // long 18
                    block.jsat       = query.GetFieldData(block.GetBlockName(), "jsat", i).ParseLong("jsat");             // long 18
                    block.jpms       = query.GetFieldData(block.GetBlockName(), "jpms", i).ParseLong("jpms");             // long 18
                    block.jdat       = query.GetFieldData(block.GetBlockName(), "jdat", i).ParseLong("jdat");             // long 18
                    block.jpmd       = query.GetFieldData(block.GetBlockName(), "jpmd", i).ParseLong("jpmd");             // long 18
                    block.sysprocseq = query.GetFieldData(block.GetBlockName(), "sysprocseq", i).ParseLong("sysprocseq"); // long 10
                    block.loandt     = query.GetFieldData(block.GetBlockName(), "loandt", i).TrimEnd('?');                // char 8
                    block.hname      = query.GetFieldData(block.GetBlockName(), "hname", i).TrimEnd('?');                 // char 20
                    block.marketgb   = query.GetFieldData(block.GetBlockName(), "marketgb", i).FirstOrDefault();          // char 1
                    block.jonggb     = query.GetFieldData(block.GetBlockName(), "jonggb", i).FirstOrDefault();            // char 1
                    block.janrt      = query.GetFieldData(block.GetBlockName(), "janrt", i).ParseFloat("janrt");          // float 10.2
                    block.price      = query.GetFieldData(block.GetBlockName(), "price", i).ParseLong("price");           // long 8
                    block.appamt     = query.GetFieldData(block.GetBlockName(), "appamt", i).ParseLong("appamt");         // long 18
                    block.dtsunik    = query.GetFieldData(block.GetBlockName(), "dtsunik", i).ParseLong("dtsunik");       // long 18
                    block.sunikrt    = query.GetFieldData(block.GetBlockName(), "sunikrt", i).ParseFloat("sunikrt");      // float 10.2
                    block.fee        = query.GetFieldData(block.GetBlockName(), "fee", i).ParseLong("fee");               // long 10
                    block.tax        = query.GetFieldData(block.GetBlockName(), "tax", i).ParseLong("tax");               // long 10
                    block.sininter   = query.GetFieldData(block.GetBlockName(), "sininter", i).ParseLong("sininter");     // long 10
                } 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 XQt0424OutBlock1[] GetBlock1s()
 {
     XQt0424OutBlock1[] instance = XQt0424OutBlock1.ListFromQuery(this);
     return(instance);
 }