示例#1
0
        /// <summary>
        /// ClearAllPersistent Data
        /// </summary>
        public void ClearAllPersistentData()
        {
            PersistentDataStorage <string> persistData = new PersistentDataStorage <string>();

            persistData.Clear();
            PersistentDataStorage <int> persistIntData = new PersistentDataStorage <int>();

            persistIntData.Clear();
            PersistentDataStorage <bool> persistboolData = new PersistentDataStorage <bool>();

            persistboolData.Clear();
            PersistentDataStorage <SelectSurgenFeedDataCollection> persistSelectedSurgenColl = new PersistentDataStorage <SelectSurgenFeedDataCollection>();

            persistSelectedSurgenColl.Clear();
            PersistentDataStorage <LoginResponse> persistLoginResponseData = new PersistentDataStorage <LoginResponse>();

            persistLoginResponseData.Clear();
            PersistentDataStorage <GetPharmacyInformationResponse> persistPharmacyInformationResponseData = new PersistentDataStorage <GetPharmacyInformationResponse>();

            persistPharmacyInformationResponseData.Clear();
            PersistentDataStorage <List <string> > persistAdvImageData = new PersistentDataStorage <List <string> >();

            persistAdvImageData.Clear();
            PersistentDataStorage <PillsReminderModelCol> persistPillsColl = new PersistentDataStorage <PillsReminderModelCol>();

            persistPillsColl.Clear();
            PersistentDataStorage <DateTime> persistDateTimeData = new PersistentDataStorage <DateTime>();

            persistDateTimeData.Clear();
        }
