from clr import AddReference
AddReference('System.Net.Http')
AddReference('Newtonsoft.Json')
from System.Net.Http import HttpClient, StringContent
from Newtonsoft.Json import JsonConvert
def BarItemClick(e):
if e.BarItemKey=='tbSplitSubmit':
bill_no = this.Model.GetValue('FBillNo')
data = {
'bill_no': bill_no
}
json_obj_string = JsonConvert.SerializeObject(data)
http_content = StringContent(json_obj_string)
client = HttpClient()
url = 'http://127.0.0.1:9000/PushAPPayable'
response = client.PostAsync(url, http_content).Result.Content.ReadAsStringAsync().Result.ToString()
this.View.ShowMessage(response)
您的鼓励与嘉奖将成为创作者们前进的动力,如果觉得本文还不错,可以给予作者创作打赏哦!
请选择打赏金币数 *