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.1 KiB
42 lines
1.1 KiB
3 months ago
|
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.ZPPlan
|
||
|
{
|
||
|
public class ScanRecordDAL
|
||
|
{
|
||
|
public int IsScan(string barcode, string stationID)
|
||
|
{
|
||
|
try
|
||
|
{
|
||
|
int res = 0;
|
||
|
|
||
|
string sql = @"select * from tb_ScanRecord where BarCode='" + barcode + @"'";
|
||
|
|
||
|
if (!string.IsNullOrEmpty(stationID))
|
||
|
{
|
||
|
sql += @" and StationID ='"+ stationID+ @"'";
|
||
|
}
|
||
|
|
||
|
DataTable dt = SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null).Tables[0];
|
||
|
if (dt != null && dt.Rows.Count > 0)
|
||
|
{
|
||
|
res = dt.Rows.Count;
|
||
|
}
|
||
|
|
||
|
return res;
|
||
|
}
|
||
|
catch (Exception ex)
|
||
|
{
|
||
|
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
|
||
|
return 0;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|