示例#2
0
        /// <summary>
        /// Method to load the app level persistent data
        /// </summary>
        public void LoadAppLevelPersistantData()
        {
            PersistentDataStorage <string> persistData = new PersistentDataStorage <string>();

            App.ApId                  = (null == persistData.Restore <string>(_apIdKey)) ? string.Empty : persistData.Restore <string>(_apIdKey);
            App.PIN                   = (null == persistData.Restore <string>(_pinKey)) ? string.Empty : persistData.Restore <string>(_pinKey);
            App.LoginPharId           = (null == persistData.Restore <string>(_loginInPharmacyKey)) ? string.Empty : persistData.Restore <string>(_loginInPharmacyKey);
            App.BrandingHash          = (null == persistData.Restore <string>(_brandHashKey)) ? string.Empty : persistData.Restore <string>(_brandHashKey);
            App.AdvtHash              = (null == persistData.Restore <string>(_advtHashKey)) ? string.Empty : persistData.Restore <string>(_advtHashKey);
            App.HashPIN               = (null == persistData.Restore <string>(_hashedPinKey)) ? string.Empty : persistData.Restore <string>(_hashedPinKey);
            App.StaticSplashURL       = (null == persistData.Restore <string>(_staticSplashURLKey)) ? string.Empty : persistData.Restore <string>(_staticSplashURLKey);
            App.HeaderPillsReminder   = (null == persistData.Restore <string>(_pillsReminderHeaderKey)) ? string.Empty : persistData.Restore <string>(_pillsReminderHeaderKey);
            App.LoginPharmacyAddress1 = (null == persistData.Restore <string>(_pharmacyAddress1Key)) ? string.Empty : persistData.Restore <string>(_pharmacyAddress1Key);
            App.LoginPharmacyAddress2 = (null == persistData.Restore <string>(_pharmacyAddress2Key)) ? string.Empty : persistData.Restore <string>(_pharmacyAddress2Key);
            App.LoginPharmacyAddress3 = (null == persistData.Restore <string>(_pharmacyAddress3Key)) ? string.Empty : persistData.Restore <string>(_pharmacyAddress3Key);
            App.DrugsData             = (null == persistData.Restore <string>(_drugsDataKey)) ? string.Empty : persistData.Restore <string>(_drugsDataKey);
            App.DrugDBHash            = (null == persistData.Restore <string>(_drugsDBDataHashKey)) ? string.Empty : persistData.Restore <string>(_drugsDBDataHashKey);
            App.ReminderToDisplay     = (null == persistData.Restore <string>(_isReminderToDisplayKey)) ? string.Empty : persistData.Restore <string>(_isReminderToDisplayKey);
            App.Bgcolor               = (null == persistData.Restore <string>(_bgColorKey)) ? string.Empty : persistData.Restore <string>(_bgColorKey);
            App.LoginEmailId          = (null == persistData.Restore <string>(_loginEmailId)) ? string.Empty : persistData.Restore <string>(_loginEmailId);

            App.DailyMorningReminderOnOff   = (null == persistData.Restore <string>(_isReminderDMOnOffKey)) ? intializeReminderStatus : persistData.Restore <string>(_isReminderDMOnOffKey);
            App.DailyAfternoonReminderOnOff = (null == persistData.Restore <string>(_isReminderDANOnOffKey)) ? intializeReminderStatus : persistData.Restore <string>(_isReminderDANOnOffKey);
            App.DailyEveningReminderOnOff   = (null == persistData.Restore <string>(_isReminderDEOnOffKey)) ? intializeReminderStatus : persistData.Restore <string>(_isReminderDEOnOffKey);
            App.DailyNightReminderOnOff     = (null == persistData.Restore <string>(_isReminderDNOnOffKey)) ? intializeReminderStatus : persistData.Restore <string>(_isReminderDNOnOffKey);
            App.WeeklyReminderOnOff         = (null == persistData.Restore <string>(_isReminderWOnOffKey)) ? intializeReminderStatus : persistData.Restore <string>(_isReminderWOnOffKey);
            App.MonthlyReminderOnOff        = (null == persistData.Restore <string>(_isReminderMOnOffKey)) ? intializeReminderStatus : persistData.Restore <string>(_isReminderMOnOffKey);
            App.Every28DaysReminderOnOff    = (null == persistData.Restore <string>(_isReminderE28OnOffKey)) ? intializeReminderStatus : persistData.Restore <string>(_isReminderE28OnOffKey);
            App.SurgeonSaved = (null == persistData.Restore <string>(_surgeonSavedKey)) ? string.Empty : persistData.Restore <string>(_surgeonSavedKey);

            PersistentDataStorage <int> persistIntData = new PersistentDataStorage <int>();

            App.NoofTriesLeft        = (0 == persistIntData.Restore <int>(_noofTriesLeftKey)) ? intializeNoofTriesLeft : persistIntData.Restore <int>(_noofTriesLeftKey);
            App.LocalServiceDistance = (0 == persistIntData.Restore <int>(_localServiceDistanceKey)) ? intializeLocalServicesDistance : persistIntData.Restore <int>(_localServiceDistanceKey);


            PersistentDataStorage <bool> persistboolData = new PersistentDataStorage <bool>();

            App.IsUserRegistered   = (false == persistboolData.Restore <bool>(_isUserRegisteredKey)) ? false : persistboolData.Restore <bool>(_isUserRegisteredKey);
            App.IsPageHomePanorama = (false == persistboolData.Restore <bool>(_isPageHomePanoramaKey)) ? false : persistboolData.Restore <bool>(_isPageHomePanoramaKey);
            App.IsPageUpdateYourDetailsafterLogin = (false == persistboolData.Restore <bool>(_isPageUpdateYourDetailsafterLoginKey)) ? false : persistboolData.Restore <bool>(_isPageUpdateYourDetailsafterLoginKey);
            App.IsPageYourDetailsafterLoginSaved  = (false == persistboolData.Restore <bool>(_isPageYourDetailsafterLoginSaved)) ? false : persistboolData.Restore <bool>(_isPageYourDetailsafterLoginSaved);
            App.IsChangePharmacy = (false == persistboolData.Restore <bool>(_isChangePharmacyKey)) ? false : persistboolData.Restore <bool>(_isChangePharmacyKey);

            App.IsVerifiedBySms   = (false == persistboolData.Restore <bool>(_isVerifiedBySmsKey)) ? false : persistboolData.Restore <bool>(_isVerifiedBySmsKey);
            App.IsVerifiedByEmail = (false == persistboolData.Restore <bool>(_isVerifiedByEmailKey)) ? false : persistboolData.Restore <bool>(_isVerifiedByEmailKey);

            App.IsReminderToSet = (false == persistboolData.Restore <bool>(_isReminderToSetKey)) ? false : persistboolData.Restore <bool>(_isReminderToSetKey);
            App.IsChecked       = (false == persistboolData.Restore <bool>(_isCheckedKey)) ? false : persistboolData.Restore <bool>(_isCheckedKey);

            App.IsFromLoginScreen = (false == persistboolData.Restore <bool>(_isFromLoginScreenKey)) ? false : persistboolData.Restore <bool>(_isFromLoginScreenKey);


            App.IsDisableSearchsurgen                 = (false == persistboolData.Restore <bool>(_isDisableSearchsurgenKey)) ? false : persistboolData.Restore <bool>(_isDisableSearchsurgenKey);
            App.IsNavigatedFromYourDetailsLogin       = (false == persistboolData.Restore <bool>(_isNavigatedFromYourDetailsLoginKey)) ? false : persistboolData.Restore <bool>(_isNavigatedFromYourDetailsLoginKey);
            App.IsNavigatedFromYourDetailsLoginwithTC = (false == persistboolData.Restore <bool>(_isNavigatedFromYourDetailsLoginwithTCKey)) ? false : persistboolData.Restore <bool>(_isNavigatedFromYourDetailsLoginwithTCKey);
            App.IsNavigatedFromYourDetailsUpdate      = (false == persistboolData.Restore <bool>(_isNavigatedFromYourDetailsUpdateKey)) ? false : persistboolData.Restore <bool>(_isNavigatedFromYourDetailsUpdateKey);
            App.IsDisplaySelectedSurgenOnSearchBox    = (false == persistboolData.Restore <bool>(_isDisplaySelectedSurgenOnSearchBoxKey)) ? false : persistboolData.Restore <bool>(_isDisplaySelectedSurgenOnSearchBoxKey);

            PersistentDataStorage <SelectSurgenFeedDataCollection> persistSelectedSurgenColl = new PersistentDataStorage <SelectSurgenFeedDataCollection>();

            App.SelectSurgenCollectionGlobalvar = (null == persistSelectedSurgenColl.Restore <SelectSurgenFeedDataCollection>(_selectSurgenCollectionGlobalvarKey)) ? null : persistSelectedSurgenColl.Restore <SelectSurgenFeedDataCollection>(_selectSurgenCollectionGlobalvarKey);


            PersistentDataStorage <LoginResponse> persistLoginResponseData = new PersistentDataStorage <LoginResponse>();

            App.ObjLgResponse = (null == persistLoginResponseData.Restore <LoginResponse>(_objLoginResponseKey)) ? null : persistLoginResponseData.Restore <LoginResponse>(_objLoginResponseKey);

            PersistentDataStorage <GetPharmacyInformationResponse> persistPharmacyInformationResponseData = new PersistentDataStorage <GetPharmacyInformationResponse>();

            App.ObjBrandingResponse = (null == persistPharmacyInformationResponseData.Restore <GetPharmacyInformationResponse>(_objPharmacyBrandInfoKey)) ? null : persistPharmacyInformationResponseData.Restore <GetPharmacyInformationResponse>(_objPharmacyBrandInfoKey);

            PersistentDataStorage <List <string> > persistAdvImageData = new PersistentDataStorage <List <string> >();

            App.AdImages = (null == persistAdvImageData.Restore <List <string> >(_lstAdvtImagesKey)) ? null : persistAdvImageData.Restore <List <string> >(_lstAdvtImagesKey);

            PersistentDataStorage <PillsReminderModelCol> persistPillsColl = new PersistentDataStorage <PillsReminderModelCol>();

            App.DailyMorningPillsCollection   = (null == persistPillsColl.Restore <PillsReminderModelCol>(_pillsCollectionDMKey)) ? null : persistPillsColl.Restore <PillsReminderModelCol>(_pillsCollectionDMKey);
            App.DailyAfternoonPillsCollection = (null == persistPillsColl.Restore <PillsReminderModelCol>(_pillsCollectionDAKey)) ? null : persistPillsColl.Restore <PillsReminderModelCol>(_pillsCollectionDAKey);
            App.DailyEveningPillsCollection   = (null == persistPillsColl.Restore <PillsReminderModelCol>(_pillsCollectionDEKey)) ? null : persistPillsColl.Restore <PillsReminderModelCol>(_pillsCollectionDEKey);
            App.DailyNightPillsCollection     = (null == persistPillsColl.Restore <PillsReminderModelCol>(_pillsCollectionDNKey)) ? null : persistPillsColl.Restore <PillsReminderModelCol>(_pillsCollectionDNKey);
            App.WeeklyPillsCollection         = (null == persistPillsColl.Restore <PillsReminderModelCol>(_pillsCollectionWeeklyKey)) ? null : persistPillsColl.Restore <PillsReminderModelCol>(_pillsCollectionWeeklyKey);
            App.MonthlyPillsCollection        = (null == persistPillsColl.Restore <PillsReminderModelCol>(_pillsCollectionMonthlyKey)) ? null : persistPillsColl.Restore <PillsReminderModelCol>(_pillsCollectionMonthlyKey);
            App.Every28DaysPillsCollection    = (null == persistPillsColl.Restore <PillsReminderModelCol>(_pillsCollectionE28DaysKey)) ? null : persistPillsColl.Restore <PillsReminderModelCol>(_pillsCollectionE28DaysKey);



            PersistentDataStorage <DateTime> persistDateTimeData = new PersistentDataStorage <DateTime>();

            App.DailyMorningReminderDate = (new DateTime() == persistDateTimeData.Restore <DateTime>(_dailyMorningreminderDateKey)) ? initializeDate : persistDateTimeData.Restore <DateTime>(_dailyMorningreminderDateKey);
            App.DailyMorningReminderTime = (new DateTime() == persistDateTimeData.Restore <DateTime>(_dailyMorningreminderTimeKey)) ? initializeTime : persistDateTimeData.Restore <DateTime>(_dailyMorningreminderTimeKey);

            App.DailyAfternoonReminderDate = (new DateTime() == persistDateTimeData.Restore <DateTime>(_dailyAfternoonreminderDateKey)) ? initializeDate : persistDateTimeData.Restore <DateTime>(_dailyAfternoonreminderDateKey);
            App.DailyAfternoonReminderTime = (new DateTime() == persistDateTimeData.Restore <DateTime>(_dailyAfternoonreminderTimeKey)) ? initializeTime : persistDateTimeData.Restore <DateTime>(_dailyAfternoonreminderTimeKey);

            App.DailyEveningReminderDate = (new DateTime() == persistDateTimeData.Restore <DateTime>(_dailyEveningreminderDateKey)) ? initializeDate : persistDateTimeData.Restore <DateTime>(_dailyEveningreminderDateKey);
            App.DailyEveningReminderTime = (new DateTime() == persistDateTimeData.Restore <DateTime>(_dailyEveningreminderTimeKey)) ? initializeTime : persistDateTimeData.Restore <DateTime>(_dailyEveningreminderTimeKey);

            App.DailyNightReminderDate = (new DateTime() == persistDateTimeData.Restore <DateTime>(_dailyNightreminderDateKey)) ? initializeDate : persistDateTimeData.Restore <DateTime>(_dailyNightreminderDateKey);
            App.DailyNightReminderTime = (new DateTime() == persistDateTimeData.Restore <DateTime>(_dailyNightreminderTimeKey)) ? initializeTime : persistDateTimeData.Restore <DateTime>(_dailyNightreminderTimeKey);

            App.WeeklyReminderDate = (new DateTime() == persistDateTimeData.Restore <DateTime>(_weeklyreminderDateKey)) ? initializeDate : persistDateTimeData.Restore <DateTime>(_weeklyreminderDateKey);
            App.WeeklyReminderTime = (new DateTime() == persistDateTimeData.Restore <DateTime>(_weeklyreminderTimeKey)) ? initializeTime : persistDateTimeData.Restore <DateTime>(_weeklyreminderTimeKey);

            App.MonthlyReminderDate = (new DateTime() == persistDateTimeData.Restore <DateTime>(_monthlyreminderDateKey)) ? initializeDate : persistDateTimeData.Restore <DateTime>(_monthlyreminderDateKey);
            App.MonthlyReminderTime = (new DateTime() == persistDateTimeData.Restore <DateTime>(_monthlyreminderTimeKey)) ? initializeTime : persistDateTimeData.Restore <DateTime>(_monthlyreminderTimeKey);

            App.Every28DaysReminderDate = (new DateTime() == persistDateTimeData.Restore <DateTime>(_every28DaysreminderDateKey)) ? initializeDate : persistDateTimeData.Restore <DateTime>(_every28DaysreminderTimeKey);
            App.Every28DaysReminderTime = (new DateTime() == persistDateTimeData.Restore <DateTime>(_every28DaysreminderTimeKey)) ? initializeTime : persistDateTimeData.Restore <DateTime>(_every28DaysreminderTimeKey);
        }
