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

using System.Data.OleDb;
using DataLinkMesWork;


//using SystemFramework;

namespace bizFacade
{
    /// <summary>
    /// 关键零部件追溯
    /// </summary>
    public partial class BaseDataSystemMES
    {
        /// <summary>
        /// 向数据库写入返修数据
        /// </summary>
        /// <param name="opName"></param>
        /// <param name="engineID"></param>
        /// <returns></returns>
        public static bool UpdateRepairStatusTo_SQL(string opname, string status)
        {
            string produceName = "测量数据_返修工位_工位状态_修改";
            SqlParameter[] thisParms = new SqlParameter[2];
            thisParms[0] = new System.Data.SqlClient.SqlParameter("@工位号", opname);
            thisParms[1] = new System.Data.SqlClient.SqlParameter("@返修状态", status);

            return DataAccess.ExecuteStoredProcedure(produceName, ref thisParms);
        }

        /// <summary>
        /// 返修上线_返修工位及返修路径_增加
        /// </summary>
        /// <param name="opName"></param>
        /// <param name="engineID"></param>
        /// <returns></returns>
        public static bool RepairStatusInsert(string engineID, string RepairStatus, string RepairMethod, string engineType)
        {
            string produceName = "返修上线_返修工位及返修路径_增加";
            SqlParameter[] thisParms = new SqlParameter[4];
            thisParms[0] = new System.Data.SqlClient.SqlParameter("@总成编号", engineID);
            thisParms[1] = new System.Data.SqlClient.SqlParameter("@返修状态", RepairStatus);
            thisParms[2] = new System.Data.SqlClient.SqlParameter("@返修路径", RepairMethod);
            thisParms[3] = new System.Data.SqlClient.SqlParameter("@发动机型号", engineType);
            return DataAccess.ExecuteStoredProcedure(produceName, ref thisParms);
        }

        /// <summary>
        /// 上传数据
        /// MES_装配数据_零部件追溯_返修工位_数据主表
        /// 一般情况追踪代码等于发动机号()
        /// </summary>
        /// <param name="orderForm">订单号</param>
        /// <param name="engineNumber">发动机号</param>
        /// <param name="engineTraceCode">追踪代码</param>
        /// <param name="opName">工位号</param>
        /// <param name="operatorCode">人员代码</param>
        /// <param name="reasonCode">返修原因代码</param>
        /// <param name="reason">返修原因内容</param>
        /// <param name="repareContent">返修内容</param>
        /// <param name="operationTime">操作时间</param>
        static public bool AssemblyPartTraceMainTableRepairInsert_OnlySqlServer(string orderForm,
            string engineNumber, string engineTraceCode, string opName,
            string operatorCode, string reasonCode, string reason, string repareContent,string operationTime)
        {
            string sql_Insert;
            sql_Insert = "INSERT INTO [MES_装配数据_零部件追溯_返修工位_数据主表] " +
                "(订单号,发动机号,追踪代码,工位号,人员代码, 返修原因代码, 返修原因内容, 返修内容,操作时间)"
                + " VALUES ("
                + "'" + orderForm + "',"
                + "'" + engineNumber + "',"
                + "'" + engineTraceCode + "',"
                + "'" + opName + "',"
                + "'" + operatorCode + "',"
                + "'" + reasonCode + "',"
                + "'" + reason + "',"
                + "'" + repareContent + "',"
                + "'" + operationTime + "') "; 
            
            return DataAccess.ExecuteSQL(sql_Insert);

        }
        /// <summary>
        /// 数据上传
        /// 删除数据
        /// MES_装配数据_零部件追溯_返修工位_数据主表
        /// </summary>
        /// <param name="traceID">追溯代码</param>
        //static public bool PartTraceTableRepareDelete(long traceID)
        //{
        //    string sql;
        //    sql = "DELETE  FROM [MES_装配数据_零部件追溯_返修工位_数据主表] "
        //        + " WHERE 追溯代码=" + traceID.ToString();
        //    return DataAccess.ExecuteSQL_OleDb_Access(sql);
        //}
        /// <summary>
        /// 数据上传
        /// 查询数据
        /// MES_装配数据_零部件追溯_返修工位_数据主表
        /// </summary>
        //static public bool PartTraceMainTableRepareSelect(out DataTable dt)
        //{
        //    string sql;
        //    dt = null;
        //    sql = "SELECT * FROM [MES_装配数据_零部件追溯_返修工位_数据主表] ";
        //    return DataAccess.ExecuteDataTable_OleDb_Access(sql, out dt);
        //}

        
        /// <summary>
        /// 查询返修原因代码,返修内容
        /// </summary>
        /// <param name="engineTraceCode">追踪代码</param>
        /// <param name="opName">工位号</param>
        /// <param name="dt"></param>
        /// <returns></returns>
        static public bool AssemblyPartTraceTableRepairSelect(string engineTraceCode, string opName, out DataTable dt)
        {
            string sql;
            dt = null;
            sql = "SELECT 返修原因代码,返修内容 FROM [MES_装配数据_零部件追溯_返修工位_数据主表] "
                + " where 追踪代码='" + engineTraceCode + "'"
                + " and 工位号 = '" + opName + "'"
                + " and 返修状态 = 0";
            //if (SQLCommon.SqlServerConnectionStatus)
            {
                return DataAccess.ExecuteDataTable(sql, out  dt);
            }
            //if (!SQLCommon.SqlServerConnectionStatus)
            //{
            //    return DataAccess.ExecuteDataTable_OleDb_Access(sql, out  dt);
            //}
            //return false;
        }

