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.
47 lines
1.3 KiB
47 lines
1.3 KiB
3 months ago
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
using System.Linq;
|
||
|
using System.Reflection;
|
||
|
using System.Text;
|
||
|
using MESClassLibrary.BLL.Log;
|
||
|
using MESClassLibrary.DAL.TruckBox;
|
||
|
using MESClassLibrary.EFModel;
|
||
|
|
||
|
namespace MESClassLibrary.BLL.TruckBox
|
||
|
{
|
||
|
public class InspectionBLL
|
||
|
{
|
||
|
InspectionDAL da=new InspectionDAL();
|
||
|
BasicBLL<tb_Inspection_tx> db=new BasicBLL<tb_Inspection_tx>();
|
||
|
|
||
|
public bool AddInfo(tb_Inspection_tx md)
|
||
|
{
|
||
|
try
|
||
|
{
|
||
|
return da.AddInfo(md);
|
||
|
}
|
||
|
catch (Exception ex)
|
||
|
{
|
||
|
LogErrBLL.AddInfo(ex.ToString(),MethodBase.GetCurrentMethod());
|
||
|
return false;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public List<tb_Inspection_tx> SearchInfoByBarCode(string barCode)
|
||
|
{
|
||
|
try
|
||
|
{
|
||
|
//return Tool.ConvertTo< tb_Inspection_tx >(da.SearchInfoByCode(barCode)).ToList();
|
||
|
return db.SearchAllInfo().Where(p => p.BarCode==barCode).OrderByDescending(p => p.ID).Take(1)
|
||
|
.ToList();
|
||
|
|
||
|
}
|
||
|
catch (Exception ex)
|
||
|
{
|
||
|
LogErrBLL.AddInfo(ex.ToString(),MethodBase.GetCurrentMethod());
|
||
|
return null;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|