public IActionResult FlowMonitorFrame() { base.SetGlobalViewBag(); string UserId = CPExpressionHelper.Instance.RunCompile("${CPUser.UserId()}"); string UserRoleIds = CPExpressionHelper.Instance.RunCompile("${CPUser.UserRoleIds()}"); CPFlowTemplate template = CPFlowTemplate.Instance(); List <int> roleIdCol = new List <int>(); UserRoleIds.Split(',').ToList().ForEach(t => { if (string.IsNullOrEmpty(t) == false) { roleIdCol.Add(int.Parse(t)); } }); List <CPFlow> col = template.GetHasMonitorRightFlow(int.Parse(UserId), roleIdCol); string flowVerIds = ""; col.ForEach(t => { if (string.IsNullOrEmpty(flowVerIds)) { flowVerIds = t.FlowVerId.ToString(); } else { flowVerIds += "," + t.FlowVerId.ToString(); } }); if (string.IsNullOrEmpty(flowVerIds)) { flowVerIds = "-1"; } CPAppContext.GetHttpContext().Session.SetString("UserHasMonitorRightFlowVerIds", flowVerIds); return(Redirect(CPAppContext.CPWebRootPath() + "/Plat/Grid/GridView?GridCode=" + CPAppContext.QueryString <string>("GridCode"))); }
public IActionResult PlatAdmin() { base.SetGlobalViewBag(); List <CPSystem> sysCol = CPSystemHelper.Instance().GetSystems(); ViewBag.SystemCol = sysCol; ViewBag.DefaultUrl = CPAppContext.CPWebRootPath() + "/Plat/Tab/TabView?TabCode=Tab0002&SysId=2"; return(View()); }
public IActionResult LoginOut() { CPAppContext.GetHttpContext().Session.Clear(); string loginUrl = CPAppContext.GetPara("LoginUrl"); if (string.IsNullOrEmpty(loginUrl)) { return(RedirectToAction("Login")); } else { return(Redirect(CPAppContext.CPWebRootPath() + loginUrl)); } // }
public IActionResult SysFrame() { base.SetGlobalViewBag(); ViewBag.UserName = CPExpressionHelper.Instance.RunCompile("${CPUser.UserName()}"); ViewBag.UserId = CPExpressionHelper.Instance.RunCompile("${CPUser.UserId()}"); ViewBag.UserPhotoPath = CPExpressionHelper.Instance.RunCompile("${CPUser.UserPhotoPath()}"); if (string.IsNullOrEmpty(ViewBag.UserPhotoPath)) { ViewBag.UserPhotoPath = "../../Style/CommonImage/UserNoPic.png"; } else { ViewBag.UserPhotoPath = CPAppContext.CPWebRootPath() + "/api/CPCommonEngine/ShowPicture?FilePath=" + System.Web.HttpUtility.UrlEncode(ViewBag.UserPhotoPath); } ViewBag.SystemTitle = CPAppContext.GetPara("SystemTitle"); return(View()); }