Beispiel #1
0
        public static DataTable GetDevClassByDevpropertyID(int DevClassPropertyID)
        {
            Dictionary <int, EnumcodeInfo> dic = new Dictionary <int, EnumcodeInfo>();

            dic = ClientAlarmModle.QueryDevClassByDevpropertID(DevClassPropertyID);
            DataTable dt = new DataTable();

            dt.Columns.Add("txt", typeof(string));
            dt.Columns.Add("val", typeof(string));
            if (dic == null || dic.Count < 1)
            {
                return(null);
            }
            foreach (var item in dic)
            {
                DataRow dr = dt.NewRow();
                dr[0] = item.Value.StrEnumDisplay;
                dr[1] = item.Key;
                dt.Rows.Add(dr);
            }
            return(dt);
        }
Beispiel #2
0
 public static Dictionary <int, EnumcodeInfo> QueryDevClassByDevpropertID(int DevClassPropertyID)
 {
     return(ClientAlarmModle.QueryDevClassByDevpropertID(DevClassPropertyID));
 }