You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
82 lines
2.5 KiB
82 lines
2.5 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Data.SqlClient;
|
|
using System.Linq;
|
|
using System.Reflection;
|
|
using System.Text;
|
|
using MESClassLibrary.BLL.Log;
|
|
|
|
namespace MESClassLibrary.DAL.Mistake243
|
|
{
|
|
public class Mistake243DAL
|
|
{
|
|
public DataTable IsMath(string DeviceNo, string PartNo)
|
|
{
|
|
try
|
|
{
|
|
string sql = @"SELECT * from tb_Mistake_243 where DeviceNo=@DeviceNo and PartNo1=@PartNo";
|
|
SqlParameter[] param = new SqlParameter[2];
|
|
|
|
param[0] = new SqlParameter("@DeviceNo", SqlDbType.VarChar);
|
|
param[0].Value = DeviceNo;
|
|
|
|
param[1] = new SqlParameter("@PartNo", SqlDbType.VarChar);
|
|
param[1].Value = PartNo;
|
|
|
|
|
|
return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0];
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public DataTable SearchByNo(string PartNo, string deviceNo)
|
|
{
|
|
try
|
|
{
|
|
string sql = @"SELECT * from tb_Mistake_243 where PartNo1=@PartNo and DeviceNo=@deviceNo";
|
|
SqlParameter[] param = new SqlParameter[2];
|
|
|
|
param[0] = new SqlParameter("@PartNo", SqlDbType.VarChar);
|
|
param[0].Value = PartNo;
|
|
|
|
param[1] = new SqlParameter("@deviceNo", SqlDbType.VarChar);
|
|
param[1].Value = deviceNo;
|
|
|
|
|
|
return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0];
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public DataTable SearchPartName(string PartNo)
|
|
{
|
|
try
|
|
{
|
|
string sql = @"SELECT * from tb_Mistake_243 where [PartNo2]=@PartNo ";
|
|
SqlParameter[] param = new SqlParameter[1];
|
|
|
|
param[0] = new SqlParameter("@PartNo", SqlDbType.VarChar);
|
|
param[0].Value = PartNo;
|
|
|
|
return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0];
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|