• 大小: 499KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-05-29
  • 语言: C#
  • 标签: post  传值  

资源简介

一个http post协议传参 获取并传递值

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Threading;
using System.Security.Cryptography;
using System.xml;
using System.Net;
using System.IO;
using System.IO.Compression;
using DYDJEK.Model;
using DYDJEK.SQLServerDAL;
using System.Collections;
using DYDJEK.Mdoel;

namespace DYDJEK
{
    public partial class Dyxtdj : Form
    {
        
        #region 测试用信息
        ////1.01  获取DYEK发送订单接口地址
        //private string serviceUrl1_1 = @“http://58.83.226.244/Dy_BLOC/BLOC_TMS.aspx“;
        private string serviceUrl1_1 = @“http://119.145.9.55/GZFY_BLOC/BLOC_TMS.aspx“;
        #endregion

        #region DYEK发送给CoTMS的接口参数(主动模式)
        private static string custcode = “8100“; //custcode:DYEK分配给DyPd的编码

        private static string sign_type = “CoTMSgzfyEK2500#Rcqvpzib5Co“;     //sign_type:签名方式MD5
         //e. 签名约定:对通讯的业务参数(content,下文会提到)进行校验,签名生成公式:base64(MD5(custcode+content+keyValue))

         private static string dyek_id = ““;     //dyek_id:消息通知ID(用于区分不同消息,同一运单,第一次发后退回,当分拣中心再次下发到同一合作伙伴时)
         private static string notify_type = “tms_jobno_notify“;      //notify_type:消息通知类型,固定值:tms_jobno_notify
         private static string notify_time = DateTime.Now.ToString(“yyyy-MM-dd hh:mm:ss“);
         private static string signature = ““; //签名内容
         //notify_time:消息通知时间:YYYY-MM-DD hh:mm:ss
          //content:消息内容详细见 业务参数  参数是伙伴商CoTMS收到的运单相关参数,即content的内容
        #endregion



         private string providername = “广州大洋百货“;

         public Thread ReadData; //读取订单进程

         public Thread getData; //读取数据进程

         public Thread sendData;//post数据线程

         private string postGet_order_xml = ““;//获取返回的运单xml

         private string get_Messagexml = ““;//返回的结果xml到DYEK

        #region 加载窗体
         public Dyxtdj()
        {
            InitializeComponent();
            this.Load += new EventHandler(Dyxtdj_Load);
        }

        void Dyxtdj_Load(object sender EventArgs e)
        {
            //初始化

            //关闭线程安全
           Control.CheckForIllegalCrossThreadCalls = false;

           //绑定时间间隔
           bindTime();
           //绑定反馈类型
           bindType();
           bindfkType();
        }


        //绑定类型
        private void bindType()
        {
            cmbType.Items.Clear();
            ArrayList al = new ArrayList();
            al.Add(new ClassHelper(“全部“ “A0“));
            al.Add(new ClassHelper(“获取订单“ “B0“));
            al.Add(new ClassHelper(“支付反馈“ “C0“));
            al.Add(new ClassHelper(“入分拣中心“ “124“));
            al.Add(new ClassHelper(“出分拣中心“ “126“));
            al.Add(new ClassHelper(“入配送站“ “130“));
            al.Add(new ClassHelper(“出配送站“ “140“));
            al.Add(new ClassHelper(“分配配送员“ “160“));
            al.Add(new ClassHelper(“配送成功“ “170“));
            al.Add(new C

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2012-11-30 09:42  DYDJEk\
     目录           0  2012-12-04 11:31  DYDJEk\DYDJEK\
     目录           0  2012-12-07 08:45  DYDJEk\DYDJEK\DYDJEK\
     文件        2536  2012-12-04 11:32  DYDJEk\DYDJEK\DYDJEK.sln
     文件       51200  2012-12-08 10:34  DYDJEk\DYDJEK\DYDJEK.suo
     目录           0  2012-11-30 09:44  DYDJEk\DYDJEK\DYDJEK\bin\
     目录           0  2012-12-08 09:51  DYDJEk\DYDJEK\DYDJEK\bin\Debug\
     文件        1825  2012-12-08 09:51  DYDJEk\DYDJEK\DYDJEK\bin\Debug\DYDJEK.application
     文件       74752  2012-12-08 09:51  DYDJEk\DYDJEK\DYDJEK\bin\Debug\DYDJEK.exe
     文件        3578  2012-12-08 09:51  DYDJEk\DYDJEK\DYDJEK\bin\Debug\DYDJEK.exe.manifest
     文件      144896  2012-12-08 09:51  DYDJEk\DYDJEK\DYDJEK\bin\Debug\DYDJEK.pdb
     文件       11608  2012-12-06 10:40  DYDJEk\DYDJEK\DYDJEK\bin\Debug\DYDJEK.vshost.exe
     文件         490  2010-03-17 22:39  DYDJEk\DYDJEK\DYDJEK\bin\Debug\DYDJEK.vshost.exe.manifest
     文件      196608  2012-12-03 16:57  DYDJEk\DYDJEK\DYDJEK\bin\Debug\DYEK.mdb
     目录           0  2012-12-06 09:23  DYDJEk\DYDJEK\DYDJEK\bin\Debug\Log\
     文件        1000  2012-12-06 09:23  DYDJEk\DYDJEK\DYDJEK\bin\Debug\Log\log_Act_20121206.txt
     目录           0  2012-11-30 09:44  DYDJEk\DYDJEK\DYDJEK\bin\Release\
     文件        5990  2012-12-07 08:45  DYDJEk\DYDJEK\DYDJEK\DYDJEK.csproj
     文件         493  2012-12-07 08:44  DYDJEk\DYDJEK\DYDJEK\DYDJEK.csproj.user
     文件       45941  2012-12-07 16:03  DYDJEk\DYDJEK\DYDJEK\Dyek.cs
     文件       13385  2012-12-06 09:22  DYDJEk\DYDJEK\DYDJEK\Dyek.Designer.cs
     文件        5817  2012-12-06 09:22  DYDJEk\DYDJEK\DYDJEK\Dyek.resx
     目录           0  2012-12-03 13:50  DYDJEk\DYDJEK\DYDJEK\Mdoel\
     文件       20527  2012-12-03 16:44  DYDJEk\DYDJEK\DYDJEK\Mdoel\AccessDB.cs
     文件         668  2012-11-30 09:47  DYDJEk\DYDJEK\DYDJEK\Mdoel\ClassHelper.cs
     文件        5617  2012-11-30 09:47  DYDJEk\DYDJEK\DYDJEK\Mdoel\DBHelper.cs
     文件       15414  2012-11-30 17:11  DYDJEk\DYDJEK\DYDJEK\Mdoel\DbHelperSQL.cs
     文件        1138  2012-11-30 09:47  DYDJEk\DYDJEK\DYDJEK\Mdoel\LogError.cs
     文件        3351  2012-12-04 11:49  DYDJEk\DYDJEK\DYDJEK\Mdoel\LogEvent.cs
     文件        6822  2012-11-30 09:47  DYDJEk\DYDJEK\DYDJEK\Mdoel\OrderInfo.cs
     文件        2640  2012-12-03 14:39  DYDJEk\DYDJEK\DYDJEK\Mdoel\Post_2.cs
............此处省略90个文件信息

评论

共有 条评论