1
This commit is contained in:
@@ -262,6 +262,24 @@ namespace BLL
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region 用户Id判断
|
||||||
|
|
||||||
|
#region 根据用户ID判断是超管
|
||||||
|
/// <summary>
|
||||||
|
/// 根据用户ID判断是超管
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static bool IsSuperAdminManage(string userId)
|
||||||
|
{
|
||||||
|
bool result = false;
|
||||||
|
if (userId == Const.luofeiId || userId == Const.shizhiyangId || userId == Const.hfnbdId || userId == Const.sysglyId)
|
||||||
|
{//罗菲、史志扬、管理员账号
|
||||||
|
result = true;
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region 获取当前人是否具有按钮操作权限
|
#region 获取当前人是否具有按钮操作权限
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取当前人是否具有按钮操作权限
|
/// 获取当前人是否具有按钮操作权限
|
||||||
@@ -425,6 +443,8 @@ namespace BLL
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region 根据主键删除附件
|
#region 根据主键删除附件
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///根据主键删除附件
|
///根据主键删除附件
|
||||||
|
|||||||
@@ -192,7 +192,8 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
|||||||
Model.SitePerson_Person newPerson = new Model.SitePerson_Person
|
Model.SitePerson_Person newPerson = new Model.SitePerson_Person
|
||||||
{
|
{
|
||||||
ProjectId = this.ProjectId,
|
ProjectId = this.ProjectId,
|
||||||
PersonId = SQLHelper.GetNewID(typeof(Model.SitePerson_Person)),
|
//PersonId = SQLHelper.GetNewID(typeof(Model.SitePerson_Person)),
|
||||||
|
PersonId = user.UserId,
|
||||||
UnitId = user.UnitId,
|
UnitId = user.UnitId,
|
||||||
IdentityCard = user.IdentityCard,
|
IdentityCard = user.IdentityCard,
|
||||||
IdcardType = "SHENFEN_ZHENGJIAN",
|
IdcardType = "SHENFEN_ZHENGJIAN",
|
||||||
|
|||||||
@@ -68,8 +68,11 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
|||||||
//权限按钮方法
|
//权限按钮方法
|
||||||
this.GetButtonPower();
|
this.GetButtonPower();
|
||||||
}
|
}
|
||||||
////权限按钮方法
|
if (CommonService.IsSuperAdminManage(this.CurrUser.UserId))
|
||||||
//this.GetButtonPower();
|
{
|
||||||
|
//权限按钮方法
|
||||||
|
this.GetButtonPower();
|
||||||
|
}
|
||||||
this.btnMenuDelete.OnClientClick = Grid1.GetNoSelectionAlertReference("请至少选择一项!");
|
this.btnMenuDelete.OnClientClick = Grid1.GetNoSelectionAlertReference("请至少选择一项!");
|
||||||
this.btnMenuDelete.ConfirmText = String.Format("你确定要删除选中的 <b><script>{0}</script></b> 行数据吗?", Grid1.GetSelectedCountReference());
|
this.btnMenuDelete.ConfirmText = String.Format("你确定要删除选中的 <b><script>{0}</script></b> 行数据吗?", Grid1.GetSelectedCountReference());
|
||||||
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
|
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
|
||||||
@@ -89,7 +92,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
|||||||
this.InitTreeMenu();
|
this.InitTreeMenu();
|
||||||
this.BindGrid();
|
this.BindGrid();
|
||||||
this.GetButtonPower();
|
this.GetButtonPower();
|
||||||
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId) && !CommonService.IsSuperAdminManage(this.CurrUser.UserId))
|
||||||
{
|
{
|
||||||
btnNew.Hidden = true;
|
btnNew.Hidden = true;
|
||||||
btnImport.Hidden = true;
|
btnImport.Hidden = true;
|
||||||
@@ -599,6 +602,19 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
|||||||
protected void btnSearchUserAdd_Click(object sender, EventArgs e)
|
protected void btnSearchUserAdd_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
string projectId = this.CurrUser.LoginProjectId;
|
string projectId = this.CurrUser.LoginProjectId;
|
||||||
|
|
||||||
|
if (this.tvProjectAndUnit.SelectedNodeID.Contains("|"))
|
||||||
|
{
|
||||||
|
string id = this.tvProjectAndUnit.SelectedNodeID;
|
||||||
|
string[] str = id.Split('|');
|
||||||
|
if (str.Count() > 1)
|
||||||
|
{
|
||||||
|
string unitId = id.Split('|')[0];
|
||||||
|
projectId = id.Split('|')[1];
|
||||||
|
//PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PersonListEdit.aspx?ProjectId={0}&&UnitId={1}", projectId, unitId, "编辑 - ")));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
PageContext.RegisterStartupScript(Window4.GetShowReference(String.Format("PersonAddFromUser.aspx?ProjectId={0}", projectId, "编辑 - ")));
|
PageContext.RegisterStartupScript(Window4.GetShowReference(String.Format("PersonAddFromUser.aspx?ProjectId={0}", projectId, "编辑 - ")));
|
||||||
|
|
||||||
//if (this.tvProjectAndUnit.SelectedNodeID.Contains("|"))
|
//if (this.tvProjectAndUnit.SelectedNodeID.Contains("|"))
|
||||||
@@ -790,7 +806,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
|||||||
this.btnPersonUnit.Hidden = false;
|
this.btnPersonUnit.Hidden = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.CurrUser.UserId == Const.luofeiId || this.CurrUser.UserId == Const.shizhiyangId || this.CurrUser.UserId == Const.hfnbdId || this.CurrUser.UserId == Const.sysglyId)
|
if (CommonService.IsSuperAdminManage(this.CurrUser.UserId))
|
||||||
{//罗菲、史志扬、管理员账号
|
{//罗菲、史志扬、管理员账号
|
||||||
this.btnSearchUserAdd.Hidden = false;
|
this.btnSearchUserAdd.Hidden = false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user