示例#1
0
        public M3072Response Query(M3072Request request)
        {
            string requestString = request.ToFixedLengthString(4);

            string responseString = SocketHelper.SendMessage("130.1.9.231", 30002, requestString, Encoding.GetEncoding("gb18030"));//todo ip and encoding

            M3072Response response = Parse(responseString);

            //翻页查询
            while (response.RTN_IND == "1" && response.Details.Count > 0)
            {
                request.RTN_IND  = "1";
                request.APP_SEQ  = response.Details[response.Details.Count - 1].APP_SEQ;
                request.INPUT_DT = response.Details[response.Details.Count - 1].INPUT_DT;

                requestString  = request.ToFixedLengthString(4);
                responseString = SocketHelper.SendMessage("130.1.9.231", 30002, requestString, Encoding.GetEncoding("gb18030"));

                M3072Response responsePage = Parse(responseString);
                responsePage.Details.InsertRange(0, response.Details);
                response = responsePage;
            }

            return(response);
        }
        private static void Test3072()
        {
            M3072Request request = new M3072Request();

            request.TRXTYPE = "3072";
            request.RETCODE = "";
            request.BNKNBR  = "6442";
            request.SOURCE  = "CA";
            request.BRN_NO  = "";
            request.OPE_NO  = "";
            request.SEQNO   = "";
            request.IDTYPE  = "01";
            //request.IDNO = "110101198808080036";
            //request.IDTYPE = "49";
            request.IDNO     = "123566446565955325";
            request.RTN_IND  = "";
            request.APP_SEQ  = "";
            request.INPUT_DT = "";
            request.REVS     = "";

            B3072         cup      = new B3072();
            M3072Response response = cup.Query(request);
        }