FrmSetting.cs
1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
using DeviceLib.BLL;
using DeviceLib.Model.AGV;
using Dolen.Forms;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using UIControl.Forms;
namespace AGVDispatch
{
public partial class FrmSetting : FrmBase
{
public FrmSetting()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(txtRfid.Text)) return;
bool rtn = HttpManager.BoxToAgv(txtRfid.Text.ToUpper(), "Manual");
if (rtn)
{
rtn = HttpManager.ClearBoxBind(txtRfid.Text.ToUpper(), "Manual");
string msg = $"清除料箱【{txtRfid.Text}】" + (rtn ? "成功" : "失败");
MessageBox.Show(msg, "结果");
}
}
private void button2_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(txtRfid.Text)) return;
bool rtn = HttpManager.GetBoxTarget(txtRfid.Text.ToUpper(), out BoxTaskInfo boxTaskInfo);
if (rtn)
{
label2.Text = $"料箱【{txtRfid.Text}】出库信息:" + "\r\n" + boxTaskInfo?.ToStr() ?? "";
}
else
{
label2.Text = $"查询料箱【{txtRfid.Text}】出库信息失败";
}
}
}
}