示例#3
0
        /// <summary>
        /// Method to save app level Persistent data
        /// </summary>
        public void SaveAppLevelPersistantData()
        {
            PersistentDataStorage <string> persistData = new PersistentDataStorage <string>();

            persistData.Backup(_apIdKey, App.ApId);
            persistData.Backup(_pinKey, App.PIN);
            persistData.Backup(_loginInPharmacyKey, App.LoginPharId);
            persistData.Backup(_brandHashKey, App.BrandingHash);
            persistData.Backup(_advtHashKey, App.AdvtHash);
            persistData.Backup(_hashedPinKey, App.HashPIN);
            persistData.Backup(_staticSplashURLKey, App.StaticSplashURL);
            persistData.Backup(_drugsDataKey, App.DrugsData);
            persistData.Backup(_pillsReminderHeaderKey, App.HeaderPillsReminder);
            persistData.Backup(_isReminderToDisplayKey, App.ReminderToDisplay);
            persistData.Backup(_bgColorKey, App.Bgcolor);
            persistData.Backup(_drugsDBDataHashKey, App.DrugDBHash);

            persistData.Backup(_loginEmailId, App.LoginEmailId);
            persistData.Backup(_isReminderDMOnOffKey, App.DailyMorningReminderOnOff);
            persistData.Backup(_isReminderDANOnOffKey, App.DailyAfternoonReminderOnOff);
            persistData.Backup(_isReminderDEOnOffKey, App.DailyEveningReminderOnOff);
            persistData.Backup(_isReminderDNOnOffKey, App.DailyNightReminderOnOff);
            persistData.Backup(_isReminderWOnOffKey, App.WeeklyReminderOnOff);
            persistData.Backup(_isReminderMOnOffKey, App.MonthlyReminderOnOff);
            persistData.Backup(_isReminderE28OnOffKey, App.Every28DaysReminderOnOff);
            persistData.Backup(_surgeonSavedKey, App.SurgeonSaved);



            persistData.Backup(_pharmacyAddress1Key, App.LoginPharmacyAddress1);
            persistData.Backup(_pharmacyAddress2Key, App.LoginPharmacyAddress2);
            persistData.Backup(_pharmacyAddress3Key, App.LoginPharmacyAddress3);

            PersistentDataStorage <int> persistIntData = new PersistentDataStorage <int>();

            persistIntData.Backup(_noofTriesLeftKey, App.NoofTriesLeft);
            persistIntData.Backup(_localServiceDistanceKey, App.LocalServiceDistance);


            PersistentDataStorage <bool> persistboolData = new PersistentDataStorage <bool>();

            persistboolData.Backup(_isUserRegisteredKey, App.IsUserRegistered);
            persistboolData.Backup(_isPageHomePanoramaKey, App.IsPageHomePanorama);
            persistboolData.Backup(_isPageUpdateYourDetailsafterLoginKey, App.IsPageUpdateYourDetailsafterLogin);
            persistboolData.Backup(_isPageYourDetailsafterLoginSaved, App.IsPageYourDetailsafterLoginSaved);
            persistboolData.Backup(_isReminderToSetKey, App.IsReminderToSet);
            persistboolData.Backup(_isCheckedKey, App.IsChecked);
            persistboolData.Backup(_isVerifiedBySmsKey, App.IsVerifiedBySms);
            persistboolData.Backup(_isVerifiedByEmailKey, App.IsVerifiedByEmail);

            persistboolData.Backup(_isChangePharmacyKey, App.IsChangePharmacy);
            persistboolData.Backup(_isFromLoginScreenKey, App.IsFromLoginScreen);


            persistboolData.Backup(_isDisableSearchsurgenKey, App.IsDisableSearchsurgen);
            persistboolData.Backup(_isNavigatedFromYourDetailsLoginKey, App.IsNavigatedFromYourDetailsLogin);
            persistboolData.Backup(_isNavigatedFromYourDetailsLoginwithTCKey, App.IsNavigatedFromYourDetailsLoginwithTC);
            persistboolData.Backup(_isNavigatedFromYourDetailsUpdateKey, App.IsNavigatedFromYourDetailsUpdate);
            persistboolData.Backup(_isDisplaySelectedSurgenOnSearchBoxKey, App.IsDisplaySelectedSurgenOnSearchBox);

            PersistentDataStorage <LoginResponse> persistLoginResponseData = new PersistentDataStorage <LoginResponse>();

            persistLoginResponseData.Backup(_objLoginResponseKey, App.ObjLgResponse);

            PersistentDataStorage <GetPharmacyInformationResponse> persistPharmacyInformationResponseData = new PersistentDataStorage <GetPharmacyInformationResponse>();

            persistPharmacyInformationResponseData.Backup(_objPharmacyBrandInfoKey, App.ObjBrandingResponse);

            PersistentDataStorage <SelectSurgenFeedDataCollection> persistSelectedSurgenColl = new PersistentDataStorage <SelectSurgenFeedDataCollection>();

            persistSelectedSurgenColl.Backup(_selectSurgenCollectionGlobalvarKey, App.SelectSurgenCollectionGlobalvar);


            PersistentDataStorage <List <string> > persistAdvImageData = new PersistentDataStorage <List <string> >();

            persistAdvImageData.Backup(_lstAdvtImagesKey, App.AdImages);

            PersistentDataStorage <PillsReminderModelCol> persistPillsColl = new PersistentDataStorage <PillsReminderModelCol>();

            persistPillsColl.Backup(_pillsCollectionDMKey, App.DailyMorningPillsCollection);
            persistPillsColl.Backup(_pillsCollectionDAKey, App.DailyAfternoonPillsCollection);
            persistPillsColl.Backup(_pillsCollectionDEKey, App.DailyEveningPillsCollection);
            persistPillsColl.Backup(_pillsCollectionDNKey, App.DailyNightPillsCollection);
            persistPillsColl.Backup(_pillsCollectionWeeklyKey, App.WeeklyPillsCollection);
            persistPillsColl.Backup(_pillsCollectionMonthlyKey, App.MonthlyPillsCollection);
            persistPillsColl.Backup(_pillsCollectionE28DaysKey, App.Every28DaysPillsCollection);

            PersistentDataStorage <DateTime> persistDateTimeData = new PersistentDataStorage <DateTime>();

            persistDateTimeData.Backup(_dailyMorningreminderDateKey, App.DailyMorningReminderDate);
            persistDateTimeData.Backup(_dailyMorningreminderTimeKey, App.DailyMorningReminderTime);

            persistDateTimeData.Backup(_dailyAfternoonreminderDateKey, App.DailyAfternoonReminderDate);
            persistDateTimeData.Backup(_dailyAfternoonreminderTimeKey, App.DailyAfternoonReminderTime);

            persistDateTimeData.Backup(_dailyEveningreminderDateKey, App.DailyEveningReminderDate);
            persistDateTimeData.Backup(_dailyEveningreminderTimeKey, App.DailyEveningReminderTime);

            persistDateTimeData.Backup(_dailyNightreminderDateKey, App.DailyNightReminderDate);
            persistDateTimeData.Backup(_dailyNightreminderTimeKey, App.DailyNightReminderTime);

            persistDateTimeData.Backup(_weeklyreminderDateKey, App.WeeklyReminderDate);
            persistDateTimeData.Backup(_weeklyreminderTimeKey, App.WeeklyReminderTime);

            persistDateTimeData.Backup(_monthlyreminderDateKey, App.MonthlyReminderDate);
            persistDateTimeData.Backup(_monthlyreminderTimeKey, App.MonthlyReminderTime);

            persistDateTimeData.Backup(_every28DaysreminderDateKey, App.Every28DaysReminderDate);
            persistDateTimeData.Backup(_every28DaysreminderTimeKey, App.Every28DaysReminderTime);
        }