        /// <summary>
        /// 测试是否填写返修原因数据
        /// 已经填写，返回true
        /// 没有填写，返回false
        /// </summary>
        /// <param name="orderForm"></param>
        /// <param name="engineTraceCode"></param>
        /// <param name="opName"></param>
        /// <returns></returns>
        static public bool AssemblyPartTraceTableRepairIsSave(string orderForm,string engineTraceCode, string opName)
        {
            string sql_Count;
            int count = 0;
            sql_Count = "SELECT COUNT (*) FROM [MES_装配数据_零部件追溯_返修工位_数据主表] "
                + " where 追踪代码='" + engineTraceCode + "'"
                + " and 工位号 = '" + opName + "'"
                + " and 返修状态 = 0";
            //if (SQLCommon.SqlServerConnectionStatus)
            {
                DataAccess.ExecuteOutNum(sql_Count, out  count);
            }
            //if (!SQLCommon.SqlServerConnectionStatus)
            //{
            //    DataAccess.ExecuteOutNum_OleDb_Access(sql_Count, out count);
            //}
            if (count == 0)
            {
                return false;
            }
            else
            {
                return true;
            }
        }


        /// <summary>
        /// 
        /// </summary>
        /// <param name="dt"></param>
        /// <returns></returns>
        //static public bool AssemblyPartTraceTableRepairReasonSelect(out DataTable dt)
        //{
        //    string sql;
        //    sql = "SELECT 返修原因代码,返修原因内容  FROM MES_基本数据_返修原因";
        //    return DataAccess.ExecuteDataTable_OleDb_Access(sql, out  dt);
        //}


