一厂MES,含注塑,喷涂,冲孔
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.
 
 
 
 
 

343 lines
9.2 KiB

using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using MESClassLibrary.BLL.Log;
using MESClassLibrary.DAL.BasicInfo;
using MESClassLibrary.Model;
namespace MESClassLibrary.BLL.BasicInfo
{
public class BarCodeBLL
{
BarCodeDAl db = new BarCodeDAl();
public DataTable SearchInfoByStock(string StockNo)
{
try
{
return db.SearchInfoByStock(StockNo);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return null;
}
}
public DataTable SearchInfoByPartNo(string partNo)
{
try
{
return db.SearchInfoByPartNo(partNo);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return null;
}
}
public DataTable searchBarCode(string barcode, int flag)
{
try
{
return db.searchBarCode(barcode, flag);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return null;
}
}
public bool Add_Info(BarCodeModel md)
{
try
{
return db.AddInfo(md);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return false;
}
}
public bool Add_Info_New(BarCodeModel md,string tableName)
{
try
{
return db.AddInfoNew(md,tableName);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return false;
}
}
public DataTable SearchInfo(string stationNo)
{
try
{
return db.SearchInfo(stationNo);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return null;
}
}
public DataTable SearchInfoAll()
{
try
{
return db.SearchInfoAll();
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return null;
}
}
public DataTable SearchBarCode()
{
try
{
return db.SearchBarCode();
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return null;
}
}
public DataTable SearchBarCodeByOne(string OneBarCode)
{
try
{
return db.SearchBarCodeByOne(OneBarCode);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return null;
}
}
public DataTable SearchBarCodeByTwo(string BarCode)
{
try
{
return db.SearchBarCodeByTwo(BarCode);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return null;
}
}
public DataTable SearchSerialNoByBarCode(string Code)
{
try
{
return db.SearchSerialNoByBarCode(Code);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return null;
}
}
public DataTable SearchSerialNoByBarCodeNew(string Code,string tableName)
{
try
{
return db.SearchSerialNoByBarCodeNew(Code, tableName);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return null;
}
}
public DataTable SearchInfoByBarCode(string BarCode)
{
try
{
return db.SearchInfoByBarCode(BarCode);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return null;
}
}
public DataTable SearchInfoByBarCodeNew(string BarCode,string tableName)
{
try
{
return db.SearchInfoByBarCodeNew(BarCode, tableName);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return null;
}
}
public bool Update_Info(BarCodeModel md)
{
try
{
return db.UpdateInfo(md);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return false;
}
}
public bool DelBarCode(BarCodeModel md)
{
try
{
return db.DelBarCode(md);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return false;
}
}
public bool DelBarCode_New(BarCodeModel md,string tableName)
{
try
{
return db.DelBarCode_New(md,tableName);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return false;
}
}
public DataTable SearchBoxIsNull(string partNo, string StationID, string tableName, string ProductNature)
{
try
{
return db.SearchBoxIsNull(partNo, StationID, tableName, ProductNature);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return null;
}
}
public DataTable IsHave(string partNo, string StationID, string tableName)
{
try
{
return db.IsHave(partNo, StationID, tableName);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return null;
}
}
public bool UpdateBoxNo(string tableName, string boxNo, string partNo)
{
try
{
return db.UpdateBoxNo(tableName, boxNo, partNo);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return false;
}
}
public DataTable SearchCountByBox(string boxNo, string tableName)
{
try
{
return db.SearchCountByBox(boxNo, tableName);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return null;
}
}
public bool UpdateIsBad(string tableName, string onebarcode, string barcode)
{
try
{
return db.UpdateIsBad(tableName, onebarcode, barcode);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return false;
}
}
public DataTable SearchBarCode(string boxNo, string tableName, string row)
{
try
{
return db.SearchBarCode(boxNo, tableName, row);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return null;
}
}
public bool updateProductNature(string tableName, string barcode)
{
try
{
return db.updateProductNature(tableName, barcode);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return false;
}
}
public DataTable SeachInfoByOne(string barCode, string tableName,int flag)
{
try
{
return db.SeachInfoByOne(barCode, tableName, flag);
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return null;
}
}
}
}