56 lines
2.5 KiB
C#
56 lines
2.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
|
|
namespace BLL
|
|
{
|
|
public static class PersonSteelService
|
|
{
|
|
|
|
/// <summary>
|
|
/// 添加
|
|
/// </summary>
|
|
/// <param name="DataReceiving"></param>
|
|
public static void AddDInspectionPersonItem(Model.Comprehensive_InspectionPersonSteel InspectionPersonItem)
|
|
{
|
|
Model.SGGLDB db = Funs.DB;
|
|
Model.Comprehensive_InspectionPersonSteel newInspectionPersonItem = new Model.Comprehensive_InspectionPersonSteel();
|
|
newInspectionPersonItem.InspectionPersonId = InspectionPersonItem.InspectionPersonId;
|
|
newInspectionPersonItem.InspectionPersonSteelId = InspectionPersonItem.InspectionPersonSteelId;
|
|
newInspectionPersonItem.SteelId = InspectionPersonItem.SteelId;
|
|
newInspectionPersonItem.SizesMax = InspectionPersonItem.SizesMax;
|
|
newInspectionPersonItem.SizesMin = InspectionPersonItem.SizesMin;
|
|
newInspectionPersonItem.ThicknessMax = InspectionPersonItem.ThicknessMax;
|
|
newInspectionPersonItem.ThicknessMin = InspectionPersonItem.ThicknessMin;
|
|
newInspectionPersonItem.IsChecked = InspectionPersonItem.IsChecked;
|
|
|
|
db.Comprehensive_InspectionPersonSteel.InsertOnSubmit(newInspectionPersonItem);
|
|
db.SubmitChanges();
|
|
}
|
|
/// <summary>
|
|
/// 根据主键删除资料接收登记
|
|
/// </summary>
|
|
/// <param name="specialDataReceivingId"></param>
|
|
public static void DelPersonItem(string InspectionPersonId)
|
|
{
|
|
Model.SGGLDB db = Funs.DB;
|
|
List<Model.Comprehensive_InspectionPersonSteel> InspectionPerson = (from x in db.Comprehensive_InspectionPersonSteel where x.InspectionPersonId == InspectionPersonId select x).ToList();
|
|
if (InspectionPerson != null)
|
|
{
|
|
db.Comprehensive_InspectionPersonSteel.DeleteAllOnSubmit(InspectionPerson);
|
|
db.SubmitChanges();
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// 获取对象
|
|
/// </summary>
|
|
/// <param name="InspectionPersonWeldMethodId"></param>
|
|
/// <returns></returns>
|
|
public static Model.Comprehensive_InspectionPersonSteel getInspectionPersonSteelBySteelId(string SteelId, string InspectionPersonId)
|
|
{
|
|
return (from x in Funs.DB.Comprehensive_InspectionPersonSteel where x.SteelId == SteelId && x.InspectionPersonId==InspectionPersonId select x).FirstOrDefault();
|
|
}
|
|
}
|
|
}
|