You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ProductionSystem/ProductionSystem_Service/TResult2Service.cs

42 lines
1.2 KiB
C#

using ProductionSystem_Log;
using ProductionSystem_Model.DbModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProductionSystem_Service
{
public class TResult2Service : DbContext
{
/// <summary>
/// 新增
/// </summary>
/// <param name="t_Result2"></param>
/// <returns></returns>
public int AddTResult2(T_Result2 t_Result2)
{
try
{
return db.Insertable(t_Result2).ExecuteCommand();
}catch (Exception ex)
{
LogHelper.Error(ex, "执行TResult2Service下AddTResult2时异常");
return -1;
}
}
/// <summary>
/// 根据产品类型和产品条码查询
/// </summary>
/// <param name="productType"></param>
/// <param name="productBarcode"></param>
/// <returns></returns>
public T_Result2 QueryLatestStep(string productType,string productBarcode)
{
return db.Queryable<T_Result2>().Where(m => m.ProductType == productType && m.ProductBarcode == productBarcode).First();
}
}
}