Example #1
0
        public LivePoint_DTO GetLivePoint(long Id)
        {
            tblElement    tblelement    = get_tblElement_by_Id(Id);
            LivePoint_DTO livepoint_dto = LivePoint_Conversion.Convert_Tbl_Element_To_LivePoint_DTO(tblelement);

            ReadLivePoint(tblelement, livepoint_dto);
            GetLastAudit(livepoint_dto.Point_Id.ToString(), nameof(tblElement), livepoint_dto);
            return(livepoint_dto);
        }
Example #2
0
        public IList <LivePoint_DTO> GetLivePoints(string user_id)
        {
            IList <Tbl_Element_Note_DTO> element_note       = getElementBy_DataConnector_Type(DataSouceConnectionType.Live, true, user_id);
            IList <LivePoint_DTO>        list_livepoint_dto = LivePoint_Conversion.Convert_List_Tbl_Element_To_LivePoint_DTO(element_note);

            foreach (LivePoint_DTO livepoint in list_livepoint_dto)
            {
                ReadLivePoint(element_note.FirstOrDefault(element => element.tbl_Element.ID == livepoint.Point_Id).tbl_Element, livepoint);
                GetLastAudit(livepoint.Point_Id.ToString(), nameof(tblElement), livepoint);
            }
            return(list_livepoint_dto);
        }