fix:施工分包部分字段不可修改
This commit is contained in:
parent
9a169d1711
commit
28b9b2cfba
|
@ -47,6 +47,7 @@ namespace FineUIPro.Web.Transfer
|
|||
{
|
||||
this.Id = Request.Params["Id"];
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
ProhibitedFields();
|
||||
var TransferPunchlistFrom = Funs.DB.Transfer_PunchlistFrom.FirstOrDefault(p => p.Id == this.Id);
|
||||
if (TransferPunchlistFrom != null)
|
||||
{
|
||||
|
@ -97,6 +98,37 @@ namespace FineUIPro.Web.Transfer
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 禁止编辑字段事件触发时。
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ProhibitedFields()
|
||||
{
|
||||
var query = (from projectUser in Funs.DB.Project_ProjectUser
|
||||
join projectUnit in Funs.DB.Project_ProjectUnit on new { projectUser.UnitId, projectUser.ProjectId }
|
||||
equals new { projectUnit.UnitId, projectUnit.ProjectId } into projectUnitJoin
|
||||
from projectUnit in projectUnitJoin.DefaultIfEmpty()
|
||||
join sysConst in Funs.DB.Sys_Const on new
|
||||
{ GroupId = "ProjectUnitType", ConstValue = projectUnit.UnitType } equals new
|
||||
{ sysConst.GroupId, sysConst.ConstValue } into sysConstJoin
|
||||
from sysConst in sysConstJoin.DefaultIfEmpty()
|
||||
where projectUser.UserId == this.CurrUser.UserId
|
||||
select sysConst.ConstValue)
|
||||
.Distinct().FirstOrDefault();
|
||||
|
||||
if (query != null && query == "2")
|
||||
{
|
||||
this.txtConfirmed_By.Readonly = true;
|
||||
this.txtConfirmed_Date.Readonly = true;
|
||||
this.txtVerified_By.Readonly = true;
|
||||
this.txtVerified_Date.Readonly = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Photoes附件上传
|
||||
/// </summary>
|
||||
|
|
Loading…
Reference in New Issue