using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace BLL { /// /// 检测报告打印 /// public static class HJGL_TestingReportPrintService { /// /// 根据管线ID、规格、检测类型、批明细ID获取检测报表打印表信息 /// /// /// /// /// /// public static Model.HJGL_CH_TestingReportPrint GetTestingReportPrint(string isoId, string specifications, string ndtId, string batchId, string ste_id, string ste_id2, string wme_id) { Model.SGGLDB db = Funs.DB; return db.HJGL_CH_TestingReportPrint.FirstOrDefault(e => e.ISO_ID == isoId && e.Specifications == specifications && e.NDT_ID == ndtId && e.BatchId == batchId && e.STE_ID == ste_id && e.STE_ID2 == ste_id2 && e.WME_ID == wme_id); } /// /// 添加检测报表打印 /// /// public static void AddTestingReportPrint(Model.HJGL_CH_TestingReportPrint testingReportPrint) { Model.SGGLDB db = Funs.DB; Model.HJGL_CH_TestingReportPrint newTestingReportPrint = new Model.HJGL_CH_TestingReportPrint(); newTestingReportPrint.TestingReportPrintId = testingReportPrint.TestingReportPrintId; newTestingReportPrint.ISO_ID = testingReportPrint.ISO_ID; newTestingReportPrint.ProjectId = testingReportPrint.ProjectId; newTestingReportPrint.Specifications = testingReportPrint.Specifications; newTestingReportPrint.NDT_ID = testingReportPrint.NDT_ID; newTestingReportPrint.BatchId = testingReportPrint.BatchId; newTestingReportPrint.STE_ID = testingReportPrint.STE_ID; newTestingReportPrint.STE_ID2 = testingReportPrint.STE_ID2; newTestingReportPrint.WME_ID = testingReportPrint.WME_ID; newTestingReportPrint.ReportCode = testingReportPrint.ReportCode; newTestingReportPrint.ContractUnitId = testingReportPrint.ContractUnitId; newTestingReportPrint.JotyName = testingReportPrint.JotyName; newTestingReportPrint.RT_TechnicalGrade = testingReportPrint.RT_TechnicalGrade; newTestingReportPrint.RT_FocalSize = testingReportPrint.RT_FocalSize; newTestingReportPrint.RT_TubeCurrent = testingReportPrint.RT_TubeCurrent; newTestingReportPrint.RT_SourceType = testingReportPrint.RT_SourceType; newTestingReportPrint.RT_FilmDensity = testingReportPrint.RT_FilmDensity; newTestingReportPrint.RT_DeveloperTemperature = testingReportPrint.RT_DeveloperTemperature; newTestingReportPrint.RT_DeveloperTime = testingReportPrint.RT_DeveloperTime; newTestingReportPrint.PT_SurfaceState = testingReportPrint.PT_SurfaceState; newTestingReportPrint.PT_PenetrantGrade = testingReportPrint.PT_PenetrantGrade; newTestingReportPrint.PT_CleaningGrade = testingReportPrint.PT_CleaningGrade; newTestingReportPrint.PT_ImagingGrade = testingReportPrint.PT_ImagingGrade; newTestingReportPrint.PT_OsmoticTemperature = testingReportPrint.PT_OsmoticTemperature; newTestingReportPrint.PT_ImposingMethod = testingReportPrint.PT_ImposingMethod; newTestingReportPrint.PT_ObservationMethod = testingReportPrint.PT_ObservationMethod; newTestingReportPrint.PT_SensitivityTestBlock = testingReportPrint.PT_SensitivityTestBlock; newTestingReportPrint.PT_PermeationTime = testingReportPrint.PT_PermeationTime; newTestingReportPrint.PT_ImagingTime = testingReportPrint.PT_ImagingTime; newTestingReportPrint.MT_SurfaceState = testingReportPrint.MT_SurfaceState; newTestingReportPrint.MT_SensitivityTestBlock = testingReportPrint.MT_SensitivityTestBlock; newTestingReportPrint.MT_CurrentType = testingReportPrint.MT_CurrentType; newTestingReportPrint.MT_LiftingPower = testingReportPrint.MT_LiftingPower; newTestingReportPrint.MT_MagnetizationTime = testingReportPrint.MT_MagnetizationTime; newTestingReportPrint.MT_MagneticPowderType = testingReportPrint.MT_MagneticPowderType; newTestingReportPrint.MT_Concentration = testingReportPrint.MT_Concentration; newTestingReportPrint.MT_ImposingMethod = testingReportPrint.MT_ImposingMethod; newTestingReportPrint.MT_TestMethod = testingReportPrint.MT_TestMethod; newTestingReportPrint.UT_TechnicalGrade = testingReportPrint.UT_TechnicalGrade; newTestingReportPrint.UT_DetectionSurface = testingReportPrint.UT_DetectionSurface; newTestingReportPrint.UT_SurfaceState = testingReportPrint.UT_SurfaceState; newTestingReportPrint.UT_StandardTestBlock = testingReportPrint.UT_StandardTestBlock; newTestingReportPrint.UT_StandardTestBlock2 = testingReportPrint.UT_StandardTestBlock2; newTestingReportPrint.UT_ProbeType = testingReportPrint.UT_ProbeType; newTestingReportPrint.UT_SurfaceCompensation = testingReportPrint.UT_SurfaceCompensation; newTestingReportPrint.UT_ScanningRate = testingReportPrint.UT_ScanningRate; newTestingReportPrint.UT_DetectionSensitivity = testingReportPrint.UT_DetectionSensitivity; newTestingReportPrint.UT_CouplingAgent = testingReportPrint.UT_CouplingAgent; newTestingReportPrint.TestingTime = testingReportPrint.TestingTime; newTestingReportPrint.TransilluminationMode = testingReportPrint.TransilluminationMode; newTestingReportPrint.FilmModel = testingReportPrint.FilmModel; newTestingReportPrint.IntensifyingWay = testingReportPrint.IntensifyingWay; newTestingReportPrint.TubeVoltage = testingReportPrint.TubeVoltage; newTestingReportPrint.SourceActivity = testingReportPrint.SourceActivity; newTestingReportPrint.ImageQualityModel = testingReportPrint.ImageQualityModel; newTestingReportPrint.WireDiameterCode = testingReportPrint.WireDiameterCode; newTestingReportPrint.FocalLength = testingReportPrint.FocalLength; newTestingReportPrint.ExposureTime = testingReportPrint.ExposureTime; newTestingReportPrint.EffectiveLength = testingReportPrint.EffectiveLength; newTestingReportPrint.EquipmentCode = testingReportPrint.EquipmentCode; newTestingReportPrint.EquipmentName = testingReportPrint.EquipmentName; newTestingReportPrint.Type = testingReportPrint.Type; newTestingReportPrint.Printer = testingReportPrint.Printer; newTestingReportPrint.PrintTime = testingReportPrint.PrintTime; newTestingReportPrint.HotProessState = testingReportPrint.HotProessState; newTestingReportPrint.TestBlock = testingReportPrint.TestBlock; newTestingReportPrint.PoleSpacing = testingReportPrint.PoleSpacing; db.HJGL_CH_TestingReportPrint.InsertOnSubmit(newTestingReportPrint); db.SubmitChanges(); } /// /// 修改检测报告打印 /// /// public static void UpdateTestingReportPrint(Model.HJGL_CH_TestingReportPrint testingReportPrint) { Model.SGGLDB db = Funs.DB; Model.HJGL_CH_TestingReportPrint newTestingReportPrint = db.HJGL_CH_TestingReportPrint.FirstOrDefault(e => e.TestingReportPrintId == testingReportPrint.TestingReportPrintId); if (newTestingReportPrint != null) { newTestingReportPrint.STE_ID = testingReportPrint.STE_ID; newTestingReportPrint.STE_ID2 = testingReportPrint.STE_ID2; newTestingReportPrint.WME_ID = testingReportPrint.WME_ID; newTestingReportPrint.ReportCode = testingReportPrint.ReportCode; newTestingReportPrint.ContractUnitId = testingReportPrint.ContractUnitId; newTestingReportPrint.JotyName = testingReportPrint.JotyName; newTestingReportPrint.RT_TechnicalGrade = testingReportPrint.RT_TechnicalGrade; newTestingReportPrint.RT_FocalSize = testingReportPrint.RT_FocalSize; newTestingReportPrint.RT_TubeCurrent = testingReportPrint.RT_TubeCurrent; newTestingReportPrint.RT_SourceType = testingReportPrint.RT_SourceType; newTestingReportPrint.RT_FilmDensity = testingReportPrint.RT_FilmDensity; newTestingReportPrint.RT_DeveloperTemperature = testingReportPrint.RT_DeveloperTemperature; newTestingReportPrint.RT_DeveloperTime = testingReportPrint.RT_DeveloperTime; newTestingReportPrint.PT_SurfaceState = testingReportPrint.PT_SurfaceState; newTestingReportPrint.PT_PenetrantGrade = testingReportPrint.PT_PenetrantGrade; newTestingReportPrint.PT_CleaningGrade = testingReportPrint.PT_CleaningGrade; newTestingReportPrint.PT_ImagingGrade = testingReportPrint.PT_ImagingGrade; newTestingReportPrint.PT_OsmoticTemperature = testingReportPrint.PT_OsmoticTemperature; newTestingReportPrint.PT_ImposingMethod = testingReportPrint.PT_ImposingMethod; newTestingReportPrint.PT_ObservationMethod = testingReportPrint.PT_ObservationMethod; newTestingReportPrint.PT_SensitivityTestBlock = testingReportPrint.PT_SensitivityTestBlock; newTestingReportPrint.PT_PermeationTime = testingReportPrint.PT_PermeationTime; newTestingReportPrint.PT_ImagingTime = testingReportPrint.PT_ImagingTime; newTestingReportPrint.MT_SurfaceState = testingReportPrint.MT_SurfaceState; newTestingReportPrint.MT_SensitivityTestBlock = testingReportPrint.MT_SensitivityTestBlock; newTestingReportPrint.MT_CurrentType = testingReportPrint.MT_CurrentType; newTestingReportPrint.MT_LiftingPower = testingReportPrint.MT_LiftingPower; newTestingReportPrint.MT_MagnetizationTime = testingReportPrint.MT_MagnetizationTime; newTestingReportPrint.MT_MagneticPowderType = testingReportPrint.MT_MagneticPowderType; newTestingReportPrint.MT_Concentration = testingReportPrint.MT_Concentration; newTestingReportPrint.MT_ImposingMethod = testingReportPrint.MT_ImposingMethod; newTestingReportPrint.MT_TestMethod = testingReportPrint.MT_TestMethod; newTestingReportPrint.UT_TechnicalGrade = testingReportPrint.UT_TechnicalGrade; newTestingReportPrint.UT_DetectionSurface = testingReportPrint.UT_DetectionSurface; newTestingReportPrint.UT_SurfaceState = testingReportPrint.UT_SurfaceState; newTestingReportPrint.UT_StandardTestBlock = testingReportPrint.UT_StandardTestBlock; newTestingReportPrint.UT_StandardTestBlock2 = testingReportPrint.UT_StandardTestBlock2; newTestingReportPrint.UT_ProbeType = testingReportPrint.UT_ProbeType; newTestingReportPrint.UT_SurfaceCompensation = testingReportPrint.UT_SurfaceCompensation; newTestingReportPrint.UT_ScanningRate = testingReportPrint.UT_ScanningRate; newTestingReportPrint.UT_DetectionSensitivity = testingReportPrint.UT_DetectionSensitivity; newTestingReportPrint.UT_CouplingAgent = testingReportPrint.UT_CouplingAgent; newTestingReportPrint.TestingTime = testingReportPrint.TestingTime; newTestingReportPrint.TransilluminationMode = testingReportPrint.TransilluminationMode; newTestingReportPrint.FilmModel = testingReportPrint.FilmModel; newTestingReportPrint.IntensifyingWay = testingReportPrint.IntensifyingWay; newTestingReportPrint.TubeVoltage = testingReportPrint.TubeVoltage; newTestingReportPrint.SourceActivity = testingReportPrint.SourceActivity; newTestingReportPrint.ImageQualityModel = testingReportPrint.ImageQualityModel; newTestingReportPrint.WireDiameterCode = testingReportPrint.WireDiameterCode; newTestingReportPrint.FocalLength = testingReportPrint.FocalLength; newTestingReportPrint.ExposureTime = testingReportPrint.ExposureTime; newTestingReportPrint.EffectiveLength = testingReportPrint.EffectiveLength; newTestingReportPrint.EquipmentCode = testingReportPrint.EquipmentCode; newTestingReportPrint.EquipmentName = testingReportPrint.EquipmentName; newTestingReportPrint.Printer = testingReportPrint.Printer; newTestingReportPrint.PrintTime = testingReportPrint.PrintTime; newTestingReportPrint.HotProessState = testingReportPrint.HotProessState; newTestingReportPrint.TestBlock = testingReportPrint.TestBlock; newTestingReportPrint.PoleSpacing = testingReportPrint.PoleSpacing; db.SubmitChanges(); } } } }