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
    {
        /// <summary>
        /// 查询MesServerCode
        /// </summary>
        /// <returns></returns>
        public static DataTable GetMesServerCodeFromMIS()
        {
            DataTable dt;
            string sql;
            sql = "exec MES_计划BOM_工位与名称_查询应用程序";
            DataAccess.ExecuteDataTable(sql, out dt);
            return dt;
        }


        /// <summary>
        /// 查询工步属性
        /// </summary>
        /// <returns></returns>
        public static DataTable GetworkStepPropertyFromMIS()
        {
            DataTable dt;
            string sql;
            sql = "SELECT distinct 工位号,工步属性 FROM [MES_计划BOM_工位与名称] where 是否监控=1";
            DataAccess.ExecuteDataTable(sql, out  dt);
            return dt;
        }

        /// <summary>
        /// 查询返修工位号
        /// </summary>
        /// <returns></returns>
        public static DataTable GetOpNameRepairFromMIS()
        {
            DataTable dt;
            string sql;
            sql = "SELECT distinct 工位号,返修工位号 FROM [MES_计划BOM_工位与名称] where 是否监控=1";
            DataAccess.ExecuteDataTable(sql, out  dt);
            return dt;
        }

    }
}
