数据库变更CNPC_XJYJ

This commit is contained in:
2025-08-04 18:04:41 +08:00
parent bafbf97359
commit 79a7f35e22
679 changed files with 5590 additions and 3465 deletions
@@ -21,7 +21,7 @@
/// <param name="Components"></param>
public static void AddComponents(Model.Base_Components components)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_Components newComponents = new Base_Components
{
ComponentsId = components.ComponentsId,
@@ -40,7 +40,7 @@
/// <param name="Components"></param>
public static void UpdateComponents(Model.Base_Components components)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_Components newComponents = db.Base_Components.FirstOrDefault(e => e.ComponentsId == components.ComponentsId);
if (newComponents != null)
{
@@ -58,7 +58,7 @@
/// <param name="ComponentsId"></param>
public static void DeleteComponentsByComponentsId(string componentsId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_Components delComponents = db.Base_Components.FirstOrDefault(e => e.ComponentsId == componentsId);
if (delComponents != null)
{
@@ -21,7 +21,7 @@
/// <param name="consumables"></param>
public static void AddConsumables(Model.Base_Consumables consumables)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_Consumables newConsumables = new Base_Consumables
{
ConsumablesId = consumables.ConsumablesId,
@@ -47,7 +47,7 @@
/// <param name="consumables"></param>
public static void UpdateConsumables(Model.Base_Consumables consumables)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_Consumables newConsumables = db.Base_Consumables.FirstOrDefault(e => e.ConsumablesId == consumables.ConsumablesId);
if (newConsumables != null)
{
@@ -71,7 +71,7 @@
/// <param name="consumablesId"></param>
public static void DeleteConsumablesByConsumablesId(string consumablesId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_Consumables delConsumables = db.Base_Consumables.FirstOrDefault(e => e.ConsumablesId == consumablesId);
if (delConsumables != null)
{
@@ -21,7 +21,7 @@ namespace BLL
/// <param name="dNCompare"></param>
public static void AddDNCompare(Model.Base_DNCompare dNCompare)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_DNCompare newDNCompare = new Base_DNCompare
{
DNCompareId = dNCompare.DNCompareId,
@@ -57,7 +57,7 @@ namespace BLL
/// <param name="dNCompare"></param>
public static void UpdateDNCompare(Model.Base_DNCompare dNCompare)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_DNCompare newDNCompare = db.Base_DNCompare.FirstOrDefault(e => e.DNCompareId == dNCompare.DNCompareId);
if (newDNCompare != null)
{
@@ -91,7 +91,7 @@ namespace BLL
/// <param name="dNCompareId"></param>
public static void DeleteDNCompareByDNCompareId(string dNCompareId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_DNCompare delDNCompare = db.Base_DNCompare.FirstOrDefault(e => e.DNCompareId == dNCompareId);
if (delDNCompare != null)
{
+3 -3
View File
@@ -117,7 +117,7 @@ namespace BLL
/// <param name="Defect"></param>
public static void AddDefect(Model.Base_Defect defect)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_Defect newDefect = new Base_Defect
{
DefectId = defect.DefectId,
@@ -134,7 +134,7 @@ namespace BLL
/// <param name="Defect"></param>
public static void UpdateDefect(Model.Base_Defect defect)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_Defect newDefect = db.Base_Defect.FirstOrDefault(e => e.DefectId == defect.DefectId);
if (newDefect != null)
{
@@ -150,7 +150,7 @@ namespace BLL
/// <param name="DefectId"></param>
public static void DeleteDefectByDefectId(string defectId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_Defect delDefect = db.Base_Defect.FirstOrDefault(e => e.DefectId.ToString() == defectId);
if (delDefect != null)
{
@@ -22,7 +22,7 @@
/// <param name="detectionRate"></param>
public static void AddDetectionRate(Model.Base_DetectionRate detectionRate)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_DetectionRate newDetectionRate = new Base_DetectionRate
{
DetectionRateId = detectionRate.DetectionRateId,
@@ -42,7 +42,7 @@
/// <param name="DetectionRate"></param>
public static void UpdateDetectionRate(Model.Base_DetectionRate detectionRate)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_DetectionRate newDetectionRate = db.Base_DetectionRate.FirstOrDefault(e => e.DetectionRateId == detectionRate.DetectionRateId);
if (newDetectionRate != null)
{
@@ -60,7 +60,7 @@
/// <param name="detectionRateId"></param>
public static void DeleteDetectionRateByDetectionRateId(string detectionRateId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_DetectionRate delDetectionRate = db.Base_DetectionRate.FirstOrDefault(e => e.DetectionRateId == detectionRateId);
if (delDetectionRate != null)
{
@@ -30,7 +30,7 @@
/// <param name="detectionType"></param>
public static void AddDetectionType(Model.Base_DetectionType detectionType)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_DetectionType newDetectionType = new Base_DetectionType
{
DetectionTypeId = detectionType.DetectionTypeId,
@@ -53,7 +53,7 @@
/// <param name="detectionType"></param>
public static void UpdateDetectionType(Model.Base_DetectionType detectionType)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_DetectionType newDetectionType = db.Base_DetectionType.FirstOrDefault(e => e.DetectionTypeId == detectionType.DetectionTypeId);
if (newDetectionType != null)
{
@@ -74,7 +74,7 @@
/// <param name="detectionTypeId"></param>
public static void DeleteDetectionTypeByDetectionTypeId(string detectionTypeId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_DetectionType delDetectionType = db.Base_DetectionType.FirstOrDefault(e => e.DetectionTypeId == detectionTypeId);
if (delDetectionType != null)
{
@@ -21,7 +21,7 @@
/// <param name="grooveType"></param>
public static void AddGrooveType(Model.Base_GrooveType grooveType)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_GrooveType newGrooveType = new Base_GrooveType
{
GrooveTypeId = grooveType.GrooveTypeId,
@@ -40,7 +40,7 @@
/// <param name="grooveType"></param>
public static void UpdateGrooveType(Model.Base_GrooveType grooveType)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_GrooveType newGrooveType = db.Base_GrooveType.FirstOrDefault(e => e.GrooveTypeId == grooveType.GrooveTypeId);
if (newGrooveType != null)
{
@@ -57,7 +57,7 @@
/// <param name="grooveTypeId"></param>
public static void DeleteGrooveTypeByGrooveTypeId(string grooveTypeId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_GrooveType delGrooveType = db.Base_GrooveType.FirstOrDefault(e => e.GrooveTypeId == grooveTypeId);
if (delGrooveType != null)
{
@@ -22,7 +22,7 @@ namespace BLL
/// <param name="material"></param>
public static void AddMaterial(Model.Base_Material material)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_Material newMaterial = new Base_Material
{
MaterialId = material.MaterialId,
@@ -44,7 +44,7 @@ namespace BLL
/// <param name="material"></param>
public static void UpdateMaterial(Model.Base_Material material)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_Material newMaterial = db.Base_Material.FirstOrDefault(e => e.MaterialId == material.MaterialId);
if (newMaterial != null)
{
@@ -65,7 +65,7 @@ namespace BLL
/// <param name="materialId"></param>
public static void DeleteMaterialByMaterialId(string materialId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_Material delMaterial = db.Base_Material.FirstOrDefault(e => e.MaterialId == materialId);
if (delMaterial != null)
{
@@ -22,7 +22,7 @@ namespace BLL
/// <param name="material"></param>
public static void AddMaterial(Model.Base_MaterialType material)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_MaterialType newMaterial = new Base_MaterialType
{
MaterialTypeId = material.MaterialTypeId,
@@ -40,7 +40,7 @@ namespace BLL
/// <param name="material"></param>
public static void UpdateMaterial(Model.Base_MaterialType material)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_MaterialType newMaterial = db.Base_MaterialType.FirstOrDefault(e => e.MaterialTypeId == material.MaterialTypeId);
if (newMaterial != null)
{
@@ -58,7 +58,7 @@ namespace BLL
/// <param name="materialId"></param>
public static void DeleteMaterialByMaterialId(string MaterialTypeId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_MaterialType delMaterial = db.Base_MaterialType.FirstOrDefault(e => e.MaterialTypeId == MaterialTypeId);
if (delMaterial != null)
{
+3 -3
View File
@@ -22,7 +22,7 @@ namespace BLL
/// <param name="medium"></param>
public static void AddMedium(Model.Base_Medium medium)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_Medium newMedium = new Base_Medium
{
MediumId = medium.MediumId,
@@ -43,7 +43,7 @@ namespace BLL
/// <param name="medium"></param>
public static void UpdateMedium(Model.Base_Medium medium)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_Medium newMedium = db.Base_Medium.FirstOrDefault(e => e.MediumId == medium.MediumId);
if (newMedium != null)
{
@@ -63,7 +63,7 @@ namespace BLL
/// <param name="mediumId"></param>
public static void DeleteMediumByMediumId(string mediumId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_Medium delMedium = db.Base_Medium.FirstOrDefault(e => e.MediumId == mediumId);
if (delMedium != null)
{
@@ -21,7 +21,7 @@
/// <param name="PipingClass"></param>
public static void AddPipingClass(Model.Base_PipingClass pipingClass)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_PipingClass newPipingClass = new Base_PipingClass
{
PipingClassId = pipingClass.PipingClassId,
@@ -42,7 +42,7 @@
/// <param name="pipingClass"></param>
public static void UpdatePipingClass(Model.Base_PipingClass pipingClass)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_PipingClass newPipingClass = db.Base_PipingClass.FirstOrDefault(e => e.PipingClassId == pipingClass.PipingClassId);
if (newPipingClass != null)
{
@@ -62,7 +62,7 @@
/// <param name="pipingClassId"></param>
public static void DeletePipingClassByPipingClassId(string pipingClassId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_PipingClass delPipingClass = db.Base_PipingClass.FirstOrDefault(e => e.PipingClassId == pipingClassId);
if (delPipingClass != null)
{
@@ -21,7 +21,7 @@
/// <param name="grooveType"></param>
public static void AddPressurePipingClass(Model.Base_PressurePipingClass pipingClass)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_PressurePipingClass newPipingClass = new Base_PressurePipingClass
{
PressurePipingClassId = pipingClass.PressurePipingClassId,
@@ -40,7 +40,7 @@
/// <param name="grooveType"></param>
public static void UpdatePressurePipingClass(Model.Base_PressurePipingClass pipingClass)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_PressurePipingClass newPipingClass = db.Base_PressurePipingClass.FirstOrDefault(e => e.PressurePipingClassId == pipingClass.PressurePipingClassId);
if (newPipingClass != null)
{
@@ -57,7 +57,7 @@
/// <param name="grooveTypeId"></param>
public static void DeletePressurePipingClass(string pipingClassId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_PressurePipingClass del = db.Base_PressurePipingClass.FirstOrDefault(e => e.PressurePipingClassId == pipingClassId);
if (del != null)
{
@@ -21,7 +21,7 @@ namespace BLL
/// <param name="pressure"></param>
public static void AddPressure(Model.Base_Pressure pressure)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_Pressure newPressure = new Base_Pressure
{
PressureId = pressure.PressureId,
@@ -39,7 +39,7 @@ namespace BLL
/// <param name="pressure"></param>
public static void UpdatePressure(Model.Base_Pressure pressure)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_Pressure newPressure = db.Base_Pressure.FirstOrDefault(e => e.PressureId == pressure.PressureId);
if (newPressure != null)
{
@@ -56,7 +56,7 @@ namespace BLL
/// <param name="pressureId"></param>
public static void DeletePressureByPressureId(string pressureId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_Pressure delPressure = db.Base_Pressure.FirstOrDefault(e => e.PressureId == pressureId);
if (delPressure != null)
{
@@ -22,7 +22,7 @@
/// <param name="grooveType"></param>
public static void AddPurgeMethod(Model.Base_PurgeMethod purgeMethod)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_PurgeMethod newPurgeMethod = new Base_PurgeMethod
{
PurgeMethodId = purgeMethod.PurgeMethodId,
@@ -41,7 +41,7 @@
/// <param name="grooveType"></param>
public static void UpdatePurgeMethod(Model.Base_PurgeMethod purgeMethod)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_PurgeMethod newPurgeMethod = db.Base_PurgeMethod.FirstOrDefault(e => e.PurgeMethodId == purgeMethod.PurgeMethodId);
if (newPurgeMethod != null)
{
@@ -58,7 +58,7 @@
/// <param name="grooveTypeId"></param>
public static void DeletePurgeMethod(string purgeMethodId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_PurgeMethod del = db.Base_PurgeMethod.FirstOrDefault(e => e.PurgeMethodId == purgeMethodId);
if (del != null)
{
@@ -22,7 +22,7 @@ namespace BLL
/// <param name="medium"></param>
public static void AddTestMedium(Model.Base_TestMedium medium)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_TestMedium newMedium = new Base_TestMedium
{
TestMediumId = medium.TestMediumId,
@@ -41,7 +41,7 @@ namespace BLL
/// <param name="medium"></param>
public static void UpdateTestMedium(Model.Base_TestMedium medium)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_TestMedium newMedium = db.Base_TestMedium.FirstOrDefault(e => e.TestMediumId == medium.TestMediumId);
if (newMedium != null)
{
@@ -59,7 +59,7 @@ namespace BLL
/// <param name="mediumId"></param>
public static void DeleteTestMediumByMediumId(string mediumId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_TestMedium delMedium = db.Base_TestMedium.FirstOrDefault(e => e.TestMediumId == mediumId);
if (delMedium != null)
{
@@ -20,7 +20,7 @@
/// <param name="weldType"></param>
public static void AddWeldType(Model.Base_WeldType weldType)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_WeldType newWeldType = new Base_WeldType
{
WeldTypeId = weldType.WeldTypeId,
@@ -40,7 +40,7 @@
/// <param name="weldType"></param>
public static void UpdateWeldType(Model.Base_WeldType weldType)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_WeldType newWeldType = db.Base_WeldType.FirstOrDefault(e => e.WeldTypeId == weldType.WeldTypeId);
if (newWeldType != null)
{
@@ -59,7 +59,7 @@
/// <param name="weldTypeId"></param>
public static void DeleteWeldTypeByWeldTypeId(string weldTypeId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_WeldType delWeldType = db.Base_WeldType.FirstOrDefault(e => e.WeldTypeId == weldTypeId);
if (delWeldType != null)
{
@@ -24,7 +24,7 @@ namespace BLL
/// <param name="weldingLocation"></param>
public static void AddWeldingLocation(Model.Base_WeldingLocation weldingLocation)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_WeldingLocation newWeldingLocation = new Model.Base_WeldingLocation();
newWeldingLocation.WeldingLocationId = weldingLocation.WeldingLocationId;
newWeldingLocation.WeldingLocationCode = weldingLocation.WeldingLocationCode;
@@ -40,7 +40,7 @@ namespace BLL
/// <param name="weldingLocation"></param>
public static void UpdateWeldingLocation(Model.Base_WeldingLocation weldingLocation)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_WeldingLocation newWeldingLocation = db.Base_WeldingLocation.FirstOrDefault(e => e.WeldingLocationId == weldingLocation.WeldingLocationId);
if (newWeldingLocation != null)
{
@@ -57,7 +57,7 @@ namespace BLL
/// <param name="weldingLocationId"></param>
public static void DeleteWeldingLocationById(string weldingLocationId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_WeldingLocation weldingLocation = db.Base_WeldingLocation.FirstOrDefault(e => e.WeldingLocationId == weldingLocationId);
if (weldingLocation != null)
{
@@ -21,7 +21,7 @@
/// <param name="weldingMethod"></param>
public static void AddWeldingMethod(Model.Base_WeldingMethod weldingMethod)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_WeldingMethod newWeldingMethod = new Base_WeldingMethod
{
WeldingMethodId = weldingMethod.WeldingMethodId,
@@ -40,7 +40,7 @@
/// <param name="weldingMethod"></param>
public static void UpdateWeldingMethod(Model.Base_WeldingMethod weldingMethod)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_WeldingMethod newWeldingMethod = db.Base_WeldingMethod.FirstOrDefault(e => e.WeldingMethodId == weldingMethod.WeldingMethodId);
if (newWeldingMethod != null)
{
@@ -58,7 +58,7 @@
/// <param name="weldingMethodId"></param>
public static void DeleteWeldingMethodByWeldingMethodId(string weldingMethodId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Base_WeldingMethod delWeldingMethod = db.Base_WeldingMethod.FirstOrDefault(e => e.WeldingMethodId == weldingMethodId);
if (delWeldingMethod != null)
{
@@ -27,7 +27,7 @@ namespace BLL
/// <param name="dataInTemp">委托实体</param>
public static void AddDataInTemp(Model.HJGL_CheckImportTemp dataInTemp)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_CheckImportTemp newDataInTemp = new Model.HJGL_CheckImportTemp();
newDataInTemp.TempId = dataInTemp.TempId;
newDataInTemp.ProjectId = dataInTemp.ProjectId;
@@ -90,7 +90,7 @@ namespace BLL
public static void AddDataInTemp(List<Model.HJGL_CheckImportTemp> dataInTemps)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
foreach (var dataInTemp in dataInTemps)
{
Model.HJGL_CheckImportTemp newDataInTemp = new Model.HJGL_CheckImportTemp();
@@ -161,7 +161,7 @@ namespace BLL
/// <param name="weldReport">焊接实体</param>
public static void UpdateDataInTemp(Model.HJGL_CheckImportTemp dataInTemp)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_CheckImportTemp newDataInTemp = db.HJGL_CheckImportTemp.FirstOrDefault(e => e.TempId == dataInTemp.TempId);
if (newDataInTemp != null)
{
@@ -224,7 +224,7 @@ namespace BLL
/// <param name="tempId">委托主键</param>
public static void DeleteDataInTempByDataInTempID(string tempId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_CheckImportTemp dataInTemp = db.HJGL_CheckImportTemp.FirstOrDefault(e => e.TempId == tempId);
if (dataInTemp != null)
{
@@ -240,7 +240,7 @@ namespace BLL
/// <param name="userId"></param>
public static void DeleteDataInTempByProjectIdUserId(string projectId, string userId )
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
var dataInTemp = from x in db.HJGL_CheckImportTemp where x.ProjectId == projectId && x.UserId == userId select x;
if (dataInTemp.Count() > 0)
{
+5 -5
View File
@@ -27,7 +27,7 @@ namespace BLL
/// <param name="dataInTemp">委托实体</param>
public static void AddDataInTemp(Model.Sys_DataInTemp dataInTemp)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Sys_DataInTemp newDataInTemp = new Model.Sys_DataInTemp();
newDataInTemp.TempId = dataInTemp.TempId;
newDataInTemp.ProjectId = dataInTemp.ProjectId;
@@ -90,7 +90,7 @@ namespace BLL
public static void AddDataInTemp(List<Model.Sys_DataInTemp> dataInTemps)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
foreach (var dataInTemp in dataInTemps)
{
Model.Sys_DataInTemp newDataInTemp = new Model.Sys_DataInTemp();
@@ -161,7 +161,7 @@ namespace BLL
/// <param name="weldReport">焊接实体</param>
public static void UpdateDataInTemp(Model.Sys_DataInTemp dataInTemp)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Sys_DataInTemp newDataInTemp = db.Sys_DataInTemp.FirstOrDefault(e => e.TempId == dataInTemp.TempId);
if (newDataInTemp != null)
{
@@ -224,7 +224,7 @@ namespace BLL
/// <param name="tempId">委托主键</param>
public static void DeleteDataInTempByDataInTempID(string tempId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Sys_DataInTemp dataInTemp = db.Sys_DataInTemp.FirstOrDefault(e => e.TempId == tempId);
if (dataInTemp != null)
{
@@ -240,7 +240,7 @@ namespace BLL
/// <param name="userId"></param>
public static void DeleteDataInTempByProjectIdUserId(string projectId, string userId, string type)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
var dataInTemp = from x in db.Sys_DataInTemp where x.ProjectId == projectId && x.UserId == userId && x.Type == type select x;
if (dataInTemp.Count() > 0)
{
@@ -33,7 +33,7 @@ namespace BLL
/// <param name="setHardReport"></param>
public static void AddHard_Report(Model.HJGL_Hard_Report setHardReport)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_Hard_Report newHardReport = new HJGL_Hard_Report
{
HardReportId = setHardReport.HardReportId,
@@ -57,7 +57,7 @@ namespace BLL
/// <param name="updateHardReport"></param>
public static void UpdateHard_Report(Model.HJGL_Hard_Report updateHardReport)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_Hard_Report newHardReport = db.HJGL_Hard_Report.FirstOrDefault(e => e.HardReportId == updateHardReport.HardReportId);
if (newHardReport != null)
{
@@ -79,7 +79,7 @@ namespace BLL
/// <param name="strHardReportId">装置ID</param>
public static void DeleteHard_ReportByHardReportId(string strHardReportId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_Hard_Report delHardReport = db.HJGL_Hard_Report.FirstOrDefault(e => e.HardReportId == strHardReportId);
if (delHardReport != null)
{
@@ -94,7 +94,7 @@ namespace BLL
/// <param name="strHardReportId">装置ID</param>
public static void DeleteHard_ReportsByHardTrustItemID(string strHardTrustItemID)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
var delHardReports = from x in db.HJGL_Hard_Report where x.HardTrustItemID == strHardTrustItemID select x;
if (delHardReports.Count() >0)
{
@@ -46,7 +46,7 @@ namespace BLL
/// <param name="hardTrustItem"></param>
public static void AddHardTrustItem(Model.HJGL_Hard_TrustItem hardTrustItem)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_Hard_TrustItem newHardTrustItem = new Model.HJGL_Hard_TrustItem();
newHardTrustItem.HardTrustItemID = SQLHelper.GetNewID(typeof(Model.HJGL_Hard_TrustItem));
newHardTrustItem.HardTrustID = hardTrustItem.HardTrustID;
@@ -64,7 +64,7 @@ namespace BLL
/// <param name="hardTrustItem"></param>
public static void UpdateHardTrustItem(Model.HJGL_Hard_TrustItem hardTrustItem)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_Hard_TrustItem newHardTrustItem = db.HJGL_Hard_TrustItem.FirstOrDefault(e => e.HardTrustItemID == hardTrustItem.HardTrustItemID);
if (newHardTrustItem != null)
{
@@ -80,7 +80,7 @@ namespace BLL
/// <param name="hardTrustId"></param>
public static void DeleteHardTrustItemByHardTrustItemID(string hardTrustItemID)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
var hardTrustItem = (from x in db.HJGL_Hard_TrustItem where x.HardTrustItemID == hardTrustItemID select x).FirstOrDefault();
if (hardTrustItem != null)
{
@@ -95,7 +95,7 @@ namespace BLL
/// <param name="hardTrustId"></param>
public static void DeleteHardTrustItemById(string hardTrustId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
var hardTrustItem = (from x in db.HJGL_Hard_TrustItem where x.HardTrustID == hardTrustId select x).ToList();
if (hardTrustItem != null)
{
@@ -26,7 +26,7 @@ namespace BLL
/// <param name="hardTrust"></param>
public static void AddHardTrust(Model.HJGL_Hard_Trust hardTrust)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_Hard_Trust newHardTrust = new Model.HJGL_Hard_Trust();
newHardTrust.HardTrustID = hardTrust.HardTrustID;
newHardTrust.HardTrustNo = hardTrust.HardTrustNo;
@@ -60,7 +60,7 @@ namespace BLL
/// <param name="hardTrust"></param>
public static void UpdateHardTrust(Model.HJGL_Hard_Trust hardTrust)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_Hard_Trust newHardTrust = db.HJGL_Hard_Trust.FirstOrDefault(e => e.HardTrustID == hardTrust.HardTrustID);
if (newHardTrust != null)
{
@@ -93,7 +93,7 @@ namespace BLL
/// <param name="hardTrustID"></param>
public static void DeleteHardTrustById(string hardTrustID)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_Hard_Trust hardTrust = db.HJGL_Hard_Trust.FirstOrDefault(e => e.HardTrustID == hardTrustID);
if (hardTrust != null)
{
@@ -27,7 +27,7 @@ namespace BLL
/// <param name="hotProessReport"></param>
public static void AddHotProessReport(Model.HJGL_HotProess_Report hotProessReport)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_HotProess_Report newHotProessReport = new Model.HJGL_HotProess_Report();
newHotProessReport.HotProessReportId = hotProessReport.HotProessReportId;
newHotProessReport.HotProessTrustItemId = hotProessReport.HotProessTrustItemId;
@@ -49,7 +49,7 @@ namespace BLL
/// <param name="hotProessReport"></param>
public static void UpdateHotProessReport(Model.HJGL_HotProess_Report hotProessReport)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_HotProess_Report newHotProessReport = db.HJGL_HotProess_Report.FirstOrDefault(e => e.HotProessReportId == hotProessReport.HotProessReportId);
if (newHotProessReport != null)
{
@@ -70,7 +70,7 @@ namespace BLL
/// <param name="hotProessReportId"></param>
public static void DeleteHotProessReportById(string hotProessReportId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_HotProess_Report hotProessReport = db.HJGL_HotProess_Report.FirstOrDefault(e => e.HotProessReportId == hotProessReportId);
if (hotProessReport != null)
{
@@ -84,7 +84,7 @@ namespace BLL
/// <param name="hotProessReportId"></param>
public static void DeleteAllHotProessReportById(string hotProessTrustItemId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
var hotProessReport = from x in Funs.DB.HJGL_HotProess_Report where x.HotProessTrustItemId == hotProessTrustItemId select x;
if (hotProessReport.ToList().Count>0)
{
@@ -36,7 +36,7 @@ namespace BLL
/// <param name="hotProessTrustItem"></param>
public static void AddHotProessTrustItem(Model.HJGL_HotProess_TrustItem hotProessTrustItem)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_HotProess_TrustItem newHotProessTrustItem = new Model.HJGL_HotProess_TrustItem();
newHotProessTrustItem.HotProessTrustItemId = SQLHelper.GetNewID(typeof(Model.HJGL_HotProess_TrustItem));
newHotProessTrustItem.HotProessTrustId = hotProessTrustItem.HotProessTrustId;
@@ -55,7 +55,7 @@ namespace BLL
/// <param name="hotProessTrustItem"></param>
public static void UpdateHotProessTrustItem(Model.HJGL_HotProess_TrustItem hotProessTrustItem)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_HotProess_TrustItem newHotProessTrustItem = db.HJGL_HotProess_TrustItem.FirstOrDefault(e => e.HotProessTrustItemId == hotProessTrustItem.HotProessTrustItemId);
if (newHotProessTrustItem != null)
{
@@ -75,7 +75,7 @@ namespace BLL
/// <param name="hotProessTrustItem"></param>
public static void UpdateHotProessFeedback(Model.HJGL_HotProess_TrustItem hotProessTrustItem)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_HotProess_TrustItem newHotProessTrustItem = db.HJGL_HotProess_TrustItem.FirstOrDefault(e => e.HotProessTrustItemId == hotProessTrustItem.HotProessTrustItemId);
if (newHotProessTrustItem != null)
{
@@ -91,7 +91,7 @@ namespace BLL
/// <param name="hotProessTrustId"></param>
public static void DeleteHotProessTrustItemByItemId(string hotProessTrustItemId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
var hotProessTrustItem = (from x in db.HJGL_HotProess_TrustItem where x.HotProessTrustItemId == hotProessTrustItemId select x).FirstOrDefault();
if (hotProessTrustItem != null)
{
@@ -106,7 +106,7 @@ namespace BLL
/// <param name="hotProessTrustId"></param>
public static void DeleteHotProessTrustItemById(string hotProessTrustId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
var hotProessTrustItem = (from x in db.HJGL_HotProess_TrustItem where x.HotProessTrustId == hotProessTrustId select x).ToList();
if (hotProessTrustItem != null)
{
@@ -26,7 +26,7 @@ namespace BLL
/// <param name="hotProessTrust"></param>
public static void AddHotProessTrust(Model.HJGL_HotProess_Trust hotProessTrust)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_HotProess_Trust newHotProessTrust = new Model.HJGL_HotProess_Trust();
newHotProessTrust.HotProessTrustId = hotProessTrust.HotProessTrustId;
newHotProessTrust.HotProessTrustNo = hotProessTrust.HotProessTrustNo;
@@ -49,7 +49,7 @@ namespace BLL
/// <param name="hotProessTrust"></param>
public static void UpdateHotProessTrust(Model.HJGL_HotProess_Trust hotProessTrust)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_HotProess_Trust newHotProessTrust = db.HJGL_HotProess_Trust.FirstOrDefault(e => e.HotProessTrustId == hotProessTrust.HotProessTrustId);
if (newHotProessTrust != null)
{
@@ -72,7 +72,7 @@ namespace BLL
/// <param name="hotProessTrustId"></param>
public static void DeleteHotProessTrustById(string hotProessTrustId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_HotProess_Trust hotProessTrust = db.HJGL_HotProess_Trust.FirstOrDefault(e => e.HotProessTrustId == hotProessTrustId);
if (hotProessTrust != null)
{
@@ -11,7 +11,7 @@ namespace BLL
/// </summary>
public static class HJGL_EMInventoryRecordsService
{
public static Model.SGGLDB db = Funs.DB;
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 记录数
@@ -89,7 +89,7 @@ namespace BLL
/// <param name="eMInventoryRecords"></param>
public static void UpdateEMInventoryRecords(string projectId, string unitId, string WMT_ID, string Model, string Specification, decimal MaterialCount)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_EMInventoryRecords emInventoryRecords = db.HJGL_EMInventoryRecords.FirstOrDefault(x => x.ProjectId == projectId && x.UnitId == unitId && x.WMT_ID == WMT_ID );
if (emInventoryRecords != null)
{
@@ -12,7 +12,7 @@ namespace BLL
/// </summary>
public class HJGL_EMaterialRegistService
{
public static Model.SGGLDB db = Funs.DB;
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 记录数
@@ -101,7 +101,7 @@ namespace BLL
/// <returns></returns>
public static Model.HJGL_EMaterialRegist GetEMaterialRegistByID(string eMaterialRegistId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
var eMaterialRegist = db.HJGL_EMaterialRegist.FirstOrDefault(e => e.EMaterialRegistId == eMaterialRegistId);
return eMaterialRegist;
}
@@ -131,7 +131,7 @@ namespace BLL
/// <param name="eMaterialRegist"></param>
public static void AddEMaterialRegist(Model.HJGL_EMaterialRegist eMaterialRegist)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_EMaterialRegist newEMaterialRegist = new Model.HJGL_EMaterialRegist();
newEMaterialRegist.EMaterialRegistId = eMaterialRegist.EMaterialRegistId;
@@ -170,7 +170,7 @@ namespace BLL
/// <param name="eMaterialRegist"></param>
public static void UpdateEMaterialRegist(Model.HJGL_EMaterialRegist eMaterialRegist)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_EMaterialRegist newEMaterialRegist = db.HJGL_EMaterialRegist.First(e => e.EMaterialRegistId == eMaterialRegist.EMaterialRegistId);
newEMaterialRegist.EMaterialRegistCode = eMaterialRegist.EMaterialRegistCode;
@@ -208,7 +208,7 @@ namespace BLL
/// <param name="eMaterialRegistId"></param>
public static void DeleteEMaterialRegist(string eMaterialRegistId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_EMaterialRegist eMaterialRegist = db.HJGL_EMaterialRegist.First(e => e.EMaterialRegistId == eMaterialRegistId);
db.HJGL_EMaterialRegist.DeleteOnSubmit(eMaterialRegist);
@@ -221,7 +221,7 @@ namespace BLL
/// <param name="item"></param>
public static void AddEMaterialRegistItem(Model.HJGL_EMaterialRegistItem item)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_EMaterialRegistItem newItem = new Model.HJGL_EMaterialRegistItem();
newItem.EMaterialRegistItemId = item.EMaterialRegistItemId;
@@ -244,7 +244,7 @@ namespace BLL
/// <param name="eMaterialRegistId"></param>
public static void DeleteEMaterialRegistItem(string projectId,string unitId, string eMaterialRegistId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
var deleteItem = from x in db.HJGL_EMaterialRegistItem where x.EMaterialRegistId == eMaterialRegistId select x;
/// 取到货明细 库存减去明细值
@@ -9,7 +9,7 @@ namespace BLL
{
public static class HJGL_ElectrodeBakeService
{
public static Model.SGGLDB db = Funs.DB;
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 记录数
@@ -109,7 +109,7 @@ namespace BLL
/// <returns></returns>
public static Model.HJGL_ElectrodeBake GetElecrodeBakeByElectrodeId(string electrodeId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
var elecrodeBake = db.HJGL_ElectrodeBake.FirstOrDefault(e => e.ElectrodeID == electrodeId);
return elecrodeBake;
}
@@ -130,7 +130,7 @@ namespace BLL
/// <param name="electrodeBake"></param>
public static void AddElectrodeBake(Model.HJGL_ElectrodeBake electrodeBake)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_ElectrodeBake newElectrodeBake = new Model.HJGL_ElectrodeBake();
newElectrodeBake.WMT_ID = electrodeBake.WMT_ID;
@@ -171,7 +171,7 @@ namespace BLL
/// <param name="electrodeBake"></param>
public static void UpdateElectrodeBake(Model.HJGL_ElectrodeBake electrodeBake)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_ElectrodeBake newElectrodeBake = db.HJGL_ElectrodeBake.First(e => e.ElectrodeID == electrodeBake.ElectrodeID);
newElectrodeBake.ElectrodeCode = electrodeBake.ElectrodeCode;
@@ -214,7 +214,7 @@ namespace BLL
/// <param name="eletrodeId"></param>
public static void DeleteElectrodeBake(string eletrodeId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_ElectrodeBake electrodeBake = db.HJGL_ElectrodeBake.First(e => e.ElectrodeID == eletrodeId);
db.HJGL_ElectrodeBake.DeleteOnSubmit(electrodeBake);
db.SubmitChanges();
@@ -226,7 +226,7 @@ namespace BLL
/// <param name="electrodeBakeItem"></param>
public static void AddElectrodeBakeItem(Model.HJGL_ElectrodeBakeItem electrodeBakeItem)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_ElectrodeBakeItem newElectrodeBakeItem = new Model.HJGL_ElectrodeBakeItem();
newElectrodeBakeItem.ElectrodeItemID = SQLHelper.GetNewID(typeof(Model.HJGL_ElectrodeBakeItem));
@@ -261,7 +261,7 @@ namespace BLL
/// <param name="electrodeId">焊丝烘烤记录Id</param>
public static void DeleteElectrodeBakeItem(string electrodeId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
var q = (from x in db.HJGL_ElectrodeBakeItem where x.ElectrodeID == electrodeId select x).ToList();
db.HJGL_ElectrodeBakeItem.DeleteAllOnSubmit(q);
db.SubmitChanges();
@@ -5,7 +5,7 @@ namespace BLL
{
public static class HJGL_ElectrodeRecoveryService
{
public static Model.SGGLDB db = Funs.DB;
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 根据焊条发放回收记录ID获取焊条发放回收记录信息
@@ -14,13 +14,13 @@ namespace BLL
/// <returns></returns>
public static Model.HJGL_ElectrodeRecovery GetElectrodeRecoveryByID(string electrodeRecoveryID)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
var electrodeRecovery = db.HJGL_ElectrodeRecovery.FirstOrDefault(e => e.ElectrodeRecoveryId == electrodeRecoveryID);
return electrodeRecovery;
}
public static Model.HJGL_ElectrodeRecovery GetElectrodeRecoveryByItemID(string electrodeRecoveryItemID)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
var electrodeRecoveryItem = db.HJGL_ElectrodeRecoveryItem.FirstOrDefault(e => e.ElectrodeRecoveryItemID == electrodeRecoveryItemID);
var electrodeRecovery = db.HJGL_ElectrodeRecovery.FirstOrDefault(e => e.ElectrodeRecoveryId == electrodeRecoveryItem.ElectrodeRecoveryId);
return electrodeRecovery;
@@ -42,7 +42,7 @@ namespace BLL
/// <param name="electrodeRecovery"></param>
public static void AddElectrodeRecovery(Model.HJGL_ElectrodeRecovery electrodeRecovery)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_ElectrodeRecovery newElectrodeRecovery = new Model.HJGL_ElectrodeRecovery();
newElectrodeRecovery.ElectrodeRecoveryId = electrodeRecovery.ElectrodeRecoveryId;
newElectrodeRecovery.ElectrodeRecoveryCode = electrodeRecovery.ElectrodeRecoveryCode;
@@ -66,7 +66,7 @@ namespace BLL
/// <param name="electrodeRecovery"></param>
public static void UpdateElectrodeRecovery(Model.HJGL_ElectrodeRecovery electrodeRecovery)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_ElectrodeRecovery newElectrodeRecovery = db.HJGL_ElectrodeRecovery.FirstOrDefault(e => e.ElectrodeRecoveryId == electrodeRecovery.ElectrodeRecoveryId);
if (newElectrodeRecovery != null)
{
@@ -97,7 +97,7 @@ namespace BLL
/// <param name="electrodeRecoveryId"></param>
public static void DeleteElectrodeRecovery(string electrodeRecoveryId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_ElectrodeRecovery electrodeRecovery = db.HJGL_ElectrodeRecovery.First(e => e.ElectrodeRecoveryId == electrodeRecoveryId);
db.HJGL_ElectrodeRecovery.DeleteOnSubmit(electrodeRecovery);
db.SubmitChanges();
@@ -109,7 +109,7 @@ namespace BLL
/// <param name="item"></param>
public static void AddElectrodeRecoveryItem(Model.HJGL_ElectrodeRecoveryItem item)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_ElectrodeRecoveryItem newItem = new Model.HJGL_ElectrodeRecoveryItem();
newItem.ElectrodeRecoveryItemID = SQLHelper.GetNewID(typeof(Model.HJGL_ElectrodeRecoveryItem));
newItem.ElectrodeRecoveryId = item.ElectrodeRecoveryId;
@@ -139,7 +139,7 @@ namespace BLL
/// <param name="electrodeRecoveryId"></param>
public static void DeleteElectrodeRecoveryItem(string projectId, string unitId,string electrodeRecoveryId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
var deleteItem = (from x in db.HJGL_ElectrodeRecoveryItem where x.ElectrodeRecoveryId == electrodeRecoveryId select x).ToList();
if (deleteItem.Count() > 0)
{
@@ -9,7 +9,7 @@ namespace BLL
{
public static class HJGL_ElectrodeSecondaryBakeService
{
public static Model.SGGLDB db = Funs.DB;
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 记录数
@@ -75,7 +75,7 @@ namespace BLL
/// <returns></returns>
public static Model.HJGL_ElectrodeSecondaryBake GetElecrodeBakeByElectrodeId(string electrodeId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
var elecrodeBake = db.HJGL_ElectrodeSecondaryBake.FirstOrDefault(e => e.ElectrodeID == electrodeId);
return elecrodeBake;
}
@@ -88,7 +88,7 @@ namespace BLL
/// <param name="electrodeBake"></param>
public static void AddElectrodeBake(Model.HJGL_ElectrodeSecondaryBake electrodeBake)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_ElectrodeSecondaryBake newElectrodeBake = new Model.HJGL_ElectrodeSecondaryBake();
newElectrodeBake.WMT_ID = electrodeBake.WMT_ID;
@@ -129,7 +129,7 @@ namespace BLL
/// <param name="electrodeBake"></param>
public static void UpdateElectrodeBake(Model.HJGL_ElectrodeSecondaryBake electrodeBake)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_ElectrodeSecondaryBake newElectrodeBake = db.HJGL_ElectrodeSecondaryBake.First(e => e.ElectrodeID == electrodeBake.ElectrodeID);
newElectrodeBake.ElectrodeCode = electrodeBake.ElectrodeCode;
@@ -172,7 +172,7 @@ namespace BLL
/// <param name="eletrodeId"></param>
public static void DeleteElectrodeBake(string eletrodeId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_ElectrodeSecondaryBake electrodeBake = db.HJGL_ElectrodeSecondaryBake.First(e => e.ElectrodeID == eletrodeId);
db.HJGL_ElectrodeSecondaryBake.DeleteOnSubmit(electrodeBake);
db.SubmitChanges();
@@ -9,7 +9,7 @@ namespace BLL.HJGL.MaterialManage
{
public class HJGL_MaterialApplyService
{
public static Model.SGGLDB db = Funs.DB;
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 根据焊条发放回收记录ID获取焊条发放回收记录信息
@@ -18,14 +18,14 @@ namespace BLL.HJGL.MaterialManage
/// <returns></returns>
public static Model.HJGL_Material_Apply getMaterialApply(string id)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
var electrodeRecovery = db.HJGL_Material_Apply.FirstOrDefault(e => e.ID == id);
return electrodeRecovery;
}
public static List<Model.HJGL_Material_Apply_Item> getMaterialApplyItem(string ApplyID)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
var res = db.HJGL_Material_Apply_Item.Where(e => e.ApplyID == ApplyID).ToList();
return res;
@@ -37,7 +37,7 @@ namespace BLL.HJGL.MaterialManage
/// <param name="electrodeRecovery"></param>
public static void AddMaterialApply(Model.HJGL_Material_Apply apply)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
db.HJGL_Material_Apply.InsertOnSubmit(apply);
db.SubmitChanges();
}
@@ -48,7 +48,7 @@ namespace BLL.HJGL.MaterialManage
/// <param name="electrodeRecovery"></param>
public static void UpdateMaterialApply(Model.HJGL_Material_Apply apply)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_Material_Apply newApply = db.HJGL_Material_Apply.FirstOrDefault(e => e.ID == apply.ID);
if (newApply != null)
{
@@ -91,7 +91,7 @@ namespace BLL.HJGL.MaterialManage
public static void UpdateMaterialApplyItem(List<Model.HJGL_Material_Apply_Item> items)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
var oldList = db.HJGL_Material_Apply_Item.Where(x => x.ApplyID == items[0].ApplyID).ToList();
//删除 数据库内该删除的 并且修改不该删除的
foreach (var olditem in oldList)
@@ -152,7 +152,7 @@ namespace BLL.HJGL.MaterialManage
/// <param name="electrodeRecoveryId"></param>
public static void DeleteElectrodeRecovery(string id)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_Material_Apply apply = db.HJGL_Material_Apply.FirstOrDefault(e => e.ID == id);
if (apply != null)
{
@@ -169,28 +169,28 @@ namespace BLL.HJGL.MaterialManage
public static void AddMaterialApplyApprove(Model.HJGL_Material_Apply_Approve approve)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
db.HJGL_Material_Apply_Approve.InsertOnSubmit(approve);
db.SubmitChanges();
}
public static List< Model.HJGL_Material_Apply_Approve> getMaterialApplyApproveList(string ApplyId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
var res = db.HJGL_Material_Apply_Approve.Where(a => a.MaterialApplyId == ApplyId && a.ApproveDate != null).OrderBy(x=>x.ApproveDate).ToList();
return res;
}
public static Model.HJGL_Material_Apply_Approve getCurrMaterialApplyApprove(string ApplyId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
var res = db.HJGL_Material_Apply_Approve.Where(a => a.MaterialApplyId == ApplyId && a.ApproveDate ==null).FirstOrDefault();
return res;
}
public static void UpdateMaterialApplyApprove(Model.HJGL_Material_Apply_Approve approve)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
var res = db.HJGL_Material_Apply_Approve.Where(a => a.MaterialApplyApproveId == approve.MaterialApplyApproveId).FirstOrDefault();
if (res != null)
{
@@ -36,7 +36,7 @@ namespace BLL
/// <param name="recycleMat"></param>
public static void AddRecycleMat(Model.Weld_RecycleMat recycleMat)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Weld_RecycleMat newRecycleMat = new Model.Weld_RecycleMat();
newRecycleMat.RecycleMatId = recycleMat.RecycleMatId;
newRecycleMat.ProjectId = recycleMat.ProjectId;
@@ -63,7 +63,7 @@ namespace BLL
/// <param name="recycleMat"></param>
public static void UpdateRecycleMat(Model.Weld_RecycleMat recycleMat)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Weld_RecycleMat newRecycleMat = db.Weld_RecycleMat.FirstOrDefault(e => e.RecycleMatId == recycleMat.RecycleMatId);
if (newRecycleMat != null)
{
@@ -91,7 +91,7 @@ namespace BLL
/// <param name="recycleMatId"></param>
public static void DeleteRecycleMatById(string recycleMatId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Weld_RecycleMat recycleMat = db.Weld_RecycleMat.FirstOrDefault(e => e.RecycleMatId == recycleMatId);
if (recycleMat != null)
{
@@ -108,7 +108,7 @@ namespace BLL
/// <param name="usingPlanId"></param>
public static void DeleteRecycleMat(string projectId, string welderId, string usingPlanId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Weld_RecycleMat recycleMat = db.Weld_RecycleMat.FirstOrDefault(e => e.ProjectId == projectId && e.RecycleMan == welderId && e.UsingPlanId == usingPlanId);
if (recycleMat != null)
{
@@ -135,7 +135,7 @@ namespace BLL
/// <param name="isConfirm"></param>
public static void WelderConfirm(string recycleMatId, bool isConfirm)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Weld_RecycleMat newRecycleMat = db.Weld_RecycleMat.FirstOrDefault(e => e.RecycleMatId == recycleMatId);
if (newRecycleMat != null)
{
@@ -151,7 +151,7 @@ namespace BLL
/// <param name="isConfirm"></param>
public static void StoreManConfirm(string recycleMatId, bool isConfirm)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Weld_RecycleMat newRecycleMat = db.Weld_RecycleMat.FirstOrDefault(e => e.RecycleMatId == recycleMatId);
if (newRecycleMat != null)
{
@@ -26,7 +26,7 @@ namespace BLL
/// <param name="stockIn"></param>
public static void AddStockIn(Model.Weld_StockIn stockIn)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Weld_StockIn newStockIn = new Model.Weld_StockIn();
newStockIn.StockInId = stockIn.StockInId;
newStockIn.ProjectId = stockIn.ProjectId;
@@ -60,7 +60,7 @@ namespace BLL
/// <param name="stockIn"></param>
public static void UpdateStockIn(Model.Weld_StockIn stockIn)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Weld_StockIn newStockIn = db.Weld_StockIn.FirstOrDefault(e => e.StockInId == stockIn.StockInId);
if (newStockIn != null)
{
@@ -87,7 +87,7 @@ namespace BLL
public static void UpdateStockIn1(Model.Weld_StockIn stockIn)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Weld_StockIn newStockIn = db.Weld_StockIn.FirstOrDefault(e => e.StockInId == stockIn.StockInId);
if (newStockIn != null)
{
@@ -110,7 +110,7 @@ namespace BLL
/// <param name="attUrl"></param>
public static void UpdateAttachFile( string stockInId,string attUrl)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Weld_StockIn newStockIn = db.Weld_StockIn.FirstOrDefault(e => e.StockInId == stockInId);
if (newStockIn != null)
{
@@ -125,7 +125,7 @@ namespace BLL
/// <param name="stockIn"></param>
public static void UpdateStockInCheck(Model.Weld_StockIn stockIn)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Weld_StockIn newStockIn = db.Weld_StockIn.FirstOrDefault(e => e.StockInId == stockIn.StockInId);
if (newStockIn != null)
{
@@ -144,7 +144,7 @@ namespace BLL
/// <param name="twoAmount"></param>
public static void UpdateStockInUsingAmount(string stockInId,decimal? oneUsedAmount,decimal? twoAmount)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Weld_StockIn newStockIn = db.Weld_StockIn.FirstOrDefault(e => e.StockInId == stockInId);
if (newStockIn != null)
{
@@ -163,7 +163,7 @@ namespace BLL
/// <param name="recycleAmount">退回数量</param>
public static void UpdateStockInAmount(string stockInId, decimal recycleAmount)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Weld_StockIn newStockIn = db.Weld_StockIn.FirstOrDefault(e => e.StockInId == stockInId);
if (newStockIn != null)
{
@@ -187,7 +187,7 @@ namespace BLL
public static void UpdateStockInAmount(string stockInId, decimal oldRecyclAmount, decimal newRecycleAmount)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Weld_StockIn newStockIn = db.Weld_StockIn.FirstOrDefault(e => e.StockInId == stockInId);
if (newStockIn != null)
{
@@ -203,7 +203,7 @@ namespace BLL
/// <param name="stockInId"></param>
public static void DeleteStockInById(string stockInId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Weld_StockIn stockIn = db.Weld_StockIn.FirstOrDefault(e => e.StockInId == stockInId);
if (stockIn != null)
{
@@ -28,7 +28,7 @@ namespace BLL
/// <param name="specifications"></param>
public static void AddUnitStore(Model.Weld_UnitStore unitStore)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Weld_UnitStore newUnitStore = new Model.Weld_UnitStore();
newUnitStore.UnitStoreId = unitStore.UnitStoreId;
newUnitStore.ProjectId = unitStore.ProjectId;
@@ -46,7 +46,7 @@ namespace BLL
/// <param name="unitStore"></param>
public static void UpdateUnitStore(Model.Weld_UnitStore unitStore)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Weld_UnitStore newUnitStore = db.Weld_UnitStore.FirstOrDefault(e => e.UnitStoreId == unitStore.UnitStoreId);
if (newUnitStore != null)
{
@@ -65,7 +65,7 @@ namespace BLL
/// <param name="unitStoreId"></param>
public static void DeleteUnitStoreById(string unitStoreId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Weld_UnitStore delUnitStore = db.Weld_UnitStore.FirstOrDefault(e => e.UnitStoreId == unitStoreId);
if (delUnitStore != null)
{
@@ -26,7 +26,7 @@ namespace BLL
/// <param name="usingMat"></param>
public static void AddUsingMat(Model.Weld_UsingMat usingMat)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Weld_UsingMat newUsingMat = new Model.Weld_UsingMat();
newUsingMat.UsingMatId = usingMat.UsingMatId;
newUsingMat.ProjectId = usingMat.ProjectId;
@@ -52,7 +52,7 @@ namespace BLL
/// <param name="usingMat"></param>
public static void UpdateUsingMat(Model.Weld_UsingMat usingMat)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Weld_UsingMat newUsingMat = db.Weld_UsingMat.FirstOrDefault(e => e.UsingMatId == usingMat.UsingMatId);
if (newUsingMat != null)
{
@@ -80,7 +80,7 @@ namespace BLL
/// <param name="IsClose"></param>
public static void UsingMatIsColse(string usingMatId, bool isClose)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Weld_UsingMat newUsingMat =db.Weld_UsingMat.FirstOrDefault(e => e.UsingMatId == usingMatId);
if (newUsingMat != null)
{
@@ -111,7 +111,7 @@ namespace BLL
/// <param name="isConfirm"></param>
public static void WelderConfirm(string usingMatId,bool isConfirm)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Weld_UsingMat newUsingMat = db.Weld_UsingMat.FirstOrDefault(e => e.UsingMatId == usingMatId);
if (newUsingMat != null)
{
@@ -128,7 +128,7 @@ namespace BLL
/// <param name="isConfirm"></param>
public static void StoreManConfirm(string usingMatId, bool isConfirm)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Weld_UsingMat newUsingMat = db.Weld_UsingMat.FirstOrDefault(e => e.UsingMatId == usingMatId);
if (newUsingMat != null)
{
@@ -143,7 +143,7 @@ namespace BLL
/// <param name="usingMatId"></param>
public static void DeleteUsingMatById(string usingMatId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Weld_UsingMat usingMat = db.Weld_UsingMat.FirstOrDefault(e => e.UsingMatId == usingMatId);
if (usingMat != null)
{
@@ -154,7 +154,7 @@ namespace BLL
public static decimal GetUsingAmountSum(string usingPlanId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
decimal usingAmountSum = 0;
var usingList = from x in db.Weld_UsingMat where x.UsingPlanId == usingPlanId select x;
if (usingList.Count() > 0)
@@ -171,7 +171,7 @@ namespace BLL
/// <param name="projectId"></param>
public static void DeleteUsingMatByWelderIdProjectId(string welderId, string projectId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
var q = (from x in db.Weld_UsingMat where x.UsingMan == welderId && x.ProjectId == projectId select x).ToList();
if (q!=null)
{
@@ -26,7 +26,7 @@ namespace BLL
/// <param name="usingPlan"></param>
public static void AddUsingPlan(Model.Weld_UsingPlan usingPlan)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Weld_UsingPlan newUsingPlan = new Model.Weld_UsingPlan();
newUsingPlan.UsingPlanId = usingPlan.UsingPlanId;
newUsingPlan.WeldId = usingPlan.WeldId;
@@ -60,7 +60,7 @@ namespace BLL
/// <param name="usingPlan"></param>
public static void UpdateUsingPlan(Model.Weld_UsingPlan usingPlan)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Weld_UsingPlan newUsingPlan = db.Weld_UsingPlan.FirstOrDefault(e => e.UsingPlanId == usingPlan.UsingPlanId);
if (newUsingPlan != null)
{
@@ -94,7 +94,7 @@ namespace BLL
/// <param name="usingPlanId"></param>
public static void UpdateIsSubmit(string usingPlanId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Weld_UsingPlan newUsingPlan = db.Weld_UsingPlan.FirstOrDefault(e => e.UsingPlanId == usingPlanId);
if (newUsingPlan != null)
{
@@ -109,7 +109,7 @@ namespace BLL
/// <param name="usingPlan"></param>
public static void UpdateIsFinish(string usingPlanId, string finishMan)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Weld_UsingPlan newUsingPlan = db.Weld_UsingPlan.FirstOrDefault(e => e.UsingPlanId == usingPlanId);
if (newUsingPlan != null)
{
@@ -126,7 +126,7 @@ namespace BLL
/// <param name="usingPlan"></param>
public static void UpdateIsCancel(string usingPlanId, string cancelResult)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Weld_UsingPlan newUsingPlan = db.Weld_UsingPlan.FirstOrDefault(e => e.UsingPlanId == usingPlanId);
if (newUsingPlan != null)
{
@@ -145,7 +145,7 @@ namespace BLL
/// <param name="isFinish"></param>
public static void UpdateUsingPlanIsFinish(string usingPlanId,bool? isFinish)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Weld_UsingPlan newUsingPlan = db.Weld_UsingPlan.FirstOrDefault(e => e.UsingPlanId == usingPlanId);
if (newUsingPlan != null)
{
@@ -161,7 +161,7 @@ namespace BLL
/// <param name="usingPlanId"></param>
public static void DeleteUsingPlanById(string usingPlanId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Weld_UsingPlan usingPlan = db.Weld_UsingPlan.FirstOrDefault(e => e.UsingPlanId == usingPlanId);
if (usingPlan != null)
{
@@ -228,7 +228,7 @@ namespace BLL
/// <param name="usingPlanId"></param>
public static void UpdateIsNeedConfirm(string usingPlanId,bool? isNeed)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Weld_UsingPlan newUsingPlan = db.Weld_UsingPlan.FirstOrDefault(e => e.UsingPlanId == usingPlanId);
if (newUsingPlan != null)
{
@@ -17,7 +17,7 @@ namespace BLL
/// <returns></returns>
public static Model.HJGL_Batch_BatchTrustItem GetBatchTrustItemById(string trustBatchItemId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
return db.HJGL_Batch_BatchTrustItem.FirstOrDefault(e => e.TrustBatchItemId == trustBatchItemId);
}
@@ -28,7 +28,7 @@ namespace BLL
/// <returns></returns>
public static List<Model.HJGL_Batch_BatchTrustItem> GetBatchTrustItemByTrustBatchId(string trustBatchId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
return (from x in db.HJGL_Batch_BatchTrustItem where x.TrustBatchId == trustBatchId select x).ToList();
}
@@ -38,7 +38,7 @@ namespace BLL
/// <param name="batchTrustItem"></param>
public static void AddBatchTrustItem(Model.HJGL_Batch_BatchTrustItem batchTrustItem)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_Batch_BatchTrustItem newTrustBatchItem = new Model.HJGL_Batch_BatchTrustItem
{
TrustBatchItemId = batchTrustItem.TrustBatchItemId,
@@ -62,7 +62,7 @@ namespace BLL
/// <param name="batchTrustItem"></param>
public static void UpdateBatchTrustItem(Model.HJGL_Batch_BatchTrustItem batchTrustItem)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_Batch_BatchTrustItem newBatchTrustItem = db.HJGL_Batch_BatchTrustItem.FirstOrDefault(e => e.TrustBatchItemId == batchTrustItem.TrustBatchItemId);
if (newBatchTrustItem != null)
{
@@ -83,7 +83,7 @@ namespace BLL
/// <returns></returns>
public static List<Model.View_Batch_BatchTrustItem> GetViewBatchTrustItem(string trustBatchId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
return (from x in db.View_Batch_BatchTrustItem where x.TrustBatchId == trustBatchId select x).ToList();
}
@@ -94,7 +94,7 @@ namespace BLL
/// <param name="checkItemId"></param>
public static void DeleteTrustItemByTrustBatchItemId(string trustBatchItemId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_Batch_BatchTrustItem trustItem = db.HJGL_Batch_BatchTrustItem.FirstOrDefault(e => e.TrustBatchItemId == trustBatchItemId);
if (trustItem != null)
{
@@ -112,7 +112,7 @@ namespace BLL
/// <param name="num"></param>
public static void UpdateTrustNum(string trustBatchItemId, int num)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
var trustBatchItem = db.HJGL_Batch_BatchTrustItem.FirstOrDefault(x => x.TrustBatchItemId == trustBatchItemId);
if (trustBatchItem != null)
{
@@ -17,7 +17,7 @@ namespace BLL
/// <returns></returns>
public static Model.HJGL_Batch_BatchTrust GetBatchTrustById(string trustBatchId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
return db.HJGL_Batch_BatchTrust.FirstOrDefault(e => e.TrustBatchId == trustBatchId);
}
@@ -28,7 +28,7 @@ namespace BLL
/// <returns></returns>
public static Model.View_Batch_BatchTrust GetBatchTrustViewById(string trustBatchId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
return db.View_Batch_BatchTrust.FirstOrDefault(e => e.TrustBatchId == trustBatchId);
}
@@ -40,7 +40,7 @@ namespace BLL
/// <param name="isTrust"></param>
public static void UpdatTrustBatchtState(string trustBatchId, bool? isCheck)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_Batch_BatchTrust update = db.HJGL_Batch_BatchTrust.FirstOrDefault(e => e.TrustBatchId == trustBatchId);
if (update != null)
{
@@ -56,7 +56,7 @@ namespace BLL
/// <param name="batchTrust"></param>
public static void AddBatchTrust(Model.HJGL_Batch_BatchTrust batchTrust)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_Batch_BatchTrust newBatchTrust = new Model.HJGL_Batch_BatchTrust
{
TrustBatchId = batchTrust.TrustBatchId,
@@ -84,7 +84,7 @@ namespace BLL
/// <param name="batchTrust"></param>
public static void UpdateBatchTrust(Model.HJGL_Batch_BatchTrust batchTrust)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_Batch_BatchTrust newBatchTrust = db.HJGL_Batch_BatchTrust.FirstOrDefault(e => e.TrustBatchId == batchTrust.TrustBatchId);
if (newBatchTrust != null)
{
@@ -105,7 +105,7 @@ namespace BLL
public static void UpdateBatchTrustAudit(string batchTrustId, bool isAudit)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_Batch_BatchTrust newBatchTrust = db.HJGL_Batch_BatchTrust.FirstOrDefault(e => e.TrustBatchId == batchTrustId);
if (newBatchTrust != null)
{
@@ -120,7 +120,7 @@ namespace BLL
/// <param name="batchTrustID"></param>
public static void DeleteBatchTrustById(string trustBatchId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_Batch_BatchTrust batchTrust = db.HJGL_Batch_BatchTrust.FirstOrDefault(e => e.TrustBatchId == trustBatchId);
if (batchTrust != null)
{
@@ -35,7 +35,7 @@ namespace BLL
public static List<Model.HJGL_Batch_PointBatchItem> GetGBatchDetailByBatchId(string batchId)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
{
return (from x in db.HJGL_Batch_PointBatchItem
join y in db.HJGL_WeldJoint
@@ -91,7 +91,7 @@ namespace BLL
/// <param name="isAudit"></param>
public static void PointAudit(string pointBatchItemId, bool isAudit)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_Batch_PointBatchItem newPointBatchItem = db.HJGL_Batch_PointBatchItem.FirstOrDefault(e => e.PointBatchItemId == pointBatchItemId);
if (newPointBatchItem != null)
{
@@ -110,7 +110,7 @@ namespace BLL
/// <param name="welderFirst"></param>
public static void UpdateWelderFirst(string pointBatchItemId, bool? welderFirst)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_Batch_PointBatchItem newPointBatchItem = db.HJGL_Batch_PointBatchItem.FirstOrDefault(e => e.PointBatchItemId == pointBatchItemId);
newPointBatchItem.IsWelderFirst = welderFirst;
@@ -124,7 +124,7 @@ namespace BLL
/// <param name="pipelineFirst"></param>
public static void UpdatePipelineFirst(string pointBatchItemId, bool? pipelineFirst)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_Batch_PointBatchItem newPointBatchItem = db.HJGL_Batch_PointBatchItem.FirstOrDefault(e => e.PointBatchItemId == pointBatchItemId);
newPointBatchItem.IsPipelineFirst = pipelineFirst;
@@ -138,7 +138,7 @@ namespace BLL
/// <param name="checkId"></param>
public static void DeleteBatchDetail(string jotId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_Batch_PointBatchItem batch = db.HJGL_Batch_PointBatchItem.FirstOrDefault(e => e.WeldJointId == jotId);
if (batch != null)
{
@@ -177,7 +177,7 @@ namespace BLL
/// <param name="batchDetailId"></param>
public static void DeleteBatchDetailById(string batchDetailId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_Batch_PointBatchItem batch = db.HJGL_Batch_PointBatchItem.FirstOrDefault(e => e.PointBatchItemId == batchDetailId);
if (batch != null)
{
@@ -191,7 +191,7 @@ namespace BLL
/// <param name="pointBatchId"></param>
public static void AutoPoint(string pointBatchId)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
{
int pointNum = 0;
int pointNumG = 0;
@@ -39,7 +39,7 @@ namespace BLL
/// <param name="check"></param>
public static void AddPointBatch(Model.HJGL_Batch_PointBatch batch)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_Batch_PointBatch newBatch = new Model.HJGL_Batch_PointBatch();
newBatch.PointBatchId = batch.PointBatchId;
newBatch.PointBatchCode = batch.PointBatchCode;
@@ -66,7 +66,7 @@ namespace BLL
/// <param name="checkId"></param>
public static void DeleteBatch(string batchId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_Batch_PointBatch batch = db.HJGL_Batch_PointBatch.FirstOrDefault(e => e.PointBatchId == batchId);
db.HJGL_Batch_PointBatch.DeleteOnSubmit(batch);
@@ -50,7 +50,7 @@ namespace BLL
/// <param name="NDEItem"></param>
public static void AddRepairRecord(Model.HJGL_RepairRecord repair)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_RepairRecord newRepair = new Model.HJGL_RepairRecord();
newRepair.RepairRecordId = repair.RepairRecordId;
newRepair.RepairRecordCode = repair.RepairRecordCode;
@@ -76,7 +76,7 @@ namespace BLL
public static void UpdateRepairRecord(Model.HJGL_RepairRecord repair)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_RepairRecord newRepair = db.HJGL_RepairRecord.FirstOrDefault(e => e.RepairRecordId == repair.RepairRecordId);
if (newRepair != null)
{
@@ -11,7 +11,7 @@ namespace BLL
public static List<Model.View_JointInfoAndIsoInfo> GetSpRepairSearchItems(string projectId, List<string> jotList, bool ckISO, bool ckWeld, string[] workAreaId, string unitId, string CH_TrustID)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
List<Model.View_JointInfoAndIsoInfo> SpRepairSearchItems = new List<Model.View_JointInfoAndIsoInfo>();
if (jotList != null)
{
@@ -9,7 +9,7 @@ namespace BLL
{
public class ShowTrustSearchService
{
public static Model.SGGLDB db = Funs.DB;
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 定义变量
@@ -10,7 +10,7 @@ namespace BLL
{
public class TrustManageEditService
{
public static Model.SGGLDB db = Funs.DB;
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 记录数
@@ -94,7 +94,7 @@ namespace BLL
/// <returns></returns>
public static Model.CH_Trust GetCH_TrustByID(string CH_TrustID)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
var view = db.CH_Trust.FirstOrDefault(e => e.CH_TrustID == CH_TrustID);
return view;
}
@@ -107,7 +107,7 @@ namespace BLL
/// <returns></returns>
public static bool IsExistTrustCode(string projectId, string trustCode)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
var q = from x in db.CH_Trust where x.ProjectId == projectId && x.CH_TrustCode == trustCode select x;
if (q.Count() > 0)
{
@@ -126,7 +126,7 @@ namespace BLL
/// <returns></returns>
public static List<Model.View_CH_TrustItem> GetView_CH_TrustItemByCH_TrustID(string CH_TrustID)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
var view = (from x in db.View_CH_TrustItem where x.CH_TrustID == CH_TrustID && x.JOT_JointStatus != "104" select x).ToList();
return view;
}
@@ -138,13 +138,13 @@ namespace BLL
/// <returns></returns>
public static List<Model.CH_TrustItem> GetCH_TrustItemByJOT_ID(string jot_id)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
var view = (from x in db.CH_TrustItem where x.JOT_ID == jot_id select x).ToList();
return view;
}
public static List<Model.CH_TrustItem> GetCH_TrustItemByISO_ID(string ISO_ID)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
var view = (from x in db.CH_TrustItem join j in db.PW_JointInfo on x.JOT_ID equals j.JOT_ID where j.ISO_ID == ISO_ID select x).ToList();
return view;
}
@@ -156,7 +156,7 @@ namespace BLL
/// <returns></returns>
public static Model.CH_TrustItem GetCH_TrustItemByJOT_IDAndJotId(string CH_TrustID, string jot_id)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
var view = db.CH_TrustItem.FirstOrDefault(x => x.CH_TrustID == CH_TrustID && x.JOT_ID == jot_id);
return view;
}
@@ -168,7 +168,7 @@ namespace BLL
/// <returns></returns>
public static List<Model.CH_TrustItem> GetCH_TrustItemByCH_TrustID(string CH_TrustID)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
var view = (from x in db.CH_TrustItem where x.CH_TrustID == CH_TrustID select x).ToList();
return view;
}
@@ -190,7 +190,7 @@ namespace BLL
/// <param name="cH_Trust">委托实体</param>
public static void AddCH_Trust(Model.CH_Trust cH_Trust)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.CH_Trust newCH_Trust = new Model.CH_Trust();
newCH_Trust.CH_TrustID = cH_Trust.CH_TrustID;
newCH_Trust.CH_TrustCode = cH_Trust.CH_TrustCode;
@@ -228,7 +228,7 @@ namespace BLL
/// <param name="weldReport">焊接实体</param>
public static void UpdateCH_Trust(Model.CH_Trust cH_Trust)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.CH_Trust newCH_Trust = db.CH_Trust.First(e => e.CH_TrustID == cH_Trust.CH_TrustID);
newCH_Trust.CH_TrustID = cH_Trust.CH_TrustID;
newCH_Trust.CH_TrustCode = cH_Trust.CH_TrustCode;
@@ -265,7 +265,7 @@ namespace BLL
/// <param name="cH_TrustID">委托主键</param>
public static void DeleteCH_TrustByCH_TrustID(string cH_TrustID)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.CH_Trust cH_Trust = db.CH_Trust.First(e => e.CH_TrustID == cH_TrustID);
db.CH_Trust.DeleteOnSubmit(cH_Trust);
db.SubmitChanges();
@@ -277,7 +277,7 @@ namespace BLL
/// <param name="cH_TrustID">委托主键</param>
public static void DeleteCH_TrustItemByCH_TrustID(string cH_TrustID)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
var cH_Trust = from x in db.CH_TrustItem where x.CH_TrustID == cH_TrustID select x;
if (cH_Trust != null)
{
@@ -306,7 +306,7 @@ namespace BLL
/// <param name="trustItem">委托明细实体</param>
public static void AddCH_TrustItem(Model.CH_TrustItem trustItem)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.CH_TrustItem newTrustItem = new Model.CH_TrustItem();
newTrustItem.CH_TrustItemID = SQLHelper.GetNewID(typeof(Model.CH_TrustItem));
@@ -321,7 +321,7 @@ namespace BLL
public static void upDataCH_TrustItem(string cH_TrustID, List<CH_TrustItem> trusts)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
var cH_Trust = from x in db.CH_TrustItem where x.CH_TrustID == cH_TrustID select x;
List<CH_TrustItem> needRemove = new List<CH_TrustItem>();
if (cH_Trust != null)//
@@ -403,7 +403,7 @@ namespace BLL
/// <param name="weldReport">焊接实体</param>
public static void AuditCH_Trust(Model.CH_Trust cH_Trust)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.CH_Trust newCH_Trust = db.CH_Trust.First(e => e.CH_TrustID == cH_Trust.CH_TrustID);
newCH_Trust.CH_TrustID = cH_Trust.CH_TrustID;
newCH_Trust.CH_AuditMan = cH_Trust.CH_AuditMan;
@@ -36,7 +36,7 @@ namespace BLL
/// <returns></returns>
public static bool IsExistPipelineCode(string pipelineCode, string workAreaId, string PipelineId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_Pipeline q = null;
if (!string.IsNullOrEmpty(PipelineId))
{
@@ -63,7 +63,7 @@ namespace BLL
/// <param name="pipeline"></param>
public static void AddPipeline(Model.HJGL_Pipeline pipeline)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_Pipeline newPipeline = new Model.HJGL_Pipeline();
newPipeline.PipelineId = pipeline.PipelineId;
newPipeline.ProjectId = pipeline.ProjectId;
@@ -98,7 +98,7 @@ namespace BLL
/// <param name="pipeline"></param>
public static void UpdatePipeline(Model.HJGL_Pipeline pipeline)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_Pipeline newPipeline = db.HJGL_Pipeline.FirstOrDefault(e => e.PipelineId == pipeline.PipelineId);
if (newPipeline != null)
{
@@ -146,7 +146,7 @@ namespace BLL
/// <param name="pipelineId"></param>
public static void DeletePipeline(string pipelineId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_Pipeline pipeline = db.HJGL_Pipeline.FirstOrDefault(e => e.PipelineId == pipelineId);
var jot = db.HJGL_Pipeline.Where(e => e.PipelineId == pipelineId);
if (pipeline != null)
@@ -26,7 +26,7 @@ namespace BLL
/// <returns></returns>
public static bool IsExistWeldJointCode(string weldJointCode, string pipelineId, string weldJointId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_WeldJoint jot = null;
if (!string.IsNullOrEmpty(weldJointId))
{
@@ -64,7 +64,7 @@ namespace BLL
/// <param name="weldJoint"></param>
public static void AddWeldJoint(Model.HJGL_WeldJoint weldJoint)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_WeldJoint newWeldJoint = new Model.HJGL_WeldJoint
{
WeldJointId = SQLHelper.GetNewID(typeof(Model.HJGL_WeldJoint)),
@@ -108,7 +108,7 @@ namespace BLL
/// <param name="weldJoint"></param>
public static void UpdateWeldJoint(Model.HJGL_WeldJoint weldJoint)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_WeldJoint newWeldJoint = db.HJGL_WeldJoint.FirstOrDefault(e => e.WeldJointId == weldJoint.WeldJointId);
if (newWeldJoint != null)
{
@@ -153,7 +153,7 @@ namespace BLL
/// <param name="weldJoint"></param>
public static void WriteBackWeldJoint(Model.HJGL_WeldJoint weldJoint)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_WeldJoint newWeldJoint = db.HJGL_WeldJoint.FirstOrDefault(e => e.WeldJointId == weldJoint.WeldJointId);
if (newWeldJoint != null)
{
@@ -172,7 +172,7 @@ namespace BLL
/// <param name="weldJointId"></param>
public static void DeleteWeldJointById(string weldJointId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_WeldJoint weldline = db.HJGL_WeldJoint.FirstOrDefault(e => e.WeldJointId == weldJointId);
if (weldline != null)
{
@@ -189,7 +189,7 @@ namespace BLL
/// <param name="operateState">日报操作(增加、删除)</param>
public static void UpdateWeldJointAddG(string weldJointId, string jointAttribute, string operateState)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
if (operateState == Const.BtnDelete || jointAttribute != "固定口")
{
Model.HJGL_WeldJoint deleteWeldJoint = db.HJGL_WeldJoint.FirstOrDefault(e => e.WeldJointId == weldJointId);
@@ -218,7 +218,7 @@ namespace BLL
/// <returns></returns>
public static Model.View_HJGL_WeldJoint GetViewWeldJointById(string weldJointId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
return db.View_HJGL_WeldJoint.FirstOrDefault(e => e.WeldJointId == weldJointId);
}
@@ -254,7 +254,7 @@ namespace BLL
/// <returns></returns>
public static bool GetWelderLimitDN(string projectId, string welderId, DateTime weldingDate)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
{
var jots = from x in db.HJGL_WeldJoint
join y in db.HJGL_WeldingDaily on x.WeldingDailyId equals y.WeldingDailyId
@@ -9,7 +9,7 @@ namespace BLL
{
public class WeldReportService
{
public static Model.SGGLDB db = Funs.DB;
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 根据检查编号查询焊接日报信息
@@ -63,7 +63,7 @@ namespace BLL
/// <param name="weldReport">焊接日报实体</param>
public static void AddWeldReport(Model.BO_WeldReportMain weldReport)
{
using (var db = new Model.SGGLDB(Funs.ConnString))
using (var db = new Model.CNPCDB(Funs.ConnString))
{
Model.BO_WeldReportMain newWeldReport = new Model.BO_WeldReportMain();
newWeldReport.DReportID = weldReport.DReportID;
@@ -87,7 +87,7 @@ namespace BLL
/// <param name="weldReport">焊接日报实体</param>
public static void UpdateWeldReport(Model.BO_WeldReportMain weldReport)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.BO_WeldReportMain newWeldReport = db.BO_WeldReportMain.First(e => e.DReportID == weldReport.DReportID);
newWeldReport.UnitId = weldReport.UnitId;
newWeldReport.InstallationId = weldReport.InstallationId;
@@ -106,7 +106,7 @@ namespace BLL
/// <param name="weldReportCode">焊接日报主键</param>
public static void DeleteWeldReportByDReportID(string dReportID)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.BO_WeldReportMain weldReport = db.BO_WeldReportMain.First(e => e.DReportID == dReportID);
db.BO_WeldReportMain.DeleteOnSubmit(weldReport);
db.SubmitChanges();
@@ -215,7 +215,7 @@ namespace BLL
/// <param name="WeldingDaily"></param>
public static void AddWeldingDaily(Model.HJGL_WeldingDaily WeldingDaily)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_WeldingDaily newWeldingDaily = new HJGL_WeldingDaily
{
WeldingDailyId = WeldingDaily.WeldingDailyId,
@@ -239,7 +239,7 @@ namespace BLL
/// <param name="WeldingDaily"></param>
public static void UpdateWeldingDaily(Model.HJGL_WeldingDaily WeldingDaily)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_WeldingDaily newWeldingDaily = db.HJGL_WeldingDaily.FirstOrDefault(e => e.WeldingDailyId == WeldingDaily.WeldingDailyId);
if (newWeldingDaily != null)
{
@@ -260,7 +260,7 @@ namespace BLL
/// <param name="WeldingDailyId"></param>
public static void DeleteWeldingDaily(string WeldingDailyId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.HJGL_WeldingDaily delWeldingDaily = db.HJGL_WeldingDaily.FirstOrDefault(e => e.WeldingDailyId == WeldingDailyId);
if (delWeldingDaily != null)
{