Exemple #1
0
        public static XRHA_OutBlock FromQuery(XRHA_ query)
        {
            XRHA_OutBlock block = new XRHA_OutBlock();

            block.IsValidData   = true;
            block.InvalidReason = "";
            try
            {
                block.hotime      = query.GetFieldData(block.GetBlockName(), "hotime").TrimEnd('?');                  // char 6
                block.offerho1    = query.GetFieldData(block.GetBlockName(), "offerho1").ParseLong("offerho1");       // long 7
                block.bidho1      = query.GetFieldData(block.GetBlockName(), "bidho1").ParseLong("bidho1");           // long 7
                block.offerrem1   = query.GetFieldData(block.GetBlockName(), "offerrem1").ParseLong("offerrem1");     // long 9
                block.bidrem1     = query.GetFieldData(block.GetBlockName(), "bidrem1").ParseLong("bidrem1");         // long 9
                block.offerho2    = query.GetFieldData(block.GetBlockName(), "offerho2").ParseLong("offerho2");       // long 7
                block.bidho2      = query.GetFieldData(block.GetBlockName(), "bidho2").ParseLong("bidho2");           // long 7
                block.offerrem2   = query.GetFieldData(block.GetBlockName(), "offerrem2").ParseLong("offerrem2");     // long 9
                block.bidrem2     = query.GetFieldData(block.GetBlockName(), "bidrem2").ParseLong("bidrem2");         // long 9
                block.offerho3    = query.GetFieldData(block.GetBlockName(), "offerho3").ParseLong("offerho3");       // long 7
                block.bidho3      = query.GetFieldData(block.GetBlockName(), "bidho3").ParseLong("bidho3");           // long 7
                block.offerrem3   = query.GetFieldData(block.GetBlockName(), "offerrem3").ParseLong("offerrem3");     // long 9
                block.bidrem3     = query.GetFieldData(block.GetBlockName(), "bidrem3").ParseLong("bidrem3");         // long 9
                block.offerho4    = query.GetFieldData(block.GetBlockName(), "offerho4").ParseLong("offerho4");       // long 7
                block.bidho4      = query.GetFieldData(block.GetBlockName(), "bidho4").ParseLong("bidho4");           // long 7
                block.offerrem4   = query.GetFieldData(block.GetBlockName(), "offerrem4").ParseLong("offerrem4");     // long 9
                block.bidrem4     = query.GetFieldData(block.GetBlockName(), "bidrem4").ParseLong("bidrem4");         // long 9
                block.offerho5    = query.GetFieldData(block.GetBlockName(), "offerho5").ParseLong("offerho5");       // long 7
                block.bidho5      = query.GetFieldData(block.GetBlockName(), "bidho5").ParseLong("bidho5");           // long 7
                block.offerrem5   = query.GetFieldData(block.GetBlockName(), "offerrem5").ParseLong("offerrem5");     // long 9
                block.bidrem5     = query.GetFieldData(block.GetBlockName(), "bidrem5").ParseLong("bidrem5");         // long 9
                block.offerho6    = query.GetFieldData(block.GetBlockName(), "offerho6").ParseLong("offerho6");       // long 7
                block.bidho6      = query.GetFieldData(block.GetBlockName(), "bidho6").ParseLong("bidho6");           // long 7
                block.offerrem6   = query.GetFieldData(block.GetBlockName(), "offerrem6").ParseLong("offerrem6");     // long 9
                block.bidrem6     = query.GetFieldData(block.GetBlockName(), "bidrem6").ParseLong("bidrem6");         // long 9
                block.offerho7    = query.GetFieldData(block.GetBlockName(), "offerho7").ParseLong("offerho7");       // long 7
                block.bidho7      = query.GetFieldData(block.GetBlockName(), "bidho7").ParseLong("bidho7");           // long 7
                block.offerrem7   = query.GetFieldData(block.GetBlockName(), "offerrem7").ParseLong("offerrem7");     // long 9
                block.bidrem7     = query.GetFieldData(block.GetBlockName(), "bidrem7").ParseLong("bidrem7");         // long 9
                block.offerho8    = query.GetFieldData(block.GetBlockName(), "offerho8").ParseLong("offerho8");       // long 7
                block.bidho8      = query.GetFieldData(block.GetBlockName(), "bidho8").ParseLong("bidho8");           // long 7
                block.offerrem8   = query.GetFieldData(block.GetBlockName(), "offerrem8").ParseLong("offerrem8");     // long 9
                block.bidrem8     = query.GetFieldData(block.GetBlockName(), "bidrem8").ParseLong("bidrem8");         // long 9
                block.offerho9    = query.GetFieldData(block.GetBlockName(), "offerho9").ParseLong("offerho9");       // long 7
                block.bidho9      = query.GetFieldData(block.GetBlockName(), "bidho9").ParseLong("bidho9");           // long 7
                block.offerrem9   = query.GetFieldData(block.GetBlockName(), "offerrem9").ParseLong("offerrem9");     // long 9
                block.bidrem9     = query.GetFieldData(block.GetBlockName(), "bidrem9").ParseLong("bidrem9");         // long 9
                block.offerho10   = query.GetFieldData(block.GetBlockName(), "offerho10").ParseLong("offerho10");     // long 7
                block.bidho10     = query.GetFieldData(block.GetBlockName(), "bidho10").ParseLong("bidho10");         // long 7
                block.offerrem10  = query.GetFieldData(block.GetBlockName(), "offerrem10").ParseLong("offerrem10");   // long 9
                block.bidrem10    = query.GetFieldData(block.GetBlockName(), "bidrem10").ParseLong("bidrem10");       // long 9
                block.totofferrem = query.GetFieldData(block.GetBlockName(), "totofferrem").ParseLong("totofferrem"); // long 9
                block.totbidrem   = query.GetFieldData(block.GetBlockName(), "totbidrem").ParseLong("totbidrem");     // long 9
                block.donsigubun  = query.GetFieldData(block.GetBlockName(), "donsigubun").FirstOrDefault();          // char 1
                block.shcode      = query.GetFieldData(block.GetBlockName(), "shcode").TrimEnd('?');                  // char 6
                block.alloc_gubun = query.GetFieldData(block.GetBlockName(), "alloc_gubun").FirstOrDefault();         // char 1
            } catch (InvalidDataFormatException e) {
                block.IsValidData   = false;
                block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\"";
            }
            return(block);
        }
Exemple #2
0
        public XRHA_OutBlock GetBlock()
        {
            XRHA_OutBlock instance = XRHA_OutBlock.FromQuery(this);

            return(instance);
        }