Esempio n. 1
0
        public int Request(XingSession sess, string acc_no, string acc_pw)
        {
            int ec = 0;

            t0424._t0424InBlock in_block = new t0424._t0424InBlock();
            in_block.accno = Encoding.ASCII.GetBytes(acc_no.PadRight(11 + 1, ' '));
            in_block.passwd = Encoding.ASCII.GetBytes(acc_pw.PadRight(8 + 1, ' '));
            in_block.prcgb = Encoding.ASCII.GetBytes("1".PadRight(2, ' '));
            in_block.chegb = Encoding.ASCII.GetBytes("2".PadRight(2, ' '));
            in_block.dangb = Encoding.ASCII.GetBytes("0".PadRight(2, ' '));
            in_block.charge = Encoding.ASCII.GetBytes("1".PadRight(2, ' '));
            in_block.cts_expcode = Encoding.ASCII.GetBytes(" ".PadRight(22 + 1, ' '));

            XingQuery query = new XingQuery();
            query.TRCode = "t0424";
            query.InBlock = in_block;
            query.ReceivedCB = new XingQuery.ReceivedFunc(this.ReceivedFunc);
            query.ErrorCB = new XingQuery.ErrorFunc(this.ErrorFunc);
            query.MessageCB = new XingQuery.MessageFunc(this.MessageFunc);

            ec = sess.Execute<t0424._t0424InBlock>(query, false);
            if (ec < 0)
            {
                LogMsg("[t0424::Request] Execute fail. : ec(" + ec + ")");
                return -1;
            }

            return 0;
        }
Esempio n. 2
0
        public int Request(XingSession sess, string acc_no, string acc_pw)
        {
            int ec = 0;


            t0424._t0424InBlock in_block = new t0424._t0424InBlock();
            in_block.accno       = Encoding.ASCII.GetBytes(acc_no.PadRight(11 + 1, ' '));
            in_block.passwd      = Encoding.ASCII.GetBytes(acc_pw.PadRight(8 + 1, ' '));
            in_block.prcgb       = Encoding.ASCII.GetBytes("1".PadRight(2, ' '));
            in_block.chegb       = Encoding.ASCII.GetBytes("2".PadRight(2, ' '));
            in_block.dangb       = Encoding.ASCII.GetBytes("0".PadRight(2, ' '));
            in_block.charge      = Encoding.ASCII.GetBytes("1".PadRight(2, ' '));
            in_block.cts_expcode = Encoding.ASCII.GetBytes(" ".PadRight(22 + 1, ' '));

            XingQuery query = new XingQuery();

            query.TRCode     = "t0424";
            query.InBlock    = in_block;
            query.ReceivedCB = new XingQuery.ReceivedFunc(this.ReceivedFunc);
            query.ErrorCB    = new XingQuery.ErrorFunc(this.ErrorFunc);
            query.MessageCB  = new XingQuery.MessageFunc(this.MessageFunc);

            ec = sess.Execute <t0424._t0424InBlock>(query, false);
            if (ec < 0)
            {
                LogMsg("[t0424::Request] Execute fail. : ec(" + ec + ")");
                return(-1);
            }

            return(0);
        }