diff --git a/SGGL/BLL/Common/CommonService.cs b/SGGL/BLL/Common/CommonService.cs
index 69274ecb..9d7189fc 100644
--- a/SGGL/BLL/Common/CommonService.cs
+++ b/SGGL/BLL/Common/CommonService.cs
@@ -262,6 +262,24 @@ namespace BLL
}
#endregion
+ #region 用户Id判断
+
+ #region 根据用户ID判断是超管
+ ///
+ /// 根据用户ID判断是超管
+ ///
+ ///
+ 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 获取当前人是否具有按钮操作权限
///
/// 获取当前人是否具有按钮操作权限
@@ -425,6 +443,8 @@ namespace BLL
}
#endregion
+ #endregion
+
#region 根据主键删除附件
///
///根据主键删除附件
diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonAddFromUser.aspx.cs b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonAddFromUser.aspx.cs
index 05a7980a..abf9dfa2 100644
--- a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonAddFromUser.aspx.cs
+++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonAddFromUser.aspx.cs
@@ -192,7 +192,8 @@ namespace FineUIPro.Web.HSSE.SitePerson
Model.SitePerson_Person newPerson = new Model.SitePerson_Person
{
ProjectId = this.ProjectId,
- PersonId = SQLHelper.GetNewID(typeof(Model.SitePerson_Person)),
+ //PersonId = SQLHelper.GetNewID(typeof(Model.SitePerson_Person)),
+ PersonId = user.UserId,
UnitId = user.UnitId,
IdentityCard = user.IdentityCard,
IdcardType = "SHENFEN_ZHENGJIAN",
diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.cs b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.cs
index f02a4957..22c9a248 100644
--- a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.cs
+++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.cs
@@ -68,8 +68,11 @@ namespace FineUIPro.Web.HSSE.SitePerson
//权限按钮方法
this.GetButtonPower();
}
- ////权限按钮方法
- //this.GetButtonPower();
+ if (CommonService.IsSuperAdminManage(this.CurrUser.UserId))
+ {
+ //权限按钮方法
+ this.GetButtonPower();
+ }
this.btnMenuDelete.OnClientClick = Grid1.GetNoSelectionAlertReference("请至少选择一项!");
this.btnMenuDelete.ConfirmText = String.Format("你确定要删除选中的 行数据吗?", Grid1.GetSelectedCountReference());
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
@@ -89,7 +92,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
this.InitTreeMenu();
this.BindGrid();
this.GetButtonPower();
- if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
+ if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId) && !CommonService.IsSuperAdminManage(this.CurrUser.UserId))
{
btnNew.Hidden = true;
btnImport.Hidden = true;
@@ -599,6 +602,19 @@ namespace FineUIPro.Web.HSSE.SitePerson
protected void btnSearchUserAdd_Click(object sender, EventArgs e)
{
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, "编辑 - ")));
//if (this.tvProjectAndUnit.SelectedNodeID.Contains("|"))
@@ -790,7 +806,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
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;
}