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

            if (query.QueryResult != null && query.QueryResult.IsSystemError == true)
            {
                return(list.ToArray());
            }
            for (int i = 0; i < count; i++)
            {
                XQt1621OutBlock1 block = new XQt1621OutBlock1();
                block.IsValidData   = true;
                block.InvalidReason = "";
                try
                {
                    block.date      = query.GetFieldData(block.GetBlockName(), "date", i).TrimEnd('?');                // char 8
                    block.time      = query.GetFieldData(block.GetBlockName(), "time", i).TrimEnd('?');                // char 6
                    block.datetime  = query.GetFieldData(block.GetBlockName(), "datetime", i).TrimEnd('?');            // char 14
                    block.indmsvol  = query.GetFieldData(block.GetBlockName(), "indmsvol", i).ParseLong("indmsvol");   // long 8
                    block.indmsamt  = query.GetFieldData(block.GetBlockName(), "indmsamt", i).ParseDouble("indmsamt"); // double 12.0
                    block.formsvol  = query.GetFieldData(block.GetBlockName(), "formsvol", i).ParseLong("formsvol");   // long 8
                    block.formsamt  = query.GetFieldData(block.GetBlockName(), "formsamt", i).ParseDouble("formsamt"); // double 12.0
                    block.sysmsvol  = query.GetFieldData(block.GetBlockName(), "sysmsvol", i).ParseLong("sysmsvol");   // long 8
                    block.sysmsamt  = query.GetFieldData(block.GetBlockName(), "sysmsamt", i).ParseDouble("sysmsamt"); // double 12.0
                    block.stomsvol  = query.GetFieldData(block.GetBlockName(), "stomsvol", i).ParseLong("stomsvol");   // long 8
                    block.stomsamt  = query.GetFieldData(block.GetBlockName(), "stomsamt", i).ParseDouble("stomsamt"); // double 12.0
                    block.invmsvol  = query.GetFieldData(block.GetBlockName(), "invmsvol", i).ParseLong("invmsvol");   // long 8
                    block.invmsamt  = query.GetFieldData(block.GetBlockName(), "invmsamt", i).ParseDouble("invmsamt"); // double 12.0
                    block.banmsvol  = query.GetFieldData(block.GetBlockName(), "banmsvol", i).ParseLong("banmsvol");   // long 8
                    block.banmsamt  = query.GetFieldData(block.GetBlockName(), "banmsamt", i).ParseDouble("banmsamt"); // double 12.0
                    block.insmsvol  = query.GetFieldData(block.GetBlockName(), "insmsvol", i).ParseLong("insmsvol");   // long 8
                    block.insmsamt  = query.GetFieldData(block.GetBlockName(), "insmsamt", i).ParseDouble("insmsamt"); // double 12.0
                    block.finmsvol  = query.GetFieldData(block.GetBlockName(), "finmsvol", i).ParseLong("finmsvol");   // long 8
                    block.finmsamt  = query.GetFieldData(block.GetBlockName(), "finmsamt", i).ParseDouble("finmsamt"); // double 12.0
                    block.monmsvol  = query.GetFieldData(block.GetBlockName(), "monmsvol", i).ParseLong("monmsvol");   // long 8
                    block.monmsamt  = query.GetFieldData(block.GetBlockName(), "monmsamt", i).ParseDouble("monmsamt"); // double 12.0
                    block.etcmsvol  = query.GetFieldData(block.GetBlockName(), "etcmsvol", i).ParseLong("etcmsvol");   // long 8
                    block.etcmsamt  = query.GetFieldData(block.GetBlockName(), "etcmsamt", i).ParseDouble("etcmsamt"); // double 12.0
                    block.natmsvol  = query.GetFieldData(block.GetBlockName(), "natmsvol", i).ParseLong("natmsvol");   // long 8
                    block.natmsamt  = query.GetFieldData(block.GetBlockName(), "natmsamt", i).ParseDouble("natmsamt"); // double 12.0
                    block.pefmsvol  = query.GetFieldData(block.GetBlockName(), "pefmsvol", i).ParseLong("pefmsvol");   // long 8
                    block.pefmsamt  = query.GetFieldData(block.GetBlockName(), "pefmsamt", i).ParseDouble("pefmsamt"); // double 12.0
                    block.upclose   = query.GetFieldData(block.GetBlockName(), "upclose", i).ParseFloat("upclose");    // float 6.2
                    block.upcvolume = query.GetFieldData(block.GetBlockName(), "upcvolume", i).ParseLong("upcvolume"); // long 8
                    block.upvolume  = query.GetFieldData(block.GetBlockName(), "upvolume", i).ParseDouble("upvolume"); // double 12.0
                    block.upvalue   = query.GetFieldData(block.GetBlockName(), "upvalue", i).ParseDouble("upvalue");   // double 12.0
                } 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 XQt1621OutBlock1[] GetBlock1s()
 {
     XQt1621OutBlock1[] instance = XQt1621OutBlock1.ListFromQuery(this);
     return(instance);
 }