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.
218 lines
5.8 KiB
218 lines
5.8 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.Mistake247;
|
|
using MESClassLibrary.Model;
|
|
|
|
namespace MESClassLibrary.BLL.Mistake247
|
|
{
|
|
public class AssemblyBLL
|
|
{
|
|
public bool AddInfo(AssemblyModel md)
|
|
{
|
|
AssemblyDAL da = new AssemblyDAL();
|
|
try
|
|
{
|
|
return da.AddInfo(md);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
|
|
return false;
|
|
}
|
|
}
|
|
|
|
public bool UpdateInfo(AssemblyModel md)
|
|
{
|
|
AssemblyDAL da = new AssemblyDAL();
|
|
try
|
|
{
|
|
return da.UpdateInfo(md);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
|
|
return false;
|
|
}
|
|
}
|
|
|
|
public DataTable SearchCount( string PartNo)
|
|
{
|
|
AssemblyDAL da = new AssemblyDAL();
|
|
try
|
|
{
|
|
return da.SearchCount(PartNo);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public bool UpdatePrintFlag(AssemblyModel md)
|
|
{
|
|
AssemblyDAL da = new AssemblyDAL();
|
|
try
|
|
{
|
|
return da.UpdatePrintFlag(md);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
|
|
return false;
|
|
}
|
|
}
|
|
|
|
public bool UpdatePrintFlag1(string partno)
|
|
{
|
|
AssemblyDAL da = new AssemblyDAL();
|
|
try
|
|
{
|
|
return da.UpdatePrintFlag1(partno);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
|
|
return false;
|
|
}
|
|
}
|
|
|
|
public DataTable searchPartNo(string partno)
|
|
{
|
|
AssemblyDAL da = new AssemblyDAL();
|
|
try
|
|
{
|
|
return da.searchPartNo(partno);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
//LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
|
|
|
|
//return null;
|
|
}
|
|
}
|
|
|
|
public DataTable IsVisual(string barcode)
|
|
{
|
|
AssemblyDAL da = new AssemblyDAL();
|
|
try
|
|
{
|
|
return da.IsVisual(barcode);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public DataTable SearchPrintByDeviceNo(string DeviceNo1)
|
|
{
|
|
AssemblyDAL da = new AssemblyDAL();
|
|
try
|
|
{
|
|
return da.SearchPrintByDeviceNo( DeviceNo1);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogErrBLL.AddInfo(ex.ToString(),MethodBase.GetCurrentMethod());
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public DataTable GetDeviceNo(string DeviceNo1, string DeviceNo2, string DeviceNo3, string DeviceNo4)
|
|
{
|
|
AssemblyDAL da = new AssemblyDAL();
|
|
try
|
|
{
|
|
return da.GetDeviceNo(DeviceNo1, DeviceNo2, DeviceNo3, DeviceNo4);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public DataTable IsHavePrint(string DeviceNo1, string DeviceNo2, string DeviceNo3, string DeviceNo4)
|
|
{
|
|
AssemblyDAL da = new AssemblyDAL();
|
|
try
|
|
{
|
|
return da.IsHavePrint(DeviceNo1, DeviceNo2, DeviceNo3, DeviceNo4);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public bool UpdatePrintByID(string id)
|
|
{
|
|
AssemblyDAL da = new AssemblyDAL();
|
|
try
|
|
{
|
|
return da.UpdatePrintByID(id);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogErrBLL.AddInfo(ex.ToString(),MethodBase.GetCurrentMethod());
|
|
return false;
|
|
}
|
|
}
|
|
|
|
#region 243
|
|
|
|
public DataTable searchPartNo1(string partno)
|
|
{
|
|
AssemblyDAL da = new AssemblyDAL();
|
|
try
|
|
{
|
|
return da.searchPartNo1(partno);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public bool AddInfo1(AssemblyModel md)
|
|
{
|
|
AssemblyDAL da = new AssemblyDAL();
|
|
try
|
|
{
|
|
return da.AddInfo1(md);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
|
|
return false;
|
|
}
|
|
}
|
|
|
|
public bool UpdateInfo1(AssemblyModel md)
|
|
{
|
|
AssemblyDAL da = new AssemblyDAL();
|
|
try
|
|
{
|
|
return da.UpdateInfo(md);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
|
|
return false;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
}
|
|
|