/// <summary>
        /// 获取指定工位设置
        /// </summary>
        /// <param name="workStation"></param>
        /// <returns></returns>
        public InfoStation GetStation(int workStation)
        {
            InfoStation result = new InfoStation();

            using (DataTable dt = LocalData.Read(string.Format("select * from InfoStation where WorkStation={0} order by WorkStation", workStation)))
            {
                if (dt != null && dt.Rows.Count > 0)
                {
                    result.IpAddress    = All.Class.Num.ToString(dt.Rows[0]["IpAddress"]);
                    result.WorkStation  = All.Class.Num.ToInt(dt.Rows[0]["WorkStation"]);
                    result.StartForm    = All.Class.Num.ToString(dt.Rows[0]["StartForm"]);
                    result.StationName  = All.Class.Num.ToString(dt.Rows[0]["StationName"]);
                    result.TestStation  = All.Class.Num.ToBool(dt.Rows[0]["TestStation"]);
                    result.MaterialShow = All.Class.Num.ToBool(dt.Rows[0]["MaterialShow"]);
                    result.ErrorShow    = All.Class.Num.ToBool(dt.Rows[0]["ErrorShow"]);
                    result.RepairShow   = All.Class.Num.ToBool(dt.Rows[0]["RepairShow"]);
                    result.TestOne      = All.Class.Num.ToInt(dt.Rows[0]["TestOne"]);
                    result.TestTwo      = All.Class.Num.ToInt(dt.Rows[0]["TestTwo"]);
                    result.TestThree    = All.Class.Num.ToInt(dt.Rows[0]["TestThree"]);
                    result.InLine       = All.Class.Num.ToBool(dt.Rows[0]["InLine"]);
                    result.PrintBar     = All.Class.Num.ToBool(dt.Rows[0]["PrintBar"]);
                }
            }
            return(result);
        }
        /// <summary>
        /// 获取工位设置
        /// </summary>
        /// <returns></returns>
        public List <InfoStation> GetStation()
        {
            List <InfoStation> result = new List <InfoStation>();

            InfoStation tmpStationSet;

            using (DataTable dt = LocalData.Read("select * from InfoStation order by WorkStation"))
            {
                if (dt != null && dt.Rows.Count > 0)
                {
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        tmpStationSet              = new InfoStation();
                        tmpStationSet.IpAddress    = All.Class.Num.ToString(dt.Rows[i]["IpAddress"]);
                        tmpStationSet.WorkStation  = All.Class.Num.ToInt(dt.Rows[i]["WorkStation"]);
                        tmpStationSet.StartForm    = All.Class.Num.ToString(dt.Rows[i]["StartForm"]);
                        tmpStationSet.StationName  = All.Class.Num.ToString(dt.Rows[i]["StationName"]);
                        tmpStationSet.TestStation  = All.Class.Num.ToBool(dt.Rows[i]["TestStation"]);
                        tmpStationSet.MaterialShow = All.Class.Num.ToBool(dt.Rows[i]["MaterialShow"]);
                        tmpStationSet.ErrorShow    = All.Class.Num.ToBool(dt.Rows[i]["ErrorShow"]);
                        tmpStationSet.RepairShow   = All.Class.Num.ToBool(dt.Rows[i]["RepairShow"]);
                        tmpStationSet.TestOne      = All.Class.Num.ToInt(dt.Rows[i]["TestOne"]);
                        tmpStationSet.TestTwo      = All.Class.Num.ToInt(dt.Rows[i]["TestTwo"]);
                        tmpStationSet.TestThree    = All.Class.Num.ToInt(dt.Rows[i]["TestThree"]);
                        tmpStationSet.InLine       = All.Class.Num.ToBool(dt.Rows[i]["InLine"]);
                        tmpStationSet.PrintBar     = All.Class.Num.ToBool(dt.Rows[i]["PrintBar"]);
                        result.Add(tmpStationSet);
                    }
                }
            }
            return(result);
        }