protected void Page_Load(object sender, EventArgs e) { String modelId = Request.QueryString["modelId"]; modelId = null == modelId ? "" : modelId; String plantId = Request.QueryString["plantCode"]; plantId = null == plantId ? "" : plantId; string DBName = BeanTools.getPlantDB(plantId).historyDB; //数据库名 Plant plant = BeanTools.getPlantDB(plantId); IList list = new ArrayList(); list = new AlarmAnalysis().ftaModelTags(plant, id2ModelId[int.Parse(modelId) - 1]); pcaModelJson = BeanTools.ToJson(list); string ftaStateTemp = ""; ftaStateTemp = new AlarmAnalysis().FaultTreeResultById(plant, id2ModelId[int.Parse(modelId) - 1]); ftaState = ftaStateTemp.Split(',')[0]; ftaStateStartTime = ftaStateTemp.Split(',')[1]; EasyUIData grid = new AlarmAnalysis().ftaAbnormalHistory(plant, id2ModelId[int.Parse(modelId) - 1]); ftaHistory = BeanTools.ToJson(grid); }
protected void Page_Load(object sender, EventArgs e) { String userId = ((SysUser)Session[CommonStr.session_user]).userId; string parentMenuCode = Request.QueryString["parentMenuCode"]; List <TreeNode> treeNodeList = new SysManage().loadManageTree(userId, parentMenuCode); headMenuJson = BeanTools.ToJson(treeNodeList); }
protected void Page_Load(object sender, EventArgs e) { List <TreeNode> treeList = new List <TreeNode>(); SysManage sysManage = new SysManage(); treeList = sysManage.qrtMenuAndPlantTree(); headMenuJson = BeanTools.ToJson(treeList); }
protected void Page_Load(object sender, EventArgs e) { List <TreeNode> treeList = new List <TreeNode>(); SysManage sysManage = new SysManage(); treeList = sysManage.qryHeadOrganNode(); headOrganJson = BeanTools.ToJson(treeList); if (null != BeanTools.ToJson(treeList)) { headOrganJson = System.Text.RegularExpressions.Regex.Replace(headOrganJson, "isChecked", "checked"); } }
protected void Page_Load(object sender, EventArgs e) { roleId = Request.QueryString["roleId"]; List <TreeNode> treeList = new List <TreeNode>(); SysManage sysManage = new SysManage(); treeList = sysManage.qrtHeadMenuTree(roleId); headMenuJson = BeanTools.ToJson(treeList); if (null != headMenuJson) { headMenuJson = System.Text.RegularExpressions.Regex.Replace(headMenuJson, "isChecked", "checked"); } plantList = sysManage.qryPlantByRole(roleId); }
//public string[] id2ModelId = { "7750", "7879", "7960", "7993", "8038", "7807", "7852", "9501", "9534", "9579", "8188", "8317", "8398", "8431", "8476", // "8245", "8626", "8755", "8836", "8869", "8914", "8683", "9064", "9193", "9274", "9307", "9352", "9121"}; protected void Page_Load(object sender, EventArgs e) { String modelId = Request.QueryString["modelId"]; modelId = null == modelId ? "" : modelId; String plantId = Request.QueryString["plantCode"]; plantId = null == plantId ? "" : plantId; string DBName = BeanTools.getPlantDB(plantId).historyDB; //数据库名 Plant plant = BeanTools.getPlantDB(plantId); //关键变量状态 IList list = new ArrayList(); list = new AlarmAnalysis().ftaModelTags(plant, modelId); pcaModelJson = BeanTools.ToJson(list); string ftaStateTemp = ""; ftaStateTemp = new AlarmAnalysis().FaultTreeResultById(plant, modelId); ftaState = ftaStateTemp.Split(',')[0]; ftaStateStartTime = ftaStateTemp.Split(',')[1]; ftaName = ftaStateTemp.Split(',')[2]; ftaJson = new AlarmAnalysis().FaultTreeJsonById(plant, modelId); FileStream fs = new FileStream(Request.PhysicalApplicationPath + "aspx\\FT_Jsons\\" + modelId + ".html", FileMode.OpenOrCreate, FileAccess.ReadWrite); StreamWriter m_StreamWriter = new StreamWriter(fs); m_StreamWriter.BaseStream.Seek(0, SeekOrigin.Begin); m_StreamWriter.Write(ftaJson); m_StreamWriter.Flush(); m_StreamWriter.Close(); fs.Close(); //ftaJson = BeanTools.ToJson(ftaJson); EasyUIData grid = new AlarmAnalysis().ftaAbnormalHistory(plant, "" + (int.Parse(modelId) + 1)); ftaHistory = BeanTools.ToJson(grid); }
protected void Page_Load(object sender, EventArgs e) { String userId = ((SysUser)Session[CommonStr.session_user]).userId; String plantIds = new SysManage().qryPlantsByUserId(userId); plantList = new MainPage().qryPlantList(plantIds); TreeNode headNode = new TreeNode(); for (int i = 0; i < plantList.Count; i++) { Plant plant = (Plant)plantList[i]; TreeNode node = new TreeNode(); if ("1".Equals(plant.level)) { headNode.id = plant.organtreeCode; headNode.text = plant.organtreeName; headNode.state = "open"; headNode.attributes = "0:root"; headNode.iconCls = "sysMan_organ"; } else { node.id = plant.id; node.text = plant.organtreeName; node.state = "open"; node.attributes = "0:plant"; node.iconCls = "sysMan_plant_click"; headNode.children.Add(node); } } List <TreeNode> treeList = new List <TreeNode>(); treeList.Add(headNode); headMenuJson = BeanTools.ToJson(treeList); }
protected void Page_Load(object sender, EventArgs e) { String userId = ((SysUser)Session[CommonStr.session_user]).userId; String plantIds = new SysManage().qryPlantsByUserId(userId); plantList = new MainPage().qryPlantList(plantIds); TreeNode headNode = new TreeNode(); for (int i = 0; i < plantList.Count; i++) { Plant plant = (Plant)plantList[i]; TreeNode node = new TreeNode(); if ("1".Equals(plant.level)) { headNode.id = plant.organtreeCode; headNode.text = plant.organtreeName; headNode.state = "open"; headNode.attributes = "0:root"; headNode.iconCls = "sysMan_organ"; } else { node.id = plant.id; node.text = plant.organtreeName; node.state = "closed"; node.attributes = "3:plant"; node.iconCls = "sysMan_plant_click"; TreeNode bjgzNode = new TreeNode(); bjgzNode.id = "bjgz#" + plant.id; bjgzNode.text = "报警规则"; bjgzNode.state = "closed"; bjgzNode.attributes = "4:gz"; bjgzNode.iconCls = "sysMan_gztype"; List <TreeNode> specialList = AddSpecialNode(bjgzNode.id); bjgzNode.children.AddRange(specialList); node.children.Add(bjgzNode); TreeNode yjgzNode = new TreeNode(); yjgzNode.id = "yjgz#" + plant.id; yjgzNode.text = "预警规则"; yjgzNode.state = "closed"; yjgzNode.attributes = "4:gz"; yjgzNode.iconCls = "sysMan_gztype"; List <TreeNode> yjspecialList = AddSpecialNode(yjgzNode.id); yjgzNode.children.AddRange(yjspecialList); node.children.Add(yjgzNode); TreeNode ycgzNode = new TreeNode(); ycgzNode.id = "ycgz#" + plant.id; ycgzNode.text = "异常规则"; ycgzNode.state = "closed"; ycgzNode.attributes = "4:gz"; ycgzNode.iconCls = "sysMan_gztype"; List <TreeNode> ycspecialList = AddSpecialNode(ycgzNode.id); ycgzNode.children.AddRange(ycspecialList); node.children.Add(ycgzNode); headNode.children.Add(node); } } List <TreeNode> treeList = new List <TreeNode>(); treeList.Add(headNode); headMenuJson = BeanTools.ToJson(treeList); }
protected void Page_Load(object sender, EventArgs e) { String userId = ((SysUser)Session[CommonStr.session_user]).userId; String plantIds = new SysManage().qryPlantsByUserId(userId); plantList = new MainPage().qryPlantList(plantIds); TreeNode headNode = new TreeNode(); for (int i = 0; i < plantList.Count; i++) { Plant plant = (Plant)plantList[i]; TreeNode node = new TreeNode(); if ("1".Equals(plant.level)) { headNode.id = plant.organtreeCode; headNode.text = plant.organtreeName; headNode.state = "open"; headNode.attributes = "0:root"; headNode.iconCls = "sysMan_organ"; } else { node.id = plant.id; node.text = plant.organtreeName; node.state = "closed"; node.attributes = "3:plant"; node.iconCls = "sysMan_plant_click"; TreeNode mainNode = new TreeNode(); mainNode.id = "main#" + plant.id; mainNode.text = "主页"; mainNode.state = "open"; mainNode.attributes = "0:main"; mainNode.iconCls = "sysMan_homepage"; node.children.Add(mainNode); TreeNode bjgzNode = new TreeNode(); bjgzNode.id = "bjgz#" + plant.id; bjgzNode.text = "报警规则"; bjgzNode.state = "closed"; bjgzNode.attributes = "4:gz"; bjgzNode.iconCls = "sysMan_gztype"; List <TreeNode> specialList = AddSpecialNode(bjgzNode.id); bjgzNode.children.AddRange(specialList); node.children.Add(bjgzNode); TreeNode yjgzNode = new TreeNode(); yjgzNode.id = "yjgz#" + plant.id; yjgzNode.text = "预警规则"; yjgzNode.state = "closed"; yjgzNode.attributes = "4:gz"; yjgzNode.iconCls = "sysMan_gztype"; List <TreeNode> yjspecialList = AddSpecialNode(yjgzNode.id); yjgzNode.children.AddRange(yjspecialList); node.children.Add(yjgzNode); TreeNode ycgzNode = new TreeNode(); ycgzNode.id = "ycgz#" + plant.id; ycgzNode.text = "异常规则"; ycgzNode.state = "closed"; ycgzNode.attributes = "4:gz"; ycgzNode.iconCls = "sysMan_gztype"; List <TreeNode> ycspecialList = AddSpecialNode(ycgzNode.id); ycgzNode.children.AddRange(ycspecialList); node.children.Add(ycgzNode); //TreeNode modalNode = new TreeNode(); //modalNode.id = "modal#" + plant.id; //modalNode.text = "模型查看"; //modalNode.state = "closed"; //modalNode.attributes = "2:modal"; //modalNode.iconCls = "sysMan_gztype"; //TreeNode stModalNode = new TreeNode(); //stModalNode.id = "stmodal#" + plant.id; //stModalNode.text = "状态监测模型库"; //stModalNode.state = "open"; //stModalNode.attributes = "0:stmodal"; //stModalNode.iconCls = "sysMan_leafnode"; //modalNode.children.Add(stModalNode); //TreeNode baseModalNode = new TreeNode(); //baseModalNode.id = "basemodal#" + plant.id; //baseModalNode.text = "根原因分析模型库"; //baseModalNode.state = "open"; //baseModalNode.attributes = "0:basemodal"; //baseModalNode.iconCls = "sysMan_leafnode"; //modalNode.children.Add(baseModalNode); //node.children.Add(modalNode); //TreeNode operatorNode = new TreeNode(); //operatorNode.id = "operator#" + plant.id; //operatorNode.text = "操作质量"; //operatorNode.state = "open"; //operatorNode.attributes = "0:operator"; //operatorNode.iconCls = "sysMan_leafnode"; //node.children.Add(operatorNode); headNode.children.Add(node); } } List <TreeNode> treeList = new List <TreeNode>(); treeList.Add(headNode); headMenuJson = BeanTools.ToJson(treeList); }