using DataLinkMesWork;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


namespace MesServerFunctions
{

    /// <summary>
    /// 命令
    ///显示托盘信息√            case "ShowMoby":
    ///显示操作指南√            case "ProcessList":
    ///显示物料√                case "MaterialList":
    ///显示操作图片√            case "PicShow":
    ///显示拧紧位置√            case "ShaftPosition":
    ///实时显示质量数据√        case "ShowTimelyQuality":
    ///手动拧紧实时显示质量数据√case "ShowTimelyQuality_Tight":
    ///√                        case "OrderFormList":
    ///弹窗消息√                case "Notice":
    ///LED消息提醒√             case "ScrollNotice":
    ///物料检测初始化√          case "MaterialCheckPosition":
    ///返修质量数据显示√        case "RepairQuality"
    ///
    /// </summary>
    public class MesServerCode
    {

        /// <summary>
        /// MES_基本变量_DB数据结构_获得激发变量
        /// </summary>
        /// <returns></returns>
        public static DataTable BaseData_tagTable_All()
        {
            int MES_Code = 1;
            DataTable dt = null;
            string sql;
            sql = "SELECT  TagID,0 as TagValue,TagName,工位号,数据来源,TagTypeID,TagLong,列位置,测量位置,变量类型代码,测量项目,TagAdr,TagAdrDemo,变量特点,变量排序   FROM [MES_基本变量_原始数据] "
                + " where ((变量类型代码 >= 19 and 变量类型代码 <= 27)  or (变量类型代码 = 101) or (变量类型代码 = 102) or (变量类型代码 = 105) or (变量类型代码 = 1000) or (变量类型代码 = 1001) or (变量类型代码 = 1002) or (变量类型代码 = 1003) or (变量类型代码 = 1004))  and (是否启用 = 1) "
                + " and (监控属性代码 = '" + MES_Code.ToString() + "')"
                + " ORDER BY TagID ";
            DataAccess.ExecuteDataTable(sql, out dt);
            return dt;
        }


    }
}

