20250318 质量优化
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using BLL;
|
||||
using BLL.CQMS.Comprehensive;
|
||||
using FineUIPro.Web.Comprehensive;
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
@@ -46,7 +47,8 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
var inspectionEquipment = BLL.InspectionEquipmentService.GetInspectionEquipmentById(this.InspectionEquipmentId);
|
||||
if (inspectionEquipment != null)
|
||||
{
|
||||
this.InspectionEquipmentId = inspectionEquipment.InspectionEquipmentId;
|
||||
this.InspectionEquipmentId = inspectionEquipment.InspectionEquipmentId;
|
||||
this.hdAttachUrl.Text = this.InspectionEquipmentId;
|
||||
if (!string.IsNullOrEmpty(inspectionEquipment.UnitId))
|
||||
{
|
||||
this.drpUnitId.SelectedValue = inspectionEquipment.UnitId;
|
||||
@@ -287,7 +289,16 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(this.InspectionEquipmentId))
|
||||
{ newInspectionEquipment.InspectionEquipmentId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionPerson));
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
|
||||
{
|
||||
newInspectionEquipment.InspectionEquipmentId = this.hdAttachUrl.Text;
|
||||
}
|
||||
else
|
||||
{
|
||||
newInspectionEquipment.InspectionEquipmentId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionPerson));
|
||||
this.hdAttachUrl.Text = newInspectionEquipment.InspectionEquipmentId;
|
||||
}
|
||||
newInspectionEquipment.CompileMan = this.CurrUser.UserId;
|
||||
newInspectionEquipment.CompileDate = DateTime.Now;
|
||||
newInspectionEquipment.Status = BLL.Const.Comprehensive_Compile;
|
||||
@@ -502,18 +513,18 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
/// <param name="e"></param>
|
||||
protected void btnAttach_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.InspectionEquipmentId)) //新增记录
|
||||
if (string.IsNullOrEmpty(this.hdAttachUrl.Text)) //新增记录
|
||||
{
|
||||
this.InspectionEquipmentId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionEquipment));
|
||||
this.hdAttachUrl.Text = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionEquipment));
|
||||
}
|
||||
//var oldInspectionEquipment = Funs.DB.Comprehensive_InspectionEquipment.Where(u => u.InspectionEquipmentId == this.InspectionEquipmentId).FirstOrDefault();
|
||||
//if (oldInspectionEquipment.Status == BLL.Const.Comprehensive_Complete)
|
||||
//Model.Comprehensive_InspectionPerson inspectionPerson = BLL.InspectionPersonService.GetInspectionPersonById(this.InspectionPersonId);
|
||||
//if (inspectionPerson.Status == BLL.Const.Comprehensive_Complete)
|
||||
//{
|
||||
// PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CQMS/InspectionEquipment&menuId={1}", this.InspectionEquipmentId, BLL.Const.InspectionEquipmentMenuId)));
|
||||
// PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CQMS/inspectionPerson&menuId={1}", this.hdAttachUrl.Text, BLL.Const.InspectionPersonMenuId)));
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/InspectionEquipment&menuId={1}", this.InspectionEquipmentId, BLL.Const.InspectionEquipmentMenuId)));
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/InspectionEquipment&menuId={1}", this.hdAttachUrl.Text, BLL.Const.InspectionEquipmentMenuId)));
|
||||
//}
|
||||
}
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user