20240429 修改综合管理导入导出

This commit is contained in:
2024-04-29 19:13:54 +08:00
parent fc56b1f6c2
commit a3e123957d
48 changed files with 560 additions and 266 deletions
@@ -82,7 +82,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
this.drpSamplingResult.SelectedValue = inspectionEquipment.SamplingResult;
}
this.txtInspectionDate.Text = inspectionEquipment.InspectionDate.HasValue ? string.Format("{0:yyyy-MM-dd}", inspectionEquipment.InspectionDate) : "";
this.txtRemarkCode.Text = inspectionEquipment.RemarkCode;
this.txtRemarkCode.Text = inspectionEquipment.RemarkCode.HasValue ? inspectionEquipment.RemarkCode.ToString() : "";
this.txtEquipmentNo.Text = inspectionEquipment.EquipmentNO;
this.txtUsedPlace.Text = inspectionEquipment.UsedPlace;
var currApprove = InspectionEquipmentApproveService.GetCurrentApprove(inspectionEquipment.InspectionEquipmentId);
@@ -243,6 +243,12 @@ 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)));
if (q != null)
{
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
return;
}
Model.Comprehensive_InspectionEquipment newInspectionEquipment = new Model.Comprehensive_InspectionEquipment();
newInspectionEquipment.ProjectId = this.CurrUser.LoginProjectId;
@@ -256,7 +262,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
newInspectionEquipment.Specifications = this.txtSpecifications.Text.Trim();
newInspectionEquipment.Supplier = this.txtSupplier.Text.Trim();
newInspectionEquipment.EquipmentNO = this.txtEquipmentNo.Text.Trim();
newInspectionEquipment.RemarkCode = this.txtRemarkCode.Text.Trim();
newInspectionEquipment.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
newInspectionEquipment.Counts = this.txtCounts.Text.Trim();
newInspectionEquipment.Unit = this.txtUnit.Text.Trim();
newInspectionEquipment.SamplingCount = this.txtSamplingCount.Text.Trim();
@@ -324,6 +330,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive
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)));
if (q != null)
{
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
return;
}
Model.Comprehensive_InspectionEquipment newInspectionEquipment = new Model.Comprehensive_InspectionEquipment();
newInspectionEquipment.ProjectId = this.CurrUser.LoginProjectId;
newInspectionEquipment.UnitId = this.drpUnitId.SelectedValue;
@@ -336,7 +348,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
newInspectionEquipment.Specifications = this.txtSpecifications.Text.Trim();
newInspectionEquipment.Supplier = this.txtSupplier.Text.Trim();
newInspectionEquipment.EquipmentNO = this.txtEquipmentNo.Text.Trim();
newInspectionEquipment.RemarkCode = this.txtRemarkCode.Text.Trim();
newInspectionEquipment.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
newInspectionEquipment.Counts = this.txtCounts.Text.Trim();
newInspectionEquipment.Unit = this.txtUnit.Text.Trim();
newInspectionEquipment.SamplingCount = this.txtSamplingCount.Text.Trim();