        /// <summary>
        /// 同步通讯方式
        /// 增加数据，返回自动编号
        /// MES_装配数据_零部件追溯_返修工位_数据主表
        /// 一般情况追踪代码等于发动机号()
        /// </summary>
        /// <param name="orderForm">订单号</param>
        /// <param name="engineNumber">发动机号</param>
        /// <param name="engineTraceCode">追踪代码</param>
        /// <param name="opName">工位号</param>
        /// <param name="operatorCode">人员代码</param>
        /// <param name="reasonCode">返修原因代码</param>
        /// <param name="reason">返修原因内容</param>
        /// <param name="repareContent">返修内容</param>
        static public bool AssemblyPartTraceMainTableRepairInsert(string orderForm,
            string engineNumber, string engineTraceCode, string opName,
            string operatorCode, string reasonCode, string reason,string repareContent)
        {
            string sql_Insert;
            string sql_Update;
            string sql_Count;
            sql_Insert = "INSERT INTO [MES_装配数据_零部件追溯_返修工位_数据主表] " +
                "(订单号,发动机号,追踪代码,工位号,人员代码, 返修原因代码, 返修原因内容, 返修内容)"
                + " VALUES ("
                + "'" + orderForm + "',"
                + "'" + engineNumber + "',"
                + "'" + engineTraceCode + "',"
                + "'" + opName + "',"
                + "'" + operatorCode + "',"
                + "'" + reasonCode + "',"
                + "'" + reason + "',"
                + "'" + repareContent + "') ";
            sql_Update = "UPDATE [MES_装配数据_零部件追溯_返修工位_数据主表] "
                + "SET 人员代码 ='" + operatorCode + "',"
                + " 返修原因代码 ='" + reasonCode + "',"
                + " 返修原因内容 ='" + reason + "',"
                + " 返修内容 ='" + repareContent + "'"
                + " where 追踪代码='" + engineTraceCode + "'"
                + " and 工位号 = '" + opName + "'"
                + " and 返修状态 = 0";

            sql_Count = "SELECT COUNT (*) FROM [MES_装配数据_零部件追溯_返修工位_数据主表] "
                + " where 追踪代码='" + engineTraceCode + "'"
                + " and 工位号 = '" + opName + "'"
                + " and 返修状态 = 0";

            int count=0;
            //if (SQLCommon.SqlServerConnectionStatus)
            {
                DataAccess.ExecuteOutNum(sql_Count, out  count);
                if (count == 0)
                {
                    return DataAccess.ExecuteSQL(sql_Insert);
                }
                else
                //MES_装配数据_零部件追溯_返修工位_数据主表
                //存在发动机号,工位号
                {
                    return DataAccess.ExecuteSQL(sql_Update);
                }
            }
            //if (!SQLCommon.SqlServerConnectionStatus)
            //{
            //    DataAccess.ExecuteOutNum_OleDb_Access(sql_Count, out count);
            //    if (count == 0)
            //    {
            //        return DataAccess.ExecuteSQL_OleDb_Access(sql_Insert);
            //    }
            //    else
            //    //MES_装配数据_零部件追溯_返修工位_数据主表
            //    //存在发动机号,工位号
            //    {
            //        return DataAccess.ExecuteSQL_OleDb_Access(sql_Update);
            //    }
            //}
            //return false;

        }        

