/// <summary> 通过设备类型查找测点 /// </summary> /// <param name="DevClassID"></param> /// <returns></returns> public static List <Jc_DefInfo> QueryPointByDevIDCache(string DevID) { PointDefineGetByDevIDRequest PointDefineRequest = new PointDefineGetByDevIDRequest(); PointDefineRequest.DevID = DevID; var result = _PointDefineService.GetPointDefineCacheByDevID(PointDefineRequest); if (result.IsSuccess == true) { return(result.Data); } else { throw new Exception(result.Message); } }
public static DataTable GetPointByDevID(int DevID) { List <Jc_DefInfo> list = new List <Jc_DefInfo>(); PointDefineGetByDevIDRequest PointDefineRequest = new PointDefineGetByDevIDRequest(); PointDefineRequest.DevID = DevID.ToString(); list = pointDefineService.GetPointDefineCacheByDevID(PointDefineRequest).Data; if (list == null || list.Count < 1) { return(null); } DataTable dt = new DataTable(); dt.Columns.Add("txt", typeof(string)); dt.Columns.Add("val", typeof(string)); foreach (var item in list) { DataRow dr = dt.NewRow(); dr[0] = item.Point + ":" + item.Wz; dr[1] = item.Point; dt.Rows.Add(dr); } return(dt); }
public BasicResponse <List <Jc_DefInfo> > GetPointDefineCacheByDevID(PointDefineGetByDevIDRequest PointDefineRequest) { return(_PointDefineService.GetPointDefineCacheByDevID(PointDefineRequest)); }