コード例 #1
0
        public static XRH01OutBlock FromQuery(XRH01 query)
        {
            XRH01OutBlock block = new XRH01OutBlock();

            block.IsValidData   = true;
            block.InvalidReason = "";
            try
            {
                block.lineseq     = query.GetFieldData(block.GetBlockName(), "lineseq").ParseLong("lineseq"); // long 10
                block.accno       = query.GetFieldData(block.GetBlockName(), "accno").TrimEnd('?');           // char 11
                block.user        = query.GetFieldData(block.GetBlockName(), "user").TrimEnd('?');            // char 8
                block.seq         = query.GetFieldData(block.GetBlockName(), "seq").ParseLong("seq");         // long 11
                block.trcode      = query.GetFieldData(block.GetBlockName(), "trcode").TrimEnd('?');          // char 11
                block.megrpno     = query.GetFieldData(block.GetBlockName(), "megrpno").TrimEnd('?');         // char 2
                block.boardid     = query.GetFieldData(block.GetBlockName(), "boardid").TrimEnd('?');         // char 2
                block.memberno    = query.GetFieldData(block.GetBlockName(), "memberno").TrimEnd('?');        // char 5
                block.bpno        = query.GetFieldData(block.GetBlockName(), "bpno").TrimEnd('?');            // char 5
                block.ordno       = query.GetFieldData(block.GetBlockName(), "ordno").TrimEnd('?');           // char 10
                block.orgordno    = query.GetFieldData(block.GetBlockName(), "orgordno").TrimEnd('?');        // char 10
                block.expcode     = query.GetFieldData(block.GetBlockName(), "expcode").TrimEnd('?');         // char 12
                block.dosugb      = query.GetFieldData(block.GetBlockName(), "dosugb").FirstOrDefault();      // char 1
                block.mocagb      = query.GetFieldData(block.GetBlockName(), "mocagb").FirstOrDefault();      // char 1
                block.accno1      = query.GetFieldData(block.GetBlockName(), "accno1").TrimEnd('?');          // char 12
                block.qty2        = query.GetFieldData(block.GetBlockName(), "qty2").ParseLong("qty2");       // long 10
                block.price       = query.GetFieldData(block.GetBlockName(), "price").ParseFloat("price");    // float 11.2
                block.ordgb       = query.GetFieldData(block.GetBlockName(), "ordgb").FirstOrDefault();       // char 1
                block.hogagb      = query.GetFieldData(block.GetBlockName(), "hogagb").FirstOrDefault();      // char 1
                block.sihogagb    = query.GetFieldData(block.GetBlockName(), "sihogagb").TrimEnd('?');        // char 11
                block.tradid      = query.GetFieldData(block.GetBlockName(), "tradid").TrimEnd('?');          // char 5
                block.treacode    = query.GetFieldData(block.GetBlockName(), "treacode").FirstOrDefault();    // char 1
                block.askcode     = query.GetFieldData(block.GetBlockName(), "askcode").TrimEnd('?');         // char 2
                block.creditcode  = query.GetFieldData(block.GetBlockName(), "creditcode").TrimEnd('?');      // char 2
                block.jakigb      = query.GetFieldData(block.GetBlockName(), "jakigb").TrimEnd('?');          // char 2
                block.trustnum    = query.GetFieldData(block.GetBlockName(), "trustnum").TrimEnd('?');        // char 5
                block.ptgb        = query.GetFieldData(block.GetBlockName(), "ptgb").TrimEnd('?');            // char 2
                block.substonum   = query.GetFieldData(block.GetBlockName(), "substonum").TrimEnd('?');       // char 12
                block.accgb       = query.GetFieldData(block.GetBlockName(), "accgb").TrimEnd('?');           // char 2
                block.accmarggb   = query.GetFieldData(block.GetBlockName(), "accmarggb").TrimEnd('?');       // char 2
                block.nationcode  = query.GetFieldData(block.GetBlockName(), "nationcode").TrimEnd('?');      // char 3
                block.investgb    = query.GetFieldData(block.GetBlockName(), "investgb").TrimEnd('?');        // char 4
                block.forecode    = query.GetFieldData(block.GetBlockName(), "forecode").TrimEnd('?');        // char 2
                block.medcode     = query.GetFieldData(block.GetBlockName(), "medcode").FirstOrDefault();     // char 1
                block.ordid       = query.GetFieldData(block.GetBlockName(), "ordid").TrimEnd('?');           // char 12
                block.macid       = query.GetFieldData(block.GetBlockName(), "macid").TrimEnd('?');           // char 12
                block.orddate     = query.GetFieldData(block.GetBlockName(), "orddate").TrimEnd('?');         // char 8
                block.rcvtime     = query.GetFieldData(block.GetBlockName(), "rcvtime").TrimEnd('?');         // char 9
                block.mem_filler  = query.GetFieldData(block.GetBlockName(), "mem_filler").TrimEnd('?');      // char 7
                block.mem_accno   = query.GetFieldData(block.GetBlockName(), "mem_accno").TrimEnd('?');       // char 11
                block.mem_filler1 = query.GetFieldData(block.GetBlockName(), "mem_filler1").TrimEnd('?');     // char 42
                block.ordacpttm   = query.GetFieldData(block.GetBlockName(), "ordacpttm").TrimEnd('?');       // char 9
                block.qty         = query.GetFieldData(block.GetBlockName(), "qty").ParseLong("qty");         // long 10
                block.autogb      = query.GetFieldData(block.GetBlockName(), "autogb").FirstOrDefault();      // char 1
                block.rejcode     = query.GetFieldData(block.GetBlockName(), "rejcode").TrimEnd('?');         // char 4
                block.prgordde    = query.GetFieldData(block.GetBlockName(), "prgordde").FirstOrDefault();    // char 1
            } catch (InvalidDataFormatException e) {
                block.IsValidData   = false;
                block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\"";
            }
            return(block);
        }
コード例 #2
0
        public XRH01OutBlock GetBlock()
        {
            XRH01OutBlock instance = XRH01OutBlock.FromQuery(this);

            return(instance);
        }