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

using SystemFramework;

namespace bizFacade
{
    public partial class BaseDataSystemMES
    {

        
        /// <summary>
        /// 测量工位号和工位名称
        /// </summary>
        /// <returns></returns>
        public static DataTable BaseData_tagTable_QualityData_OpName_Name()
        {
            DataTable dt;
            string sql = "SELECT distinct [工位号],[工位名称]  FROM [MES_计划BOM_工位与名称]  "
                + " where (监控属性代码 = '" + 1+ "')"
                + " ORDER BY 工位号 ";
            //来源于SQL Server
            DataAccess.ExecuteDataTable(sql, out dt);
            return dt;
        }
        /// <summary>
        /// MES_计划BOM_工位与名称
        /// </summary>
        /// <returns></returns>
        public static DataTable BaseData_tagTable_OpName()
        {
            //DataTable dt;
            //string sql = "SELECT *  FROM [MES_计划BOM_工位与名称]  "
            //    + " where (监控属性代码 = '" + ApplicationConfig.MES_Code.ToString() + "')"
            //    + " ORDER BY 工位号 ";
            //DataAccess.ExecuteDataTable(sql, out dt);
            //return dt;
            
            //2022.07.27.LLX 处理了一下子
            DataTable dt;
            string sql = "SELECT *  FROM [MES_计划BOM_工位与名称]  "
                + " where (监控属性代码 = '" + 1 + "') and [是否通过监控系统保存数据] is not null"
                + " ORDER BY 工位号 ";
            DataAccess.ExecuteDataTable(sql, out dt);
            return dt;
        }
        

    }
}
