52 lines
2.4 KiB
C#
52 lines
2.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
|
|
namespace BLL
|
|
{
|
|
public static class PersonWeldMethodService
|
|
{
|
|
|
|
/// <summary>
|
|
/// 添加
|
|
/// </summary>
|
|
/// <param name="DataReceiving"></param>
|
|
public static void AddInspectionPersonWeldMethod(Model.Comprehensive_InspectionPersonWeldMethod InspectionPersonWeldMethod)
|
|
{
|
|
Model.SGGLDB db = Funs.DB;
|
|
Model.Comprehensive_InspectionPersonWeldMethod newInspectionPersonWeldMethod = new Model.Comprehensive_InspectionPersonWeldMethod();
|
|
newInspectionPersonWeldMethod.InspectionPersonId = InspectionPersonWeldMethod.InspectionPersonId;
|
|
newInspectionPersonWeldMethod.InspectionPersonWeldMethodId = InspectionPersonWeldMethod.InspectionPersonWeldMethodId;
|
|
newInspectionPersonWeldMethod.WeldMethodId = InspectionPersonWeldMethod.WeldMethodId;
|
|
newInspectionPersonWeldMethod.IsChecked = InspectionPersonWeldMethod.IsChecked;
|
|
|
|
db.Comprehensive_InspectionPersonWeldMethod.InsertOnSubmit(newInspectionPersonWeldMethod);
|
|
db.SubmitChanges();
|
|
}
|
|
/// <summary>
|
|
/// 根据主键删除资料接收登记
|
|
/// </summary>
|
|
/// <param name="specialDataReceivingId"></param>
|
|
public static void DelInspectionPersonWeldMethod(string InspectionPersonId)
|
|
{
|
|
Model.SGGLDB db = Funs.DB;
|
|
List<Model.Comprehensive_InspectionPersonWeldMethod> InspectionPerson = (from x in db.Comprehensive_InspectionPersonWeldMethod where x.InspectionPersonId == InspectionPersonId select x).ToList();
|
|
if (InspectionPerson != null)
|
|
{
|
|
db.Comprehensive_InspectionPersonWeldMethod.DeleteAllOnSubmit(InspectionPerson);
|
|
db.SubmitChanges();
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取对象
|
|
/// </summary>
|
|
/// <param name="InspectionPersonWeldMethodId"></param>
|
|
/// <returns></returns>
|
|
public static Model.Comprehensive_InspectionPersonWeldMethod getInspectionPersonWeldMethodByWeldMethodId(string WeldMethodId, string InspectionPersonId)
|
|
{
|
|
return (from x in Funs.DB.Comprehensive_InspectionPersonWeldMethod where x.WeldMethodId == WeldMethodId && x.InspectionPersonId == InspectionPersonId select x).FirstOrDefault();
|
|
}
|
|
}
|
|
} |