        /// <summary>
        ///MES_装配数据_零部件追溯_返修工位
        ///INSERT INTO [MES_装配数据_零部件追溯_返修工位]
        ///增加数据，
        /// </summary>
        /// <param name="dt"></param>
        /// <returns></returns>
        public static void VerifyAssemblyPartTableRepairInsert(DataTable dt)
        {
            //if (ApplicationConfig.connectionStringPIS_NEW_Value == "1")
            //{
            //    //如果与SQL Server 数据库通讯失败，ApplicationConfig.connectionStringPIS_NEW_Value = "0"
            //    VerifyAssemblyPartTableRepairInsert_SqlServer(dt);
            //}
            //if (ApplicationConfig.connectionStringPIS_NEW_Value == "0")
            //{
            //    VerifyAssemblyPartTableRepairInsert_Access(dt);
            //}

        }
        /// <summary>
        /// 同步操作方式
        ///MES_装配数据_零部件追溯_返修工位
        ///INSERT INTO [MES_装配数据_零部件追溯_返修工位]
        ///增加数据，
        /// </summary>
        /// <param name="dt"></param>
        /// <returns></returns>
        public static void VerifyAssemblyPartTableRepairInsert_SqlServer(DataTable dt)
        {
            string sql;
            sql = "INSERT INTO [MES_装配数据_零部件追溯_返修工位]"
                + "([追溯代码],[订单号],[SAP物料号],[发动机型号],[发动机型号代码], [发动机机型], "
                + "[发动机数量], [厂牌编号起始号], [客户名称],[投料日期],[文件编号],[集团名称],[通知号],"
                + "[功率],[指南文件编号],[装机状态],[适用状态],[物料描述],[计划下达日期],[计划完工日期],"
                + "[主配厂家],[工位号], [工位名称],[物料号], [零件图号], [零件名称], [零件数量],"
                + "[是否扫描],[扫描方式代码], [扫描方式], [厂家代码],[生产厂家],  "
                + "[操作指导],[发动机号],[追踪代码],[物料号表索引号],[零件数量验证],"
                + "[物料条码], [物料条码物料号], [物料条码批次],[验证结果], [操作者工号], [操作者姓名], [班次代码], "
                + "物料来源代码,物料来源,是否禁用代码,是否禁用,被强制验证物料号,"
                +"更改代码,更改原因,操作时间)"

                + "VALUES(@追溯代码,@订单号,@SAP物料号,@发动机型号,@发动机型号代码,@发动机机型,"
                + "@发动机数量,@厂牌编号起始号,@客户名称,@投料日期,@文件编号,@集团名称,@通知号,"
                + "@功率,@指南文件编号,@装机状态,@适用状态,@物料描述,@计划下达日期,@计划完工日期,"
                + "@主配厂家,@工位号,@工位名称,@物料号,@零件图号,@零件名称,@零件数量,"
                + " @是否扫描,@扫描方式代码,@扫描方式,@厂家代码,@生产厂家,"
                + "@操作指导,@发动机号,@追踪代码,@物料号表索引号,@零件数量验证,"
                + "@物料条码,@物料条码物料号,@物料条码批次,@验证结果,@操作者工号,@操作者姓名,@班次代码,"
                + "@物料来源代码,@物料来源,@是否禁用代码,@是否禁用,@被强制验证物料号,"
                +"@更改代码,@更改原因,@操作时间)";



            SqlParameter[] thisParmsSql = new SqlParameter[52];
            //    + "([订单号],[SAP物料号],[发动机型号],[发动机型号代码], [发动机机型], "
            thisParmsSql[0] = new SqlParameter("@追溯代码", SqlDbType.Int, 4, "追溯代码");
            thisParmsSql[1] = new SqlParameter("@订单号", SqlDbType.NVarChar, 50, "订单号");
            thisParmsSql[2] = new SqlParameter("@SAP物料号", SqlDbType.NVarChar, 50, "SAP物料号");
            thisParmsSql[3] = new SqlParameter("@发动机型号", SqlDbType.NVarChar, 50, "发动机型号");
            thisParmsSql[4] = new SqlParameter("@发动机型号代码", SqlDbType.Int, 4, "发动机型号代码");
            thisParmsSql[5] = new SqlParameter("@发动机机型", SqlDbType.NVarChar, 50, "发动机机型");

            //     + "@发动机数量,@厂牌编号起始号,@客户名称,@投料日期,@文件编号,@集团名称,@通知号,"
            thisParmsSql[6] = new SqlParameter("@发动机数量", SqlDbType.Int, 4, "发动机数量");
            thisParmsSql[7] = new SqlParameter("@厂牌编号起始号", SqlDbType.Int, 4, "厂牌编号起始号");
            thisParmsSql[8] = new SqlParameter("@客户名称", SqlDbType.NVarChar, 50, "客户名称");
            thisParmsSql[9] = new SqlParameter("@投料日期", SqlDbType.DateTime, 8, "投料日期");
            thisParmsSql[10] = new SqlParameter("@文件编号", SqlDbType.NVarChar, 50, "文件编号");
            thisParmsSql[11] = new SqlParameter("@集团名称", SqlDbType.NVarChar, 50, "集团名称");
            thisParmsSql[12] = new SqlParameter("@通知号", SqlDbType.NVarChar, 50, "通知号");

            //    + "@功率,@指南文件编号,@装机状态,@适用状态,@物料描述,@计划下达日期,@计划完工日期,"
            thisParmsSql[13] = new SqlParameter("@功率", SqlDbType.NVarChar, 50, "功率");
            thisParmsSql[14] = new SqlParameter("@指南文件编号", SqlDbType.NVarChar, 50, "指南文件编号");
            thisParmsSql[15] = new SqlParameter("@装机状态", SqlDbType.NVarChar, 50, "装机状态");
            thisParmsSql[16] = new SqlParameter("@适用状态", SqlDbType.DateTime, 8, "适用状态");
            thisParmsSql[17] = new SqlParameter("@物料描述", SqlDbType.NVarChar, 255, "物料描述");
            thisParmsSql[18] = new SqlParameter("@计划下达日期", SqlDbType.DateTime, 8, "计划下达日期");
            thisParmsSql[19] = new SqlParameter("@计划完工日期", SqlDbType.DateTime, 8, "计划完工日期");

            //    + "@主配厂家,@工位号,@工位名称,@物料号,@零件图号,@零件名称,@零件数量,"

            thisParmsSql[20] = new SqlParameter("@主配厂家", SqlDbType.NVarChar, 50, "主配厂家");
            thisParmsSql[21] = new SqlParameter("@工位号", SqlDbType.NVarChar, 50, "工位号");
            thisParmsSql[22] = new SqlParameter("@工位名称", SqlDbType.NVarChar, 50, "工位名称");
            thisParmsSql[23] = new SqlParameter("@物料号", SqlDbType.NVarChar, 50, "物料号");
            thisParmsSql[24] = new SqlParameter("@零件图号", SqlDbType.NVarChar, 50, "零件图号");
            thisParmsSql[25] = new SqlParameter("@零件名称", SqlDbType.NVarChar, 50, "零件名称");
            thisParmsSql[26] = new SqlParameter("@零件数量", SqlDbType.Int, 4, "零件数量");

            //    +"[是否扫描],扫描方式代码, [扫描方式], [厂家代码],[生产厂家],  "

            thisParmsSql[27] = new SqlParameter("@是否扫描", SqlDbType.Int, 4, "是否扫描");
            thisParmsSql[28] = new SqlParameter("@扫描方式代码", SqlDbType.Int, 4, "扫描方式代码");
            thisParmsSql[29] = new SqlParameter("@扫描方式", SqlDbType.NVarChar, 50, "扫描方式");
            thisParmsSql[30] = new SqlParameter("@厂家代码", SqlDbType.NVarChar, 50, "厂家代码");
            thisParmsSql[31] = new SqlParameter("@生产厂家", SqlDbType.NVarChar, 50, "生产厂家");

            //+ "@操作指导,@发动机号,@物料号表索引号,@零件数量验证,"

            thisParmsSql[32] = new SqlParameter("@操作指导", SqlDbType.NVarChar, 255, "操作指导");
            thisParmsSql[33] = new SqlParameter("@发动机号", SqlDbType.NVarChar, 50, "发动机号");
            thisParmsSql[34] = new SqlParameter("@追踪代码", SqlDbType.NVarChar, 50, "追踪代码");
            thisParmsSql[35] = new SqlParameter("@物料号表索引号", SqlDbType.Int, 4, "物料号表索引号");
            thisParmsSql[36] = new SqlParameter("@零件数量验证", SqlDbType.Int, 4, "零件数量验证");

            //     +"[物料条码], [物料条码物料号], [物料条码批次],@验证结果, [操作者工号], [操作者姓名], [班次代码], "
            thisParmsSql[37] = new SqlParameter("@物料条码", SqlDbType.NVarChar, 50, "物料条码");
            thisParmsSql[38] = new SqlParameter("@物料条码物料号", SqlDbType.NVarChar, 50, "物料条码物料号");
            thisParmsSql[39] = new SqlParameter("@物料条码批次", SqlDbType.NVarChar, 50, "物料条码批次");
            thisParmsSql[40] = new SqlParameter("@验证结果", SqlDbType.Int, 4, "验证结果");
            thisParmsSql[41] = new SqlParameter("@操作者工号", SqlDbType.NVarChar, 50, "操作者工号");
            thisParmsSql[42] = new SqlParameter("@操作者姓名", SqlDbType.NVarChar, 50, "操作者姓名");
            thisParmsSql[43] = new SqlParameter("@班次代码", SqlDbType.NVarChar, 50, "班次代码");

            //    +"物料来源代码,物料来源,是否禁用代码,是否禁用,被强制验证物料号,更改代码,更改原因)"

            thisParmsSql[44] = new SqlParameter("@物料来源代码", SqlDbType.Int, 4, "物料来源代码");
            thisParmsSql[45] = new SqlParameter("@物料来源", SqlDbType.NVarChar, 50, "物料来源");
            thisParmsSql[46] = new SqlParameter("@是否禁用代码", SqlDbType.Int, 4, "是否禁用代码");
            thisParmsSql[47] = new SqlParameter("@是否禁用", SqlDbType.NVarChar, 50, "是否禁用");
            thisParmsSql[48] = new SqlParameter("@被强制验证物料号", SqlDbType.NVarChar, 50, "被强制验证物料号");
            thisParmsSql[49] = new SqlParameter("@更改代码", SqlDbType.NVarChar, 50, "更改代码");
            thisParmsSql[50] = new SqlParameter("@更改原因", SqlDbType.NVarChar, 255, "更改原因");
            thisParmsSql[51] = new SqlParameter("@操作时间", SqlDbType.DateTime, 8, "操作时间");

            DataAccess.ExecuteSQL(sql, ref  thisParmsSql, dt);

        }
        /// <summary>
        /// 异步操作方式
        /// _Access
        ///MES_装配数据_零部件追溯_返修工位
        ///INSERT INTO [MES_装配数据_零部件追溯_返修工位]
        ///增加数据，
        /// </summary>
        /// <param name="dt"></param>
        /// <returns></returns>
        //public static void VerifyAssemblyPartTableRepairInsert_Access(DataTable dt)
        //{
        //    string sql;
        //    sql = "INSERT INTO [MES_装配数据_零部件追溯_返修工位]"
        //        + "([追溯代码],[订单号],[SAP物料号],[发动机型号],[发动机型号代码], [发动机机型], "
        //        + "[发动机数量], [厂牌编号起始号], [客户名称],[投料日期],[文件编号],[集团名称],[通知号],"
        //        + "[功率],[指南文件编号],[装机状态],[适用状态],[物料描述],[计划下达日期],[计划完工日期],"
        //        + "[主配厂家],[工位号], [工位名称],[物料号], [零件图号], [零件名称], [零件数量],"
        //        + "[是否扫描],[扫描方式代码], [扫描方式], [厂家代码],[生产厂家],  "
        //        + "[操作指导],[发动机号],[追踪代码],[物料号表索引号],[零件数量验证],"
        //        + "[物料条码], [物料条码物料号], [物料条码批次],[验证结果], [操作者工号], [操作者姓名], [班次代码], "
        //        + "物料来源代码,物料来源,是否禁用代码,是否禁用,被强制验证物料号,"
        //        +"更改代码,更改原因,操作时间)"

