#region 程序集 MES_SPC, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// F:\项目文件备份\15.潍柴\MES_Manage\Bin\MES_SPC.dll
// Decompiled with ICSharpCode.Decompiler 8.1.1.7464
#endregion

using System;
using System.Data;
using System.Data.SqlClient;
using DataLinkMesWork;
using MES_SPC;

namespace MES_SPC2
{
    public class QualityData2
    {
        public static void GetQualityDataEveryOpNameDataListTable_Trend(string startTime, string endTime, bool EngineTypeIDCheck, string EngineTypeID, bool EnginIDCheck, string EnginID, bool OPNameCheck, string OPName, bool shaftNameCheck, string shaftName, bool itemNameCheck, string itemName, int isOK, string uuidCheck,string uuid , int PageCurrent, int PageSize, out int PageCount, out int ItemCount, out DataTable dt)
        {
            dt = null;
            PageCount = 0;
            ItemCount = 0;
            string procedureName = "[质量数据_发动机质量数据_各个工位_视图_综合查询_趋势图_LLJ]";
            SqlParameter[] sqlParameters = new SqlParameter[16]
            {
            new SqlParameter("@开始时间", startTime),
            new SqlParameter("@结束时间", endTime),
            new SqlParameter("@发动机型号代码_ischeck", EngineTypeIDCheck),
            new SqlParameter("@发动机型号代码", EngineTypeID),
            new SqlParameter("@工位号_ischeck", OPNameCheck),
            new SqlParameter("@工位号", OPName),
            new SqlParameter("@测量位置_ischeck", shaftNameCheck),
            new SqlParameter("@测量位置", shaftName),
            new SqlParameter("@测量项目_ischeck", itemNameCheck),
            new SqlParameter("@测量项目", itemName),
            new SqlParameter("@导入编号_ischeck", uuidCheck),
            new SqlParameter("@导入编号", uuid),
            new SqlParameter("@PageCurrent", PageCurrent),
            new SqlParameter("@PageSize", PageSize),
            new SqlParameter("@PageCount", PageCount),
            new SqlParameter("@ItemCount", ItemCount)
            };
            //sqlParameters[14].Direction = ParameterDirection.Output;
            //sqlParameters[15].Direction = ParameterDirection.Output;
            string errorMessage;
            SQLCommon.ExecuteStoredProcedure(procedureName, ApplicationConfiguration.ERP_ConnectionString, ref sqlParameters, out dt, out errorMessage);
        }
        public static void SelectGoodDataReport_TrendPictureBasic(bool EnginIDCheck, string EnginID, bool OPNameCheck, string OPName, bool shaftNameCheck, string shaftName, bool itemNameCheck, string itemName, string startTime, string endTime, string uuidCheck, string uuid, out DataTable dt)
        {
            try
            {
                string procedureName = "质量数据查询_综合查询_绘趋势图";
                DateTime dateTime = DateTime.Parse(startTime);
                DateTime dateTime2 = DateTime.Parse(endTime);
                SqlParameter[] sqlParameters = new SqlParameter[10]
                {
                new SqlParameter("@发动机号_ischeck", EnginIDCheck),
                new SqlParameter("@发动机号", EnginID),
                new SqlParameter("@工位号_ischeck", OPNameCheck),
                new SqlParameter("@工位号", OPName),
                new SqlParameter("@测量位置_ischeck", shaftNameCheck),
                new SqlParameter("@测量位置", shaftName),
                new SqlParameter("@测量项目_ischeck", itemNameCheck),
                new SqlParameter("@测量项目", itemName),
                //new SqlParameter("@导入编号_ischeck", uuidCheck),
                //new SqlParameter("@导入编号", uuid),
                new SqlParameter("@开始时间", dateTime),
                new SqlParameter("@结束时间", dateTime2)
                };
                string errorMessage;
                SQLCommon.ExecuteStoredProcedure(procedureName, ApplicationConfiguration.ERP_ConnectionString, ref sqlParameters, out dt, out errorMessage);
            }
            catch
            {
                dt = null;
            }
        }
    }
}


