using com.hnshituo.core.webapp.vo;
using Common;
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;

namespace MeterModuleLibrary
{
    public partial class fromLoginOut : Form
    {
        private MeterWorkMonitorService monitor = new MeterWorkMonitorService(); //设备及远程呼叫监控表
        public fromLoginOut()
        {
            InitializeComponent();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (textBox1.Text.Trim() == "88888888")
            {
                if (PbCache.sportInfo!=null && !string.IsNullOrEmpty(PbCache.sportInfo.baseSpotNo))
                {
                    RESTfulResult<string> rms = monitor.doUpdateWf(new MeterWorkMonitor
                    {
                        pointNo = PbCache.sportInfo.baseSpotNo,
                        validWgt = "1",
                        validCarno = "1",
                        validTareTime = "1",
                        validMatTime = "1",
                        validTimeInterval = "1",
                        validParkStatus = "1",
                        validExceedWgt = "1",
                        validPredictionDiff = "1",
                        validLianda = "1",
                        validMatClick = "1",
                        setCar = "",
                        rfidCar = "",
                        photoCar = "",
                        scanCar = "",
                        editCar = "",
                        carErr = "0",
                        wgtErr = "0",
                        stopOverTime = "0",
                        msgInfo = "",
                        isOverWgt = "",
                        isHelp = "0",
                        wgt = 0
                    });
                }
                
                System.Environment.Exit(0);
            }
            else 
            {
                textBox1.Text = "";
                label2.Visible = true;
            }
        }
    }
}