        //        + "VALUES(@追溯代码,@订单号,@SAP物料号,@发动机型号,@发动机型号代码,@发动机机型,"
        //        + "@发动机数量,@厂牌编号起始号,@客户名称,@投料日期,@文件编号,@集团名称,@通知号,"
        //        + "@功率,@指南文件编号,@装机状态,@适用状态,@物料描述,@计划下达日期,@计划完工日期,"
        //        + "@主配厂家,@工位号,@工位名称,@物料号,@零件图号,@零件名称,@零件数量,"
        //        + " @是否扫描,@扫描方式代码,@扫描方式,@厂家代码,@生产厂家,"
        //        + "@操作指导,@发动机号,@追踪代码,@物料号表索引号,@零件数量验证,"
        //        + "@物料条码,@物料条码物料号,@物料条码批次,@验证结果,@操作者工号,@操作者姓名,@班次代码,"
        //        + "@物料来源代码,@物料来源,@是否禁用代码,@是否禁用,@被强制验证物料号,"
        //        +"@更改代码,@更改原因,@操作时间)";


        //    OleDbParameter[] thisParms1 = new OleDbParameter[52];
        //    //    + "([追溯代码],[订单号],[SAP物料号],[发动机型号],[发动机型号代码], [发动机机型], "
        //    thisParms1[0] = new OleDbParameter("@追溯代码", OleDbType.Integer, 4, "追溯代码");
        //    thisParms1[1] = new OleDbParameter("@订单号", OleDbType.VarChar, 50, "订单号");
        //    thisParms1[2] = new OleDbParameter("@SAP物料号", OleDbType.VarChar, 50, "SAP物料号");
        //    thisParms1[3] = new OleDbParameter("@发动机型号", OleDbType.VarChar, 50, "发动机型号");
        //    thisParms1[4] = new OleDbParameter("@发动机型号代码", OleDbType.Integer, 4, "发动机型号代码");
        //    thisParms1[5] = new OleDbParameter("@发动机机型", OleDbType.VarChar, 50, "发动机机型");

