• 大小: 0.68M
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2024-06-15
  • 语言: C#
  • 标签: MES  信息  ES  系统  上传  

资源简介

MES系统信息上传

资源截图

代码片段和文件信息

using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Data;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Text.Regularexpressions;
using System.Windows.Forms;

namespace WebAPIClientDemo
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void label1_Click(object sender EventArgs e)
        {

        }

        private void label2_Click(object sender EventArgs e)
        {

        }

        private void label5_Click(object sender EventArgs e)
        {

        }

        private void label6_Click(object sender EventArgs e)
        {

        }

        private void button1_Click(object sender EventArgs e)
        {
            if(textBox_UserCode.Text==““)
            {
                MessageBox.Show(“请输入用户代码“);
                textBox_UserCode.Focus();
                return;
            }
            if (textBox_UserKey.Text == ““)
            {
                MessageBox.Show(“请输入用户密钥“);
                textBox_UserKey.Focus();
                return;
            }
            if (textBox_URL.Text == ““)
            {
                MessageBox.Show(“请输入请求URL“);
                textBox_URL.Focus();
                return;
            }
            //if (IsUrl(textBox_URL.Text)==false)
            //{
            //    MessageBox.Show(“您输入的请求URL不是一个有效的URL字符串“);
            //    textBox_URL.Focus();
            //    return;
            //}
            if (textBox_RequestData.Text == ““)
            {
                MessageBox.Show(“请输入请求Json报文“);
                textBox_RequestData.Focus();
                return;
            }
            if (JsonSplit.IsJson(textBox_RequestData.Text)==false)
            {
                MessageBox.Show(“您输入的请求Json报文不是一个有效的Json报文“);
                textBox_RequestData.Focus();
                return;
            }

            //发送请求报文
            string ResponseResult = sendPost(textBox_URL.Text textBox_UserCode.Text textBox_UserKey.TexttextBox_RequestData.Text 5000);
            textBox_ResponseData.Text = ResponseResult;
            DataTable ResponseDataTable = new DataTable();
            MessageBox.Show(ResponseResult);

            try
            {
                Jobject jobject = (Jobject)JsonConvert.Deserializeobject(ResponseResult);
                textBox_Success.Text = jobject[“success“].ToString();
                textBox_Message.Text = jobject[“message“].ToString();
                if (JsonSplit.IsJson(jobject[“ReturnData“].ToString()) == true)
                {
                    JArray jar = JArray.Parse(jobject[“ReturnData“].ToString());
                    ResponseDataTable = JsonConvert.Deserializeobject(jar.ToString());

                    string b = ResponseDataTable.Columns[“POName“].ToString();
        

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      85367  2019-05-13 16:52  WebAPIClient\.vs\config\applicationhost.config

     文件      58514  2022-05-25 09:08  WebAPIClient\.vs\WebAPIClientDemo\FileContentIndex\572f8307-572d-4479-952b-4edd61844ada.vsidx

     文件      58539  2022-05-25 09:08  WebAPIClient\.vs\WebAPIClientDemo\FileContentIndex\8ddff453-683c-4d63-9e26-55d3dfddb4f1.vsidx

     文件       1516  2022-05-25 08:43  WebAPIClient\.vs\WebAPIClientDemo\FileContentIndex\d165433f-7a85-4fd0-b307-36f29f947443.vsidx

     文件          0  2022-05-24 17:42  WebAPIClient\.vs\WebAPIClientDemo\FileContentIndex\read.lock

    ..A..H.     68096  2022-01-02 10:53  WebAPIClient\.vs\WebAPIClientDemo\v15\.suo

     文件          0  2019-05-16 09:15  WebAPIClient\.vs\WebAPIClientDemo\v15\Server\sqlite3\db.lock

     文件    1282048  2021-03-16 13:56  WebAPIClient\.vs\WebAPIClientDemo\v15\Server\sqlite3\storage.ide

     文件      32768  2022-01-02 10:21  WebAPIClient\.vs\WebAPIClientDemo\v15\Server\sqlite3\storage.ide-shm

     文件     535632  2021-11-22 11:00  WebAPIClient\.vs\WebAPIClientDemo\v15\Server\sqlite3\storage.ide-wal

    ..A..H.     71680  2022-05-25 10:19  WebAPIClient\.vs\WebAPIClientDemo\v17\.suo

     文件       9477  2021-01-04 07:56  WebAPIClient\packages\EasyModbusTCP.5.6.0\.signature.p7s

     文件      37233  2022-05-25 08:43  WebAPIClient\packages\EasyModbusTCP.5.6.0\EasyModbusTCP.5.6.0.nupkg

     文件      72704  2020-12-31 21:44  WebAPIClient\packages\EasyModbusTCP.5.6.0\lib\net40\EasyModbus.dll

     文件      21662  2020-12-31 21:44  WebAPIClient\packages\EasyModbusTCP.5.6.0\lib\net40\EasyModbus.xml

     文件        184  2019-08-14 15:56  WebAPIClient\WebAPIClientDemo\App.config

     文件      72704  2020-12-31 21:44  WebAPIClient\WebAPIClientDemo\bin\Debug\EasyModbus.dll

     文件      21662  2020-12-31 21:44  WebAPIClient\WebAPIClientDemo\bin\Debug\EasyModbus.xml

     文件     504320  2016-01-28 14:22  WebAPIClient\WebAPIClientDemo\bin\Debug\Newtonsoft.Json.dll

     文件     180832  2012-07-10 12:07  WebAPIClient\WebAPIClientDemo\bin\Debug\System.Net.Http.dll

     文件     201824  2012-06-23 01:00  WebAPIClient\WebAPIClientDemo\bin\Debug\System.Net.Http.xml

     文件      20480  2022-05-25 10:18  WebAPIClient\WebAPIClientDemo\bin\Debug\WebAPIClientDemo.exe

     文件        184  2019-08-14 15:56  WebAPIClient\WebAPIClientDemo\bin\Debug\WebAPIClientDemo.exe.config

     文件      38400  2022-05-25 10:18  WebAPIClient\WebAPIClientDemo\bin\Debug\WebAPIClientDemo.pdb

     文件      22472  2022-05-24 16:53  WebAPIClient\WebAPIClientDemo\bin\Debug\WebAPIClientDemo.vshost.exe

     文件        184  2019-08-14 15:56  WebAPIClient\WebAPIClientDemo\bin\Debug\WebAPIClientDemo.vshost.exe.config

     文件        490  2019-12-07 17:10  WebAPIClient\WebAPIClientDemo\bin\Debug\WebAPIClientDemo.vshost.exe.manifest

     文件       7680  2018-08-02 11:06  WebAPIClient\WebAPIClientDemo\bin\Debug\Wen.Helpers.dll

     文件      17504  2012-07-10 23:31  WebAPIClient\WebAPIClientDemo\bin\Debug\zh-Hans\System.Net.Http.resources.dll

     文件      25204  2022-05-25 09:07  WebAPIClient\WebAPIClientDemo\Form1.cs

............此处省略57个文件信息

评论

共有 条评论