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

            block.IsValidData   = true;
            block.InvalidReason = "";
            try
            {
                block.gubun         = query.GetFieldData(block.GetBlockName(), "gubun").FirstOrDefault();                   // char 1
                block.dy_gubun      = query.GetFieldData(block.GetBlockName(), "dy_gubun").FirstOrDefault();                // char 1
                block.dy_uplmtprice = query.GetFieldData(block.GetBlockName(), "dy_uplmtprice").ParseLong("dy_uplmtprice"); // long 10
                block.dy_dnlmtprice = query.GetFieldData(block.GetBlockName(), "dy_dnlmtprice").ParseLong("dy_dnlmtprice"); // long 10
                block.futcode       = query.GetFieldData(block.GetBlockName(), "futcode").TrimEnd('?');                     // char 8
            } catch (InvalidDataFormatException e) {
                block.IsValidData   = false;
                block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\"";
            }
            return(block);
        }
Exemplo n.º 2
0
        public XRJD0OutBlock GetBlock()
        {
            XRJD0OutBlock instance = XRJD0OutBlock.FromQuery(this);

            return(instance);
        }