Esempio n. 1
0
        public TraOrderCancelResponseModel RequestCancelOrder(TraOrderCancelModel model)
        {
            RequestInterfaceHelper <TraOrderSubmitModel> .SupplementInPutModel(model, "train_cancel");

            string jsonstr = "jsonStr=" + JsonHelper.SerializeObject(model);

            DateTime date = DateTime.Now;

            LogHelper.WriteLog("取消订单接口:" + date + "||||||" + jsonstr, "Request");
            string post = PostHelper.PostUrl(_postUrl, jsonstr, Encoding.UTF8);

            LogHelper.WriteLog("取消订单接口返回:" + date + "||||||" + post, "Request");

            TraOrderCancelResponseModel trainResponseModel = JsonConvert.DeserializeObject <TraOrderCancelResponseModel>(post);

            return(trainResponseModel);
        }
Esempio n. 2
0
        public TraOrderSubmitResponseModel RequestHoldSeatInterface(TraOrderSubmitModel model)
        {
            model.callbackurl = _callBackUrl;
            RequestInterfaceHelper <TraOrderSubmitModel> .SupplementInPutModel(model, "train_order");

            string jsonstr = "jsonStr=" + JsonHelper.SerializeObject(model);

            DateTime date = DateTime.Now;

            LogHelper.WriteLog("请求占位:" + date + "||||||" + jsonstr, "Request");
            string post = PostHelper.PostUrl(_postUrl, jsonstr, Encoding.UTF8);

            LogHelper.WriteLog("请求占位返回:" + date + "||||||" + post, "Request");

            TraOrderSubmitResponseModel trainResponseModel = JsonConvert.DeserializeObject <TraOrderSubmitResponseModel>(post);

            return(trainResponseModel);
        }