コード例 #1
0
        /// <summary>
        /// Clear the Data List, and build up a new one
        /// </summary>
        /// <returns></returns>
        public List <HistoryOSModel> GetDefaultDataSet()
        {
            DataList.Clear();

            // get list of phones
            PhoneBackend      PhoneData = PhoneBackend.Instance;
            List <PhoneModel> phones    = PhoneData.Index();

            var myPhoneId = phones.Where(m => m.SerialNumber == "1234abcd").FirstOrDefault().ID;

            // get list of OS versions
            VersionOSBackend      VersionOSData = VersionOSBackend.Instance;
            List <VersionOSModel> OSversions    = VersionOSData.Index();

            DataList.Add(new HistoryOSModel {
                PhoneID = myPhoneId, VersionOSID = OSversions[0].ID, ID = "9b02b4fc-8c3a-469d-9d63-e85ae2cb1c87"
            });                                                                                                                                    // Default
            DataList.Add(new HistoryOSModel {
                PhoneID = myPhoneId, VersionOSID = OSversions[1].ID
            });
            DataList.Add(new HistoryOSModel {
                PhoneID = myPhoneId, VersionOSID = OSversions[2].ID
            });
            DataList.Add(new HistoryOSModel {
                PhoneID = myPhoneId, VersionOSID = OSversions[3].ID
            });

            return(DataList);
        }
コード例 #2
0
        /// <summary>
        /// Clear the Data List, and build up a new one
        /// </summary>
        /// <returns></returns>
        public List <HistoryAppModel> GetDefaultDataSet()
        {
            DataList.Clear();

            // get list of phones
            PhoneBackend      PhoneBackend = PhoneBackend.Instance;
            List <PhoneModel> PhoneList    = PhoneBackend.Index();

            // get list of app versions
            VersionAppBackend      VersionAppBackend = VersionAppBackend.Instance;
            List <VersionAppModel> VersionAppList    = VersionAppBackend.Index();

            // phone 0
            DataList.Add(new HistoryAppModel {
                PhoneID = PhoneList[0].ID, VersionAppID = VersionAppList[0].ID, ID = "1cfe60ec-a6b2-4721-9fd6-978aa7bc0882"
            });                                                                                                                                                // Default
            DataList.Add(new HistoryAppModel {
                PhoneID = PhoneList[0].ID, VersionAppID = VersionAppList[1].ID
            });
            DataList.Add(new HistoryAppModel {
                PhoneID = PhoneList[0].ID, VersionAppID = VersionAppList[2].ID
            });
            DataList.Add(new HistoryAppModel {
                PhoneID = PhoneList[0].ID, VersionAppID = VersionAppList[3].ID
            });

            return(DataList);
        }
コード例 #3
0
        /// <summary>
        /// Clear the Data List, and build up a new one
        /// </summary>
        /// <returns></returns>
        public List <ResultLogModel> GetDefaultDataSet()
        {
            DataList.Clear();
            // Call backend clinic so ids match
            ClinicBackend      ClinicData = ClinicBackend.Instance;
            List <ClinicModel> clinics    = ClinicData.Index();

            // Call backend phones
            PhoneBackend      PhoneData = PhoneBackend.Instance;
            List <PhoneModel> phones    = PhoneData.Index();

            // Call backend to technicians
            TechnicianBackend      TechnicianData = TechnicianBackend.Instance;
            List <TechnicianModel> tech           = TechnicianData.Index();

            // Call backend for photos
            PhotoBackend      PhotoData = PhotoBackend.Instance;
            List <PhotoModel> photos    = PhotoData.Index();

            DataList.Add(new ResultLogModel {
                ClinicID = clinics[0].ID, PhoneID = phones[0].ID, UserID = tech[0].ID, BilirubinValue = 20, PhotoID = photos[0].ID
            });                                                                                                                                                      // Default
            DataList.Add(new ResultLogModel {
                ClinicID = clinics[1].ID, PhoneID = phones[1].ID, UserID = tech[1].ID, BilirubinValue = 2, PhotoID = photos[1].ID
            });
            DataList.Add(new ResultLogModel {
                ClinicID = clinics[2].ID, PhoneID = phones[2].ID, UserID = tech[2].ID, BilirubinValue = 3.5, PhotoID = photos[2].ID
            });
            //DataList.Add(new ResultLogModel { ClinicID = clinics[3].ID, PhoneID = phones[3].ID, UserID = tech[3].ID, BilirubinValue = 10, PhotoID = photos[3].ID });


            return(DataList);
        }
コード例 #4
0
        // Add YourName Above Here  #1


        private DataSourceBackend()
        {
            ExampleBackend    = ExampleBackend.Instance;
            PhotoBackend      = PhotoBackend.Instance;
            ClinicBackend     = ClinicBackend.Instance;
            ResultLogBackend  = ResultLogBackend.Instance;
            ResultDataBackend = ResultDataBackend.Instance;
            PhoneBackend      = PhoneBackend.Instance;
            TechnicianBackend = TechnicianBackend.Instance;
            InventoryBackend  = InventoryBackend.Instance;
            VersionOSBackend  = VersionOSBackend.Instance;
            VersionAppBackend = VersionAppBackend.Instance;
            HistoryOSBackend  = HistoryOSBackend.Instance;
            HistoryAppBackend = HistoryAppBackend.Instance;
            // Add YourName Above Here #2
        }