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.
44 lines
1.5 KiB
44 lines
1.5 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using System.Reflection;
|
|
using System.Text;
|
|
using MESClassLibrary.BLL.Log;
|
|
|
|
namespace MESClassLibrary.DAL.Injection
|
|
{
|
|
public class PLCBreakDAL
|
|
{
|
|
public DataTable SearchBreak()
|
|
{
|
|
try
|
|
{
|
|
string sql = @"select * from tb_PLC_Break order by ID";
|
|
|
|
return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null).Tables[0];
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public bool SavePlcReceive(string stationNo,int TransactionID, int NumItems ,string partCode1,string planCode,string pageType )
|
|
{
|
|
try
|
|
{
|
|
string sql2 = $"insert into tb_PlcReceiveRecords(StationNo,TransactionID,NumItems,PartCode1,PlanCode,PageType)" +
|
|
$" values ('{stationNo}','{TransactionID}','{NumItems}','{partCode1}','{planCode}','{pageType}' )";
|
|
SqlHelper.ExecuteNonQuery(SqlHelper.GetConnSting(), CommandType.Text, sql2, null);
|
|
return true;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogErrBLL.AddInfo(stationNo + "记录设备接收信号次数记录错误. " +ex.ToString(), MethodBase.GetCurrentMethod());
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|