FrmSetting.cs 1.3 KB
using DeviceLib.BLL;
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.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}】出库信息失败";
            }
        }
    }
}