protected void Page_Load(object sender, EventArgs e) { if (!B_User_Plat.IsAdmin())//是本部门的管理员也可,另Gid必须属于本公司 { function.WriteErrMsg("你无权访问该页"); } if (!IsPostBack) { MyBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (!B_User_Plat.IsAdmin()) { function.WriteErrMsg("非管理员,无权限访问该页!!"); } if (!IsPostBack) { MyBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (!B_User_Plat.IsAdmin()) { function.WriteErrMsg("无权访问该页面!!"); } if (!IsPostBack && RoleID > 0) //并且只能为该公司的用户权限组 { urMod = urBll.SelReturnModel(RoleID); //后期像角色ID这些应该是Guid码,避免其能猜到 if (urMod.CompID != B_User_Plat.GetLogin().CompID) { function.WriteErrMsg("该信息无权访问!!"); } RoleName_L.Text = urMod.RoleName; RoleDesc_L.Text = urMod.RoleDesc; function.Script(this, "InitValue('" + urMod.RoleAuth + "');"); } }
protected void Page_Load(object sender, EventArgs e) { if (!B_User_Plat.IsAdmin()) { function.WriteErrMsg("非管理员,无权限访问该页!!"); } if (!IsPostBack) { int id = DataConverter.CLng(Request.QueryString["ID"]); if (id > 0) { Save_Btn.Text = "确认修改"; M_Plat_UserRole urMod = new M_Plat_UserRole(); urMod = urBll.SelReturnModel(id); RoleName_T.Text = urMod.RoleName; RoleDesc_T.Text = urMod.RoleDesc; } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (UserID > 0 && B_User_Plat.IsAdmin()) { Role_Rep.Visible = true; AdminSave_Btn.Visible = true; MyBind(UserID); } else//非管理员,只允许查看自己 { Role_View_Rep.Visible = true; Save_Btn.Visible = true; MyBind(B_User_Plat.GetLogin().UserID); } if (!string.IsNullOrEmpty(Request.QueryString["Set"])) { function.Script(this, "SetPlat();"); } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (!B_User_Plat.IsAdmin()) { view_logo_tr.Visible = true; CompShort_T.Attributes.Add("readonly", "false"); CompName_T.Attributes.Add("readonly", "false"); CompDesc_T.Attributes.Add("readonly", "false"); CompStatus_T.Attributes.Add("readonly", "false"); Telephone_T.Attributes.Add("readonly", "false"); Mobile_T.Attributes.Add("readonly", "false"); CompHref_T.Attributes.Add("readonly", "false"); } else { admin_logo_tr.Visible = true; adminop_tr.Visible = true; } MyBind(); } }