diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosureEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosureEdit.aspx.cs index de6eb01f..30e346f3 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosureEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosureEdit.aspx.cs @@ -93,7 +93,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive return; } - var q = Funs.DB.Comprehensive_ConTechnologyDisclosure.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.ConTechnologyDisclosureId != this.ConTechnologyDisclosureId || (this.ConTechnologyDisclosureId == null && x.ConTechnologyDisclosureId != null))); + var q = Funs.DB.Comprehensive_ConTechnologyDisclosure.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.ConTechnologyDisclosureId != this.ConTechnologyDisclosureId || (this.ConTechnologyDisclosureId == null && x.ConTechnologyDisclosureId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocEdit.aspx.cs index d7b57600..d7159bba 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocEdit.aspx.cs @@ -212,7 +212,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Comprehensive_DataReceivingDoc.FirstOrDefault(x => x.RemarkCode ==Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DataReceivingDocId != this.DataReceivingDocId || (this.DataReceivingDocId == null && x.DataReceivingDocId != null))); + var q = Funs.DB.Comprehensive_DataReceivingDoc.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode ==Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DataReceivingDocId != this.DataReceivingDocId || (this.DataReceivingDocId == null && x.DataReceivingDocId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderEdit.aspx.cs index 8782ad1e..971fdfe0 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderEdit.aspx.cs @@ -181,7 +181,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Comprehensive_DesignChangeOrder.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DesignChangeOrderId != this.DesignChangeOrderId || (this.DesignChangeOrderId == null && x.DesignChangeOrderId != null))); + var q = Funs.DB.Comprehensive_DesignChangeOrder.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DesignChangeOrderId != this.DesignChangeOrderId || (this.DesignChangeOrderId == null && x.DesignChangeOrderId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); @@ -269,7 +269,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Comprehensive_DesignChangeOrder.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DesignChangeOrderId != this.DesignChangeOrderId || (this.DesignChangeOrderId == null && x.DesignChangeOrderId != null))); + var q = Funs.DB.Comprehensive_DesignChangeOrder.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DesignChangeOrderId != this.DesignChangeOrderId || (this.DesignChangeOrderId == null && x.DesignChangeOrderId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsEdit.aspx.cs index 32679055..b508159b 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsEdit.aspx.cs @@ -176,7 +176,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Comprehensive_DesignDetails.FirstOrDefault(x => x.RemarCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DesignDetailsId != this.DesignDetailsId || (this.DesignDetailsId == null && x.DesignDetailsId != null))); + var q = Funs.DB.Comprehensive_DesignDetails.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DesignDetailsId != this.DesignDetailsId || (this.DesignDetailsId == null && x.DesignDetailsId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); @@ -263,7 +263,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Comprehensive_DesignDetails.FirstOrDefault(x => x.RemarCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DesignDetailsId != this.DesignDetailsId || (this.DesignDetailsId == null && x.DesignDetailsId != null))); + var q = Funs.DB.Comprehensive_DesignDetails.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DesignDetailsId != this.DesignDetailsId || (this.DesignDetailsId == null && x.DesignDetailsId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsEdit.aspx.cs index 5d203926..7167b13b 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsEdit.aspx.cs @@ -171,7 +171,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Comprehensive_DesignDrawings.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DesignDrawingsId != this.DesignDrawingsId || (this.DesignDrawingsId == null && x.DesignDrawingsId != null))); + var q = Funs.DB.Comprehensive_DesignDrawings.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DesignDrawingsId != this.DesignDrawingsId || (this.DesignDrawingsId == null && x.DesignDrawingsId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); @@ -257,7 +257,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Comprehensive_DesignDrawings.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DesignDrawingsId != this.DesignDrawingsId || (this.DesignDrawingsId == null && x.DesignDrawingsId != null))); + var q = Funs.DB.Comprehensive_DesignDrawings.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DesignDrawingsId != this.DesignDrawingsId || (this.DesignDrawingsId == null && x.DesignDrawingsId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalEdit.aspx.cs index b39dbdef..12819210 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalEdit.aspx.cs @@ -91,7 +91,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Comprehensive_GeneralPlanApproval.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.GeneralPlanApprovalId != this.GeneralPlanApprovalId || (this.GeneralPlanApprovalId == null && x.GeneralPlanApprovalId != null))); + var q = Funs.DB.Comprehensive_GeneralPlanApproval.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.GeneralPlanApprovalId != this.GeneralPlanApprovalId || (this.GeneralPlanApprovalId == null && x.GeneralPlanApprovalId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx.cs index 4da28c17..0ab3bba4 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx.cs @@ -243,7 +243,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择报验单位!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Comprehensive_InspectionEquipment.FirstOrDefault(x => x.RemarkCode ==Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionEquipmentId != this.InspectionEquipmentId || (this.InspectionEquipmentId == null && x.InspectionEquipmentId != null))); + var q = Funs.DB.Comprehensive_InspectionEquipment.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionEquipmentId != this.InspectionEquipmentId || (this.InspectionEquipmentId == null && x.InspectionEquipmentId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineEdit.aspx.cs index b747c313..775f42c2 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineEdit.aspx.cs @@ -193,7 +193,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择报验单位!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Comprehensive_InspectionMachine.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionMachineId != this.InspectionMachineId || (this.InspectionMachineId == null && x.InspectionMachineId != null))); + var q = Funs.DB.Comprehensive_InspectionMachine.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionMachineId != this.InspectionMachineId || (this.InspectionMachineId == null && x.InspectionMachineId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); @@ -268,7 +268,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择报验单位!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Comprehensive_InspectionMachine.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionMachineId != this.InspectionMachineId || (this.InspectionMachineId == null && x.InspectionMachineId != null))); + var q = Funs.DB.Comprehensive_InspectionMachine.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionMachineId != this.InspectionMachineId || (this.InspectionMachineId == null && x.InspectionMachineId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonEdit.aspx.cs index 68154aa6..45a6ea71 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonEdit.aspx.cs @@ -225,7 +225,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive return; } } - var q = Funs.DB.Comprehensive_InspectionPerson.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionPersonId != this.InspectionPersonId || (this.InspectionPersonId == null && x.InspectionPersonId != null))); + var q = Funs.DB.Comprehensive_InspectionPerson.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionPersonId != this.InspectionPersonId || (this.InspectionPersonId == null && x.InspectionPersonId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); @@ -410,7 +410,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive return; } } - var q = Funs.DB.Comprehensive_InspectionPerson.FirstOrDefault(x => x.RemarkCode ==Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionPersonId != this.InspectionPersonId || (this.InspectionPersonId == null && x.InspectionPersonId != null))); + var q = Funs.DB.Comprehensive_InspectionPerson.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode ==Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionPersonId != this.InspectionPersonId || (this.InspectionPersonId == null && x.InspectionPersonId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionTestPlanEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionTestPlanEdit.aspx.cs index 5acb22a7..19c4dc18 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionTestPlanEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionTestPlanEdit.aspx.cs @@ -105,7 +105,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Inspection_Test_Plan.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.Id != this.Id || (this.Id == null && x.Id != null))); + var q = Funs.DB.Inspection_Test_Plan.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.Id != this.Id || (this.Id == null && x.Id != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApprovalEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApprovalEdit.aspx.cs index cd64a4e1..2f927704 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApprovalEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApprovalEdit.aspx.cs @@ -90,7 +90,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Comprehensive_MajorPlanApproval.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.MajorPlanApprovalId != this.MajorPlanApprovalId || (this.MajorPlanApprovalId == null && x.MajorPlanApprovalId != null))); + var q = Funs.DB.Comprehensive_MajorPlanApproval.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.MajorPlanApprovalId != this.MajorPlanApprovalId || (this.MajorPlanApprovalId == null && x.MajorPlanApprovalId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.cs index b6763aba..d17a66e0 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.cs @@ -201,7 +201,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive return; } - var q = Funs.DB.Comprehensive_NCRManagement.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.NCRManagementId != this.NCRManagementId || (this.NCRManagementId == null && x.NCRManagementId != null))); + var q = Funs.DB.Comprehensive_NCRManagement.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.NCRManagementId != this.NCRManagementId || (this.NCRManagementId == null && x.NCRManagementId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); @@ -327,7 +327,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Comprehensive_NCRManagement.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.NCRManagementId != this.NCRManagementId || (this.NCRManagementId == null && x.NCRManagementId != null))); + var q = Funs.DB.Comprehensive_NCRManagement.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.NCRManagementId != this.NCRManagementId || (this.NCRManagementId == null && x.NCRManagementId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeEdit.aspx.cs index 65d06056..6d75c0fe 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeEdit.aspx.cs @@ -164,7 +164,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择所属单位!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Comprehensive_PressurePipe.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.PressurePipeId != this.PressurePipeId || (this.PressurePipeId == null && x.PressurePipeId != null))); + var q = Funs.DB.Comprehensive_PressurePipe.FirstOrDefault(x => x.Projctid == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.PressurePipeId != this.PressurePipeId || (this.PressurePipeId == null && x.PressurePipeId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); @@ -250,7 +250,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择所属单位!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Comprehensive_PressurePipe.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.PressurePipeId != this.PressurePipeId || (this.PressurePipeId == null && x.PressurePipeId != null))); + var q = Funs.DB.Comprehensive_PressurePipe.FirstOrDefault(x => x.Projctid == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.PressurePipeId != this.PressurePipeId || (this.PressurePipeId == null && x.PressurePipeId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentEdit.aspx.cs index 7c08b396..350d6554 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentEdit.aspx.cs @@ -152,7 +152,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { if (drpUnit.SelectedValue != BLL.Const._Null) { - var q = Funs.DB.Comprehensive_QualityAccident.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.QualityAccidentId != this.QualityAccidentId || (this.QualityAccidentId == null && x.QualityAccidentId != null))); + var q = Funs.DB.Comprehensive_QualityAccident.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.QualityAccidentId != this.QualityAccidentId || (this.QualityAccidentId == null && x.QualityAccidentId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); @@ -232,7 +232,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { if (drpUnit.SelectedValue != BLL.Const._Null) { - var q = Funs.DB.Comprehensive_QualityAccident.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.QualityAccidentId != this.QualityAccidentId || (this.QualityAccidentId == null && x.QualityAccidentId != null))); + var q = Funs.DB.Comprehensive_QualityAccident.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.QualityAccidentId != this.QualityAccidentId || (this.QualityAccidentId == null && x.QualityAccidentId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsEdit.aspx.cs index f63213ef..78007deb 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsEdit.aspx.cs @@ -212,7 +212,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Comprehensive_ReviewDrawings.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.Id != this.Id || (this.Id == null && x.Id != null))); + var q = Funs.DB.Comprehensive_ReviewDrawings.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.Id != this.Id || (this.Id == null && x.Id != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); @@ -293,7 +293,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Comprehensive_ReviewDrawings.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.Id != this.Id || (this.Id == null && x.Id != null))); + var q = Funs.DB.Comprehensive_ReviewDrawings.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.Id != this.Id || (this.Id == null && x.Id != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagementEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagementEdit.aspx.cs index 35cdefa5..fe9f9d7c 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagementEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagementEdit.aspx.cs @@ -174,7 +174,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Comprehensive_SiteVisaManagement.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.VisaId != this.VisaId || (this.VisaId == null && x.VisaId != null))); + var q = Funs.DB.Comprehensive_SiteVisaManagement.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.VisaId != this.VisaId || (this.VisaId == null && x.VisaId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); @@ -247,7 +247,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Comprehensive_SiteVisaManagement.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.VisaId != this.VisaId || (this.VisaId == null && x.VisaId != null))); + var q = Funs.DB.Comprehensive_SiteVisaManagement.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.VisaId != this.VisaId || (this.VisaId == null && x.VisaId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipmentEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipmentEdit.aspx.cs index 4c14e70a..136ff62f 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipmentEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipmentEdit.aspx.cs @@ -169,7 +169,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择所属单位!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Comprehensive_SpecialEquipment.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.SpecialEquipmentId != this.SpecialEquipmentId || (this.SpecialEquipmentId == null && x.SpecialEquipmentId != null))); + var q = Funs.DB.Comprehensive_SpecialEquipment.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.SpecialEquipmentId != this.SpecialEquipmentId || (this.SpecialEquipmentId == null && x.SpecialEquipmentId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); @@ -250,7 +250,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择所属单位!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Comprehensive_SpecialEquipment.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.SpecialEquipmentId != this.SpecialEquipmentId || (this.SpecialEquipmentId == null && x.SpecialEquipmentId != null))); + var q = Funs.DB.Comprehensive_SpecialEquipment.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.SpecialEquipmentId != this.SpecialEquipmentId || (this.SpecialEquipmentId == null && x.SpecialEquipmentId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecordsEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecordsEdit.aspx.cs index 39e9e0dc..2d1c9f27 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecordsEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecordsEdit.aspx.cs @@ -69,7 +69,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Comprehensive_TrainingRecords.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.TrainingRecordsId != this.TrainingRecordsId || (this.TrainingRecordsId == null && x.TrainingRecordsId != null))); + var q = Funs.DB.Comprehensive_TrainingRecords.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.TrainingRecordsId != this.TrainingRecordsId || (this.TrainingRecordsId == null && x.TrainingRecordsId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); diff --git a/SGGL/FineUIPro.Web/Web.config b/SGGL/FineUIPro.Web/Web.config index f50b26d3..9fc55c34 100644 --- a/SGGL/FineUIPro.Web/Web.config +++ b/SGGL/FineUIPro.Web/Web.config @@ -12,7 +12,7 @@ - +