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.
64 lines
2.4 KiB
64 lines
2.4 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.Plan243
|
|
{
|
|
public class Plan243DAL
|
|
{
|
|
public DataTable SearhByOrderNo(string OrderNo)
|
|
{
|
|
try
|
|
{
|
|
string sql = @"SELECT dbo.tb_Plan_243.OrderNo, dbo.tb_Plan_243.PartNo, dbo.tb_Mistake_243.PartName2,
|
|
dbo.tb_Plan_243.OrderCount,dbo.tb_Plan_243.IsFinish,dbo.tb_Plan_243.CompleteCount
|
|
FROM dbo.tb_Plan_243 LEFT OUTER JOIN
|
|
dbo.tb_Mistake_243 ON dbo.tb_Plan_243.PartNo = dbo.tb_Mistake_243.PartNo2
|
|
where dbo.tb_Plan_243.OrderNo=@OrderNo
|
|
ORDER BY dbo.tb_Plan_243.CreateTime";
|
|
SqlParameter[] param = new SqlParameter[1];
|
|
|
|
param[0] = new SqlParameter("@OrderNo", SqlDbType.VarChar);
|
|
param[0].Value = OrderNo;
|
|
|
|
return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0];
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public DataTable DetailOrderNo(string OrderNo)
|
|
{
|
|
try
|
|
{
|
|
string sql = @"SELECT dbo.tb_Plan_243.Item, dbo.tb_Plan_243.PartNo, dbo.tb_Mistake_243.PartName2,
|
|
dbo.tb_Plan_243.OrderCount
|
|
FROM dbo.tb_Plan_243 LEFT OUTER JOIN
|
|
dbo.tb_Mistake_243 ON dbo.tb_Plan_243.PartNo = dbo.tb_Mistake_243.PartNo2
|
|
where dbo.tb_Plan_243.OrderNo=@OrderNo
|
|
ORDER BY dbo.tb_Plan_243.CreateTime";
|
|
SqlParameter[] param = new SqlParameter[1];
|
|
|
|
param[0] = new SqlParameter("@OrderNo", SqlDbType.VarChar);
|
|
param[0].Value = OrderNo;
|
|
|
|
return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0];
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|