Exemplo n.º 1
0
        public static XRBM_OutBlock FromQuery(XRBM_ query)
        {
            XRBM_OutBlock block = new XRBM_OutBlock();

            block.IsValidData   = true;
            block.InvalidReason = "";
            try
            {
                block.tjjcode  = query.GetFieldData(block.GetBlockName(), "tjjcode").TrimEnd('?');              // char 4
                block.tjjtime  = query.GetFieldData(block.GetBlockName(), "tjjtime").TrimEnd('?');              // char 8
                block.msvolume = query.GetFieldData(block.GetBlockName(), "msvolume").ParseLong("msvolume");    // long 8
                block.mdvolume = query.GetFieldData(block.GetBlockName(), "mdvolume").ParseLong("mdvolume");    // long 8
                block.msvol    = query.GetFieldData(block.GetBlockName(), "msvol").ParseLong("msvol");          // long 8
                block.p_msvol  = query.GetFieldData(block.GetBlockName(), "p_msvol").ParseLong("p_msvol");      // long 8
                block.msvalue  = query.GetFieldData(block.GetBlockName(), "msvalue").ParseLong("msvalue");      // long 6
                block.mdvalue  = query.GetFieldData(block.GetBlockName(), "mdvalue").ParseLong("mdvalue");      // long 6
                block.msval    = query.GetFieldData(block.GetBlockName(), "msval").ParseLong("msval");          // long 6
                block.p_msval  = query.GetFieldData(block.GetBlockName(), "p_msval").ParseLong("p_msval");      // long 6
                block.upcode   = query.GetFieldData(block.GetBlockName(), "upcode").TrimEnd('?');               // char 3
            } catch (InvalidDataFormatException e) {
                block.IsValidData   = false;
                block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\"";
            }
            return(block);
        }
Exemplo n.º 2
0
        public XRBM_OutBlock GetBlock()
        {
            XRBM_OutBlock instance = XRBM_OutBlock.FromQuery(this);

            return(instance);
        }