1
This commit is contained in:
@@ -39,11 +39,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
BLL.UnitService.InitUnitDownList(this.drpUnitIds, this.CurrUser.LoginProjectId, false);
|
||||
BLL.UnitService.InitAllUnitDownList(this.drpSendUnit, this.CurrUser.LoginProjectId, true);
|
||||
BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessionalId, true);
|
||||
BLL.UserService.InitUserProjectIdUnitIdDropDownList(this.drpSupervisor, this.CurrUser.LoginProjectId, BLL.Const.UnitId_CWCEC, true);//监督人
|
||||
//LoadAuditSelect();
|
||||
//this.agree.Hidden = true;
|
||||
//this.options.Hidden = true;
|
||||
|
||||
BLL.UserService.InitUserProjectIdUnitIdDropDownList(this.drpSupervisor, this.CurrUser.LoginProjectId, BLL.Const.UnitId_CWCEC, false);//监督人
|
||||
//LoadAuditSelect();
|
||||
//this.agree.Hidden = true;
|
||||
//this.options.Hidden = true;
|
||||
|
||||
this.NCRManagementId = Request.Params["NCRManagementId"];
|
||||
Model.Comprehensive_NCRManagement nCRManagement = BLL.NCRManagementService.GetNCRManagementById(this.NCRManagementId);
|
||||
if (nCRManagement != null)
|
||||
@@ -80,9 +80,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
{
|
||||
this.txtCompleteDate.Text = string.Format("{0:yyyy-MM-dd}", nCRManagement.CompleteDate);
|
||||
}
|
||||
if (nCRManagement.Problem!=null)
|
||||
if (nCRManagement.Problem != null)
|
||||
{
|
||||
this.ddlProblem.SelectedValue = nCRManagement.Problem;
|
||||
string[] strs = nCRManagement.Problem.Split(',');
|
||||
this.ddlProblem.SelectedValueArray = strs;
|
||||
}
|
||||
this.txtMeasure.Text = nCRManagement.Measure;
|
||||
this.txtRemarkCode.Text = nCRManagement.RemarkCode.HasValue ? nCRManagement.RemarkCode.ToString() : "";
|
||||
@@ -93,9 +94,23 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
|
||||
if (!string.IsNullOrEmpty(nCRManagement.Supervisor))
|
||||
{
|
||||
this.drpSupervisor.SelectedValue = nCRManagement.Supervisor;
|
||||
var users = BLL.UserService.GetUserListByProjectIdAndUnitId(this.CurrUser.LoginProjectId, BLL.Const.UnitId_CWCEC);
|
||||
var totalUsers = from x in Funs.DB.Sys_User where x.UnitId == BLL.Const.UnitId_CWCEC select x;
|
||||
var userIds = users.Select(x => x.UserId);
|
||||
string[] strs = nCRManagement.Supervisor.Split(',');
|
||||
foreach (var item in strs)
|
||||
{
|
||||
if (!userIds.Contains(item))
|
||||
{
|
||||
var user = totalUsers.FirstOrDefault(x => x.UserId == item);
|
||||
users.Add(user);
|
||||
}
|
||||
}
|
||||
this.drpSupervisor.DataSource = users;
|
||||
this.drpSupervisor.DataBind();
|
||||
this.drpSupervisor.SelectedValueArray = strs;
|
||||
}
|
||||
|
||||
|
||||
//var currApprove = NCRManagementApproveService.GetCurrentApprove(nCRManagement.NCRManagementId);
|
||||
//if (currApprove != null)
|
||||
//{
|
||||
@@ -195,7 +210,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.drpSendUnit.SelectedValue==BLL.Const._Null)
|
||||
if (this.drpSendUnit.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("请选择发出单位!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
@@ -230,10 +245,16 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
nCRManagement.Contents = this.txtContents.Text.Trim();
|
||||
|
||||
#region 新增2024-03-29
|
||||
if (this.ddlProblem.SelectedValue != BLL.Const._Null)
|
||||
string problem = string.Empty;
|
||||
foreach (var item in this.ddlProblem.SelectedValueArray)
|
||||
{
|
||||
nCRManagement.Problem = this.ddlProblem.SelectedValue;
|
||||
problem += item + ",";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(problem))
|
||||
{
|
||||
problem = problem.Substring(0, problem.Length - 1);
|
||||
}
|
||||
nCRManagement.Problem = problem;
|
||||
nCRManagement.Measure = this.txtMeasure.Text.Trim();
|
||||
#endregion
|
||||
|
||||
@@ -252,7 +273,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
}
|
||||
nCRManagement.ResponsibleMan = this.txtResponsibleMan.Text.Trim();
|
||||
nCRManagement.ImplementationFrontState = this.ddlImplementationFrontState.SelectedValue.Trim();
|
||||
|
||||
|
||||
|
||||
string ids = string.Empty;
|
||||
var lists = this.drpUnitWorkIds.SelectedValueArray;
|
||||
@@ -278,10 +299,16 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
}
|
||||
nCRManagement.ReceiveUnit = unitIds;
|
||||
nCRManagement.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
|
||||
if (this.drpSupervisor.SelectedValue!=BLL.Const._Null)
|
||||
string supervisor = string.Empty;
|
||||
foreach (var item in this.drpSupervisor.SelectedValueArray)
|
||||
{
|
||||
nCRManagement.Supervisor = this.drpSupervisor.SelectedValue;
|
||||
supervisor += item + ",";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(supervisor))
|
||||
{
|
||||
supervisor = supervisor.Substring(0, supervisor.Length - 1);
|
||||
}
|
||||
nCRManagement.Supervisor = supervisor;
|
||||
if (string.IsNullOrEmpty(this.NCRManagementId))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.hdAttachUrl.Text))
|
||||
@@ -560,7 +587,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/nCRManagement&menuId={1}", this.hdAttachUrl.Text, BLL.Const.NCRManagementMenuId)));
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/nCRManagement&menuId={1}", this.hdAttachUrl.Text, BLL.Const.NCRManagementMenuId)));
|
||||
//}
|
||||
}
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user