コード例 #1
0
ファイル: UserController.cs プロジェクト: JackWangCUMT/netbpm
        //
        // GET: /User/

        public ActionResult ShowHome()
        {
            IPrincipal userAdapter = new PrincipalUserAdapter("ae");
            HttpContext.User = userAdapter;
            Thread.CurrentPrincipal = userAdapter;

            IDefinitionSessionLocal definitionComponent = null;
            IExecutionSessionLocal executionComponent = null;
            try
            {
                definitionComponent = ServiceLocator.Instance.GetService(typeof(IDefinitionSessionLocal)) as IDefinitionSessionLocal;
                executionComponent = ServiceLocator.Instance.GetService(typeof(IExecutionSessionLocal)) as IExecutionSessionLocal;
                IList taskList = executionComponent.GetTaskList();
                IList processDefinitions = definitionComponent.GetProcessDefinitions();

                ViewData["taskList"] = taskList;
                ViewData["processDefinitions"] = processDefinitions;
                ViewData["preview"] = null;
                //Context.Flash["taskList"] = taskList;
                //Context.Flash["processDefinitions"] = processDefinitions;
                //Context.Flash["preview"] = preview;
            }
            finally
            {
                ServiceLocator.Instance.Release(executionComponent);
                ServiceLocator.Instance.Release(definitionComponent);
            }

            return View();
        }
コード例 #2
0
		private void InitSession(string username) 
		{
			IPrincipal userAdapter=new PrincipalUserAdapter("ae");
			Session["user"] = userAdapter;
            HttpContext.User = userAdapter;
		}
コード例 #3
0
ファイル: IntroController.cs プロジェクト: qwinner/NetBPM
		private void InitSession(string username) 
		{
			IPrincipal userAdapter=new PrincipalUserAdapter(username);
			Context.Session["user"] = userAdapter;
			Context.CurrentUser=userAdapter;
		}