using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace BLL { public static class PersonWeldMethodService { /// /// 添加 /// /// 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(); } /// /// 根据主键删除资料接收登记 /// /// public static void DelInspectionPersonWeldMethod(string InspectionPersonId) { Model.SGGLDB db = Funs.DB; List InspectionPerson = (from x in db.Comprehensive_InspectionPersonWeldMethod where x.InspectionPersonId == InspectionPersonId select x).ToList(); if (InspectionPerson != null) { db.Comprehensive_InspectionPersonWeldMethod.DeleteAllOnSubmit(InspectionPerson); db.SubmitChanges(); } } /// /// 获取对象 /// /// /// 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(); } } }