//回路列表 combotree public ActionResult getCidByPID(int pid = 0, int did = 0, int showAll = 0) { string pdrlist = HomeController.GetPID(CurrentUser.UNITList); //string pdrlist = CurrentUser.PDRList; string strsql = "select CID,CName from ( select row_number() over(partition by cid order by pid desc) as rownum , * from t_DM_CircuitInfo where pid = " + pid + " and did=" + did + ") as T where T.rownum = 1 order by did"; if (!pdrlist.Equals("")) { strsql = "select CID,CName from ( select row_number() over(partition by cid order by pid desc) as rownum , * from t_DM_CircuitInfo where pid in (" + pdrlist + ") and pid = " + pid + "and did=" + did + ") as T where T.rownum = 1 order by did"; } List <CircuitName> list = bll.ExecuteStoreQuery <CircuitName>(strsql).ToList(); if (list.Count == 0 && 0 == showAll) { CircuitName nc = new CircuitName(); nc.cid = 0; nc.cname = "全部"; list.Insert(0, nc); } string strJson = JsonHelper.ToJson(list); return(Content(strJson)); }
private static void ResetCircuitHandler(CircuitName message) { if (string.IsNullOrEmpty(message.ToString())) return; ResetCircuit(message.ToString()); }
/// <summary> /// Management bus handler - Get circuit state. /// </summary> /// <param name="message"></param> private static void GetCircuitState(CircuitName message) { var status = GetState(message.ToString()); var circuitStatus = new CircuitStatus(_managementBusClient.ClientId, message.ToString(), status, DateTimeOffset.Now); _managementBusClient.SendMessage(ManagementBus_StateChange_Topic, circuitStatus); }