Please enable JavaScript.
Coggle requires JavaScript to display documents.
A_Excel_Month_PXmark button1_Click, 新增 Web API, A_XLS_Day_PXmark, HTTP…
-
-
A_XLS_Day_PXmark
ReadXls(textBox1.Text, 1);//讀取test.xlsx的第一個sheet表
readfilename();
dataSave(folderPathCVS);
CreateExcelFile(folderPath);
HTTP_POST_whit_list
Timer1
secsendPostIn()
source = "asid=" + ASID_textBox6.Text + "&code=" + car_code_textBox10.Text + "&key=" + Key_textBox10.Text + "&plate=" + textBox2.Text;
postclean();
hash = GetHash( );
postData = "{'asid': '" + ASID_textBox6.Text + "', 'code': '" + car_code_textBox10.Text + "', 'plate': '" + textBox2.Text + "', 'sign':'" + SHA256_key + "'}";
url = "http://" + WWW_textBox3.Text + "/osapi/queryinlog";
postsend();
postsend();
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Method = "POST";
request.ContentType = "application/json";
request.ContentLength = data.Length;
using (var stream = request.GetRequestStream())
{ stream.Write(data, 0, data.Length); stream.Close(); }
var response = (HttpWebResponse)request.GetResponse();
using (var sr = new StreamReader(response.GetResponseStream()))
{ text1 = sr.ReadToEnd(); }
JsonConvertStr( text1 );
-
JsonConvertStr
var jsonObj = (JsonObject)JsonConvert.AnalysisJson(str);
foreach (var item in jsonObj)
{
string temp = $"Value:{item.Value}";
if (item.Key.Equals("plateNo")) { JsonsetplateNoStr(item.Value.ToString());continue; }
if (item.Key.Equals("cardTypeName")) { JsonsetcardTypeNameStr(item.Value.ToString()); continue; }
int ret = checkJson(temp);
}
JsonsetplateNoStr
string newstr = ConvertStrNon(str);
if (newstr.Equals(plateNo)) { count++; if (count > 100) count = 101; }
else { label12.Text = str; count = 0;if (plateNo.Equals("FirstTime")) count = 1; }
plateNo = ConvertStrNon(str);
JsonsetcardTypeNameStr
string newstr = ConvertStrNon(str);
if (count == 0)
{
if (newstr.Equals("免費車")) { park_out(); label12.Text += "=免費車";}
else label12.Text += str;
}
checkJson
if (str[6] == '{')
{JsonConvertStr(str.Substring(6)); return 0;
}
if (str[6] == '[')
{ JsonConvertStr(str.Substring(7)); return 0;
}
return 1;