using System;
using System.Data;
using System.Data.SqlClient;
using DataLinkMesWork;
using System.Collections;
using System.Collections.Specialized;
////using SystemFramework;

namespace bizFacade
{
    /// <summary>
    /// 电子看板信息系统
    /// </summary>
    public partial class BaseDataSystemMES
    {
        /// <summary>
        /// MES_计划BOM_工位与名称_修改_工序号和工序名称;
        /// </summary>
        /// <param name="opName">工位号</param>
        /// <param name="ProccessCode">工序号</param>
        /// <param name="ProcessName">工序名称</param>
        static public void OpNameWorkStepName_Update(string opName, string ProccessCode, string ProcessName)
        {
            string procedureName;
            procedureName = "MES_计划BOM_工位与名称_修改_工序号和工序名称";
            SqlParameter[] thisParms = new SqlParameter[3];
            thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
            thisParms[1] = new System.Data.SqlClient.SqlParameter("@工序号", ProccessCode);
            thisParms[2] = new System.Data.SqlClient.SqlParameter("@工序名称", ProcessName);
            DataAccess.ExecuteStoredProcedure(procedureName, ref thisParms);
        }
        /// <summary>
        /// 电子看板_工序内容_工步属性_查询
        /// </summary>
        static public void GetWorkStepPropurty(out DataTable dt)
        {
            string sql;
            sql =  "exec 电子看板_工序内容_工步属性_查询";
            DataAccess.ExecuteDataTable(sql, out  dt);
        }

        /// <summary>
        /// 电子看板_工序内容_增加
        /// </summary>
        /// <param name="opName"></param>
        /// <param name="engineTypeID"></param>
        /// <param name="workStep"></param>
        /// <param name="contend"></param>
        /// <param name="requare"></param>
        /// <param name="propurtyID"></param>
        static public void WorkStepPropurty_Insert(string opName, int engineTypeID, int workStep, string contend,string requare, int propurtyID)
        {
            string procedureName;
            procedureName = "电子看板_工序内容_增加";
            SqlParameter[] thisParms = new SqlParameter[6];
            thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
            thisParms[1] = new System.Data.SqlClient.SqlParameter("@产品型号代码", engineTypeID);
            thisParms[2] = new System.Data.SqlClient.SqlParameter("@工步号", workStep);
            thisParms[3] = new System.Data.SqlClient.SqlParameter("@操作内容", contend);
            thisParms[4] = new System.Data.SqlClient.SqlParameter("@技术要求", requare);
            thisParms[5] = new System.Data.SqlClient.SqlParameter("@工步属性", propurtyID);
            DataAccess.ExecuteStoredProcedure(procedureName, ref thisParms);
        }
        /// <summary>
        /// 电子看板_工序内容_修改
        /// </summary>
        /// <param name="ID"></param>
        /// <param name="contend"></param>
        /// <param name="requare"></param>
        /// <param name="propurtyID"></param>
        static public void WorkStepPropurty_Update(int ID, string contend, string requare, int propurtyID)
        {
            string procedureName;
            procedureName = "电子看板_工序内容_修改";
            SqlParameter[] thisParms = new SqlParameter[4];
            thisParms[0] = new System.Data.SqlClient.SqlParameter("@ID", ID);
            thisParms[1] = new System.Data.SqlClient.SqlParameter("@操作内容", contend);
            thisParms[2] = new System.Data.SqlClient.SqlParameter("@技术要求", requare);
            thisParms[3] = new System.Data.SqlClient.SqlParameter("@工步属性", propurtyID);
            DataAccess.ExecuteStoredProcedure(procedureName, ref thisParms);
        }
        /// <summary>
        /// 电子看板_工序内容_删除
        /// </summary>
        /// <param name="ID"></param>
        static public void WorkStepPropurty_Delete(int ID)
        {
            string procedureName;
            procedureName = "电子看板_工序内容_删除";
            SqlParameter[] thisParms = new SqlParameter[1];
            thisParms[0] = new System.Data.SqlClient.SqlParameter("@ID", ID);
            DataAccess.ExecuteStoredProcedure(procedureName, ref thisParms);
        }
        /// <summary>
        /// 电子看板_工序内容_修改_修改序号
        /// </summary>
        /// <param name="ID"></param>
        /// <param name="opName"></param>
        /// <param name="engineTypeID"></param>
        /// <param name="workStep"></param>
        static public void WorkStepPropurty_Update_WorkStep(int ID,string opName, int engineTypeID, int workStep)
        {
            string procedureName;
            procedureName = "电子看板_工序内容_修改_修改序号";
            SqlParameter[] thisParms = new SqlParameter[4];
            thisParms[0] = new System.Data.SqlClient.SqlParameter("@ID", ID);
            thisParms[1] = new System.Data.SqlClient.SqlParameter("@工位号", opName);
            thisParms[2] = new System.Data.SqlClient.SqlParameter("@产品型号代码", engineTypeID);
            thisParms[3] = new System.Data.SqlClient.SqlParameter("@工步号", workStep);
            DataAccess.ExecuteStoredProcedure(procedureName, ref thisParms);
        }
    }
}
