using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using DataLinkMesWork;


//using SystemFramework;

namespace bizFacade
{
    partial class BaseDataSystemMES
    {

        public static DataTable dt_Signal()
        {
            DataTable dt;
            string sql;
            sql = "SELECT [TagID],[TagName] ,[工位号],[数据来源],[IP],[TagTypeID],[TagLong]"+
                 " ,[DbName],[变量类型],[变量地址] ,[变量其它],[演示偏移] ,[列位置],[测量位置] ,[测量项目],[测量单位],[变量类型代码],[变量类型名称]"+
                 " ,[机体类型],[线体类型],[TagAdr],[TagAdrDemo],[是否启用],[监控组] ,[监控时间间隔],[OpcServer_OPNAME],[变量特点],[是否监控]"+
                 " ,[变量排序] ,[工序能力],[监控属性代码],[测量位置短],[上限值],[下限值] ,[理论值],[IsGoodBad] ,[IsSaveToSql]"+
                 " ,[IsWebSocket]  FROM [MES_基本变量_原始数据]";
            DataAccess.ExecuteDataTable(sql, out  dt);
            return dt;
        }

        public static DataTable dt_Device()
        {
            DataTable dt;
            string sql;
            sql = "SELECT  [设备IP] ,[设备类型],[是否启用] FROM [MES_基本变量设备类型对应表]";
            DataAccess.ExecuteDataTable(sql, out dt);
            return dt;
        }

        public static DataTable dt_TagTypeDataType()
        {
            DataTable dt;
            string sql;
            sql = "SELECT TOP (1000) [序号],[变量类型],[TagTypeDataType],[TagName],[变量类型代码],[TagTypeChange],[MesTagTypeChange],[WebTagTypeChange],[信号点名称][变量类型名称] FROM [MES_基本变量变量类型代码]";
            DataAccess.ExecuteDataTable(sql, out dt);
            return dt;
        }
    }
}
