예제 #1
0
파일: CMS.cs 프로젝트: ufjl0683/Center
        /// <summary>
        /// �]�wCMS���
        /// </summary>
        /// <param name="devNames"></param>
        /// <returns></returns>        
        protected override System.Collections.Hashtable setDisplay(RemoteInterface.HC.FetchDeviceData[] devNames, int maxSegId, MegType megType)
        {
            System.Collections.Hashtable displayht = new System.Collections.Hashtable();

            List<object> outputs = new List<object>();
            if (devNames == null || devNames.Length == 0) return displayht;

            foreach (RemoteInterface.HC.FetchDeviceData devName in devNames)
            {
                int distance = getDeviceDistance(devName.SegId, maxSegId);
                DevStartMile = devName.Mileage;
                DevLineID = devName.LineId;
                CMSDevName = devName.DevName;

                outputs = (List<object>)com.select(DBConnect.DataType.CmsCategory, Command.GetSelectCmd.getCMSCategory(Convert.ToInt32(DevRange["RULEID"]), (int)secType, devType.ToString(), distance, devName.DevName, megType.ToString(), ht["INC_LINEID"].ToString().Trim(),devName.Location,devName.LineId));
                foreach (object obj in outputs)
                {
                    List<object> output=new List<object>();
                    output.AddRange(new object[] { getPriority(), obj });
                    if (!displayht.Contains(devName.DevName))
                        displayht.Add(devName.DevName, output);
                    else if (devName.Location == "L")
                    {
                        displayht[devName.DevName] = output;
                    }
                }
            }
            return displayht;
        }
예제 #2
0
파일: CMS.cs 프로젝트: ufjl0683/Center
        /// <summary>
        /// �]�wCMS���
        /// </summary>
        /// <param name="devNames"></param>
        /// <returns></returns>        
        protected override System.Collections.Hashtable setDisplay(RemoteInterface.HC.FetchDeviceData[] devNames, int maxSegId, MegType megType)
        {
            System.Collections.Hashtable displayht = new System.Collections.Hashtable();

            List<object> outputs = new List<object>();
            if (devNames == null) return displayht;

            foreach (RemoteInterface.HC.FetchDeviceData devName in devNames)
            {
                int distance = getDeviceDistance(devName.SegId, maxSegId);

                outputs = (List<object>)com.select(DBConnect.DataType.CmsCategory, Command.GetSelectCmd.getCMSCategory(Convert.ToInt32(DevRange["RULEID"]), (int)secType, devType.ToString(), distance, devName.DevName, megType.ToString(), ht["INC_LINEID"].ToString().Trim()));
                foreach (object obj in outputs)
                {
                    List<object> output=new List<object>();
                    output.AddRange(new object[] { getPriority(), obj });
                    displayht.Add(devName.DevName, output);
                }
            }
            return displayht;
        }
예제 #3
0
 public static ICommand getPriority(byte alarmclass,MegType type)
 {
     SelectCommand com = new SelectCommand();
     com.FiledNames += string.Format(" * ");
     com.TblNames += string.Format(" {0}.{1} ", schema, DB2TableName.tblRspPriority);
     com.WhereCon += string.Format("     alarmclass={0} and level='{1}' ",alarmclass,type.ToString());
     return com;
 }