70 lines
2.1 KiB
C#
70 lines
2.1 KiB
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_bwwh))]
|
|
public class t_bwwhBll : It_bwwh
|
|
{
|
|
public List<t_bwwh> getAllBwwh(int jcxm)
|
|
{
|
|
using (DbEntities db = new DbEntities())
|
|
{
|
|
var data = from db1 in db.t_bwwhs where db1.jcxm == jcxm select db1;
|
|
return data.OrderBy(t => t.xssx).ToList();
|
|
}
|
|
}
|
|
|
|
public List<t_bwwh> getAllBwwhIn(int[] jcxm)
|
|
{
|
|
using (DbEntities db = new DbEntities())
|
|
{
|
|
var data = from db1 in db.t_bwwhs where jcxm.Contains(db1.jcxm) select db1;
|
|
return data.OrderBy(t => t.xssx).ToList();
|
|
}
|
|
}
|
|
public OperationResult Update(t_bwwh bw)
|
|
{
|
|
using (DbEntities db = new DbEntities())
|
|
{
|
|
db.t_bwwhs.OrmAccessor.Update(bw);
|
|
}
|
|
OperationResult or = new OperationResult();
|
|
or.State = 1;
|
|
or.Message = "修改成功";
|
|
or.Tag = Newtonsoft.Json.JsonConvert.SerializeObject(bw);
|
|
return or;
|
|
}
|
|
public OperationResult Insert(t_bwwh bw)
|
|
{
|
|
using (DbEntities db = new DbEntities())
|
|
{
|
|
db.t_bwwhs.OrmAccessor.Insert(bw);
|
|
}
|
|
OperationResult or = new OperationResult();
|
|
or.State = 1;
|
|
or.Message = "添加成功";
|
|
or.Tag = Newtonsoft.Json.JsonConvert.SerializeObject(bw);
|
|
return or;
|
|
}
|
|
public OperationResult Delete(t_bwwh bw)
|
|
{
|
|
using (DbEntities db = new DbEntities())
|
|
{
|
|
db.t_bwwhs.OrmAccessor.Delete(bw);
|
|
}
|
|
OperationResult or = new OperationResult();
|
|
or.State = 1;
|
|
or.Message = "删除成功";
|
|
or.Tag = Newtonsoft.Json.JsonConvert.SerializeObject(bw);
|
|
return or;
|
|
}
|
|
}
|
|
}
|