예제 #1
0
파일: t0424.cs 프로젝트: iPeterPan/XingAPI
        public static XQt0424OutBlock FromQuery(XQt0424 query)
        {
            XQt0424OutBlock block = new XQt0424OutBlock();

            block.IsValidData   = true;
            block.InvalidReason = "";
            if (query.QueryResult != null && query.QueryResult.IsSystemError == true)
            {
                block.IsValidData   = false;
                block.InvalidReason = query.ReceiveMessage;
                return(block);
            }
            try
            {
                block.sunamt      = query.GetFieldData(block.GetBlockName(), "sunamt", 0).ParseLong("sunamt");      // long 18
                block.dtsunik     = query.GetFieldData(block.GetBlockName(), "dtsunik", 0).ParseLong("dtsunik");    // long 18
                block.mamt        = query.GetFieldData(block.GetBlockName(), "mamt", 0).ParseLong("mamt");          // long 18
                block.sunamt1     = query.GetFieldData(block.GetBlockName(), "sunamt1", 0).ParseLong("sunamt1");    // long 18
                block.cts_expcode = query.GetFieldData(block.GetBlockName(), "cts_expcode", 0).TrimEnd('?');        // char 22
                block.tappamt     = query.GetFieldData(block.GetBlockName(), "tappamt", 0).ParseLong("tappamt");    // long 18
                block.tdtsunik    = query.GetFieldData(block.GetBlockName(), "tdtsunik", 0).ParseLong("tdtsunik");  // long 18
            } catch (InvalidDataFormatException e) {
                block.IsValidData   = false;
                block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\"";
            }
            return(block);
        }
예제 #2
0
파일: t0424.cs 프로젝트: iPeterPan/XingAPI
        public XQt0424OutBlock GetBlock()
        {
            XQt0424OutBlock instance = XQt0424OutBlock.FromQuery(this);

            return(instance);
        }