schangxiang@126.com
2024-09-02 f0826424c58f3e925a77437111a2e06808bfff26
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/Utils/SystemBussinessHelper.cs
@@ -3,8 +3,10 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using System.Text;
using System.Threading.Tasks;
using System.Web.UI.WebControls;
namespace iWare_SCADA_BusinessLogical.Utils
{
@@ -13,6 +15,40 @@
    /// </summary>
    public class SystemBussinessHelper
    {
        /// <summary>
        /// 校验读取的二维码是否正确
        /// </summary>
        /// <param name="workPieceID"></param>
        /// <returns></returns>
        public static bool ValidateIsRightWorkPieceID(string workPieceID)
        {
            if (string.IsNullOrEmpty(workPieceID))
            {
                return false;
            }
            if (workPieceID.Length == 22)
            {
                var n_workPieceID = workPieceID.Trim();
                if (n_workPieceID.Length == 22)
                {
                    if (n_workPieceID.IndexOf("ERROR") > -1)
                    {
                        return false;
                    }
                    return true;
                }
                else
                {
                    return false;
                }
            }
            else
            {
                return false;
            }
        }
        /// <summary>
        /// 设置 WorkPieceInfo 的DataCapturePointCname
        /// </summary>