36 lines
938 B
C#
36 lines
938 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using EAS.Services;
|
|
using SOH.Entities;
|
|
using SOH.Data;
|
|
|
|
namespace SOH.BLL
|
|
{
|
|
[ServiceObject("查体项目表")]
|
|
[ServiceBind(typeof(It_tjjg))]
|
|
public class t_tjjgBll : It_tjjg
|
|
{
|
|
public Data.OperationResult Update(t_tjjg tjjg)
|
|
{
|
|
OperationResult or = new OperationResult();
|
|
using (DbEntities db = new DbEntities())
|
|
{
|
|
int count = db.t_tjjgs.Where(t => t.tm == tjjg.tm && t.xmbm == tjjg.xmbm).Count();
|
|
if (count == 0)
|
|
{
|
|
db.t_tjjgs.OrmAccessor.Insert(tjjg);
|
|
}
|
|
else
|
|
{
|
|
db.t_tjjgs.OrmAccessor.Update(tjjg);
|
|
}
|
|
}
|
|
or.State = 1;
|
|
or.Message = "临时保存成功";
|
|
return or;
|
|
}
|
|
}
|
|
}
|