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.
42 lines
1.6 KiB
42 lines
1.6 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.PunchAndWeld
|
|
{
|
|
public class PunchAndStationDAL
|
|
{
|
|
public DataTable IsMath(string partNo1, string partNo2)
|
|
{
|
|
try
|
|
{
|
|
string sql = @"SELECT tb_Product_1.PartNo AS PartNo1, tb_Product_1.ProductName AS ProductName1, dbo.tb_Product.PartNo AS PartNo2,
|
|
dbo.tb_Product.ProductName AS ProductName2
|
|
FROM dbo.tb_PunchAndStation LEFT OUTER JOIN
|
|
dbo.tb_Product ON dbo.tb_PunchAndStation.ProductID2 = dbo.tb_Product.ProductID LEFT OUTER JOIN
|
|
dbo.tb_Product AS tb_Product_1 ON dbo.tb_PunchAndStation.ProductID1 = tb_Product_1.ProductID
|
|
where tb_Product_1.PartNo=@partNo1 and dbo.tb_Product.PartNo =@partNo2";
|
|
SqlParameter[] param = null;
|
|
|
|
param = new SqlParameter[2];
|
|
param[0] = new SqlParameter("@partNo1", SqlDbType.VarChar);
|
|
param[0].Value = partNo1;
|
|
|
|
param[1] = new SqlParameter("@partNo2", SqlDbType.VarChar);
|
|
param[1].Value = partNo2;
|
|
|
|
return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0];
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|