Esempio n. 1
0
        // TODO: Get the faults tied to a report from either the server or local DB, 
        // depending on if the report and its associated faults/faultpictures have been sent
        // To reduce latency, we could cache this list of faults in a Dictionary<reportID, List<fault>>
        private async Task<List<Fault>> GetFaultList(Report report)
        {
            var faultList = new List<Fault>();
            try
            {
                faultList = await DatabaseService.GetAllFaultsByReport(report.ReportId);
            }
            catch (Exception ex)
            {
                Debug.WriteLine("Couldn't retrieve any faults for report" + ex.Message);
            }

            return faultList;
        }
Esempio n. 2
0
        public async Task <List <Fault> > GetAllFaultsByReport()
        {
            var faultsByReportList = await DatabaseService.GetAllFaultsByReport(InspectionDataCache.CurrentReportData.ReportId);

            return(new List <Fault>(faultsByReportList));
        }