using iWare_SCADA_BusinessLogical.DLA.Dao;
|
using iWare_SCADA_Model;
|
using log4net;
|
using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
|
namespace iWare_SCADA_BusinessLogical.BLL
|
{
|
public class WorkPieceLogManager//: CommonService<WorkPieceLog, WorkPieceLog,DbModel>
|
{
|
public static List<WorkPieceLog> GetWorkPieceLog(string WorkPieceID)
|
{
|
using (DbModel db = new DbModel())
|
{
|
//查询所有
|
var query = db.WorkPieceLog.Where(o=>o.WorkPieceID== WorkPieceID).ToList();
|
return query;
|
}
|
}
|
|
|
public static long InsertWorkPieceLog(WorkPieceLog workPiece)
|
{
|
using (DbModel db = new DbModel())
|
{
|
db.WorkPieceLog.Add(workPiece);
|
db.SaveChanges();
|
return workPiece.Id;
|
}
|
}
|
|
|
|
}
|
}
|