public static MonitorLineListViewModel Get(MonitorLineList sourceList) { MonitorLineListViewModel list = new MonitorLineListViewModel(); foreach (MonitorLineInfo item in sourceList) { list.Add(MonitorLineViewModel.New(item)); } return(list); }
public static MonitorViewModel Get(long oid, bool childs = false) { MonitorViewModel obj = new MonitorViewModel(); MonitorInfo monitor = MonitorInfo.Get(oid, childs); if (monitor == null) { return(null); } obj.CopyFrom(monitor); if (childs) { obj.Lines = MonitorLineListViewModel.Get(monitor.LineaRegistros); } return(obj); }