1 当我们更改了项目Model的命名空间后,如改为CRM.Model 还要记得到全局文件做相应的修改;同样当删除了工作流程序集后,也要到这里做相应的删除。如下图
代码里面改完后,还要对全局文件点右键 选择打开标记 做对应的更改
2 为PortalService设置万能密码的方法,是到Aim.Portal.Service->UserSessionService->UserSessionServer.cs在授权用户方法里加一段代码,如下图
3 IEnumerable<SysModule> topAuthExamMdls = new List<SysModule>();//通过应用程序CODE 获取登录用户有访问权限的模块
string appcode = EXAMINING_APP_CODE;
if (this.Request.QueryString["App"] != null && this.Request.QueryString["App"].Trim() != "")
{
appcode = this.Request.QueryString["App"];
}
if (UserContext.AccessibleApplications.Count > 0)
{
SysApplication examApp = UserContext.AccessibleApplications.FirstOrDefault(tent => tent.Code == appcode);
if (examApp != null && UserContext.AccessibleModules.Count > 0)
{
topAuthExamMdls = UserContext.AccessibleModules.Where(tent => tent.ApplicationID == examApp.ApplicationID && String.IsNullOrEmpty(tent.ParentID));
topAuthExamMdls = topAuthExamMdls.OrderBy(tent => tent.SortIndex);
}
}
//获取登录用户有访问权限的应用程序
IList<SysApplication> saEnts = UserContext.AccessibleApplications.OrderBy(tens => tens.SortIndex).Where(ent => ent.Status == 1).ToArray();
PageState.Add("Modules", saEnts);