Beispiel #1
0
        public static XRVI_OutBlock FromQuery(XRVI_ query)
        {
            XRVI_OutBlock block = new XRVI_OutBlock();

            block.IsValidData   = true;
            block.InvalidReason = "";
            try
            {
                block.vi_gubun     = query.GetFieldData(block.GetBlockName(), "vi_gubun").FirstOrDefault();              // char 1
                block.svi_recprice = query.GetFieldData(block.GetBlockName(), "svi_recprice").ParseLong("svi_recprice"); // long 8
                block.dvi_recprice = query.GetFieldData(block.GetBlockName(), "dvi_recprice").ParseLong("dvi_recprice"); // long 8
                block.vi_trgprice  = query.GetFieldData(block.GetBlockName(), "vi_trgprice").ParseLong("vi_trgprice");   // long 8
                block.shcode       = query.GetFieldData(block.GetBlockName(), "shcode").TrimEnd('?');                    // char 6
                block.ref_shcode   = query.GetFieldData(block.GetBlockName(), "ref_shcode").TrimEnd('?');                // char 6
                block.time         = query.GetFieldData(block.GetBlockName(), "time").TrimEnd('?');                      // char 6
            } catch (InvalidDataFormatException e) {
                block.IsValidData   = false;
                block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\"";
            }
            return(block);
        }
Beispiel #2
0
        public XRVI_OutBlock GetBlock()
        {
            XRVI_OutBlock instance = XRVI_OutBlock.FromQuery(this);

            return(instance);
        }