        //    //     + "@发动机数量,@厂牌编号起始号,@客户名称,@投料日期,@文件编号,@集团名称,@通知号,"
        //    thisParms1[6] = new OleDbParameter("@发动机数量", OleDbType.Integer, 4, "发动机数量");
        //    thisParms1[7] = new OleDbParameter("@厂牌编号起始号", OleDbType.Integer, 4, "厂牌编号起始号");
        //    thisParms1[8] = new OleDbParameter("@客户名称", OleDbType.VarChar, 50, "客户名称");
        //    thisParms1[9] = new OleDbParameter("@投料日期", OleDbType.DBDate, 8, "投料日期");
        //    thisParms1[10] = new OleDbParameter("@文件编号", OleDbType.VarChar, 50, "文件编号");
        //    thisParms1[11] = new OleDbParameter("@集团名称", OleDbType.VarChar, 50, "集团名称");
        //    thisParms1[12] = new OleDbParameter("@通知号", OleDbType.VarChar, 50, "通知号");

        //    //    + "@功率,@指南文件编号,@装机状态,@适用状态,@物料描述,@计划下达日期,@计划完工日期,"
        //    thisParms1[13] = new OleDbParameter("@功率", OleDbType.VarChar, 50, "功率");
        //    thisParms1[14] = new OleDbParameter("@指南文件编号", OleDbType.VarChar, 50, "指南文件编号");
        //    thisParms1[15] = new OleDbParameter("@装机状态", OleDbType.VarChar, 50, "装机状态");
        //    thisParms1[16] = new OleDbParameter("@适用状态", OleDbType.DBDate, 8, "适用状态");
        //    thisParms1[17] = new OleDbParameter("@物料描述", OleDbType.VarChar, 255, "物料描述");
        //    thisParms1[18] = new OleDbParameter("@计划下达日期", OleDbType.DBDate, 8, "计划下达日期");
        //    thisParms1[19] = new OleDbParameter("@计划完工日期", OleDbType.DBDate, 8, "计划完工日期");

        //    //    + "@主配厂家,@工位号,@工位名称,@物料号,@零件图号,@零件名称,@零件数量,"

        //    thisParms1[20] = new OleDbParameter("@主配厂家", OleDbType.VarChar, 50, "主配厂家");
        //    thisParms1[21] = new OleDbParameter("@工位号", OleDbType.VarChar, 50, "工位号");
        //    thisParms1[22] = new OleDbParameter("@工位名称", OleDbType.VarChar, 50, "工位名称");
        //    thisParms1[23] = new OleDbParameter("@物料号", OleDbType.VarChar, 50, "物料号");
        //    thisParms1[24] = new OleDbParameter("@零件图号", OleDbType.VarChar, 50, "零件图号");
        //    thisParms1[25] = new OleDbParameter("@零件名称", OleDbType.VarChar, 50, "零件名称");
        //    thisParms1[26] = new OleDbParameter("@零件数量", OleDbType.Integer, 4, "零件数量");

        //    //    +"[是否扫描],扫描方式代码, [扫描方式], [厂家代码],[生产厂家],  "

        //    thisParms1[27] = new OleDbParameter("@是否扫描", OleDbType.Integer, 4, "是否扫描");
        //    thisParms1[28] = new OleDbParameter("@扫描方式代码", OleDbType.Integer, 4, "扫描方式代码");
        //    thisParms1[29] = new OleDbParameter("@扫描方式", OleDbType.VarChar, 50, "扫描方式");
        //    thisParms1[30] = new OleDbParameter("@厂家代码", OleDbType.VarChar, 50, "厂家代码");
        //    thisParms1[31] = new OleDbParameter("@生产厂家", OleDbType.VarChar, 50, "生产厂家");

        //    //+ "@操作指导,@发动机号,@物料号表索引号,@零件数量验证,"

        //    thisParms1[32] = new OleDbParameter("@操作指导", OleDbType.VarChar, 255, "操作指导");
        //    thisParms1[33] = new OleDbParameter("@发动机号", OleDbType.VarChar, 50, "发动机号");
        //    thisParms1[34] = new OleDbParameter("@追踪代码", OleDbType.VarChar, 50, "追踪代码");
        //    thisParms1[35] = new OleDbParameter("@物料号表索引号", OleDbType.Integer, 4, "物料号表索引号");
        //    thisParms1[36] = new OleDbParameter("@零件数量验证", OleDbType.Integer, 4, "零件数量验证");

        //    //     +"[物料条码], [物料条码物料号], [物料条码批次],@验证结果, [操作者工号], [操作者姓名], [班次代码], "
        //    thisParms1[37] = new OleDbParameter("@物料条码", OleDbType.VarChar, 50, "物料条码");
        //    thisParms1[38] = new OleDbParameter("@物料条码物料号", OleDbType.VarChar, 50, "物料条码物料号");
        //    thisParms1[39] = new OleDbParameter("@物料条码批次", OleDbType.VarChar, 50, "物料条码批次");
        //    thisParms1[40] = new OleDbParameter("@验证结果", OleDbType.Integer, 4, "验证结果");
        //    thisParms1[41] = new OleDbParameter("@操作者工号", OleDbType.VarChar, 50, "操作者工号");
        //    thisParms1[42] = new OleDbParameter("@操作者姓名", OleDbType.VarChar, 50, "操作者姓名");
        //    thisParms1[43] = new OleDbParameter("@班次代码", OleDbType.VarChar, 50, "班次代码");

        //    //    +"物料来源代码,物料来源,是否禁用代码,是否禁用,被强制验证物料号,更改代码,更改原因)"

        //    thisParms1[44] = new OleDbParameter("@物料来源代码", OleDbType.Integer, 4, "物料来源代码");
        //    thisParms1[45] = new OleDbParameter("@物料来源", OleDbType.VarChar, 50, "物料来源");
        //    thisParms1[46] = new OleDbParameter("@是否禁用代码", OleDbType.Integer, 4, "是否禁用代码");
        //    thisParms1[47] = new OleDbParameter("@是否禁用", OleDbType.VarChar, 50, "是否禁用");
        //    thisParms1[48] = new OleDbParameter("@被强制验证物料号", OleDbType.VarChar, 50, "被强制验证物料号");
        //    thisParms1[49] = new OleDbParameter("@更改代码", OleDbType.VarChar, 50, "更改代码");
        //    thisParms1[50] = new OleDbParameter("@更改原因", OleDbType.VarChar, 255, "更改原因");
        //    thisParms1[51] = new OleDbParameter("@操作时间", OleDbType.DBTimeStamp, 8, "操作时间");

        //    DataAccess.ExecuteDataTable_OleDb_Insert_Access(sql, dt, ref  thisParms1);
        //}
    }
}
