Пример #1
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="objYourDetUpdateVM"></param>
 public YourDetailsUpdateModel(YourDetailsUpdateViewModel yourDetailsUpdateViewModel, string dataFor)
 {
     objYourDetUpdateViewModel = yourDetailsUpdateViewModel;
     if (dataFor.Equals("GetData"))
     {
         GetUserDetailsWebService();
     }
     else
     {
         CallSendUserDetailsWebService();
     }
 }
Пример #2
0
        /// <summary>
        /// OnNavigatedTo event
        /// </summary>
        /// <param name="e"></param>
        protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
            LayoutRoot.IsHitTestVisible = true;
            yourDetailsUpdateVM         = new StateHelper().RestorePageLevelData <YourDetailsUpdateViewModel>(_yourDetailsUpdateVMKey);
            if ((App.IsToombStoned) || (!string.IsNullOrEmpty(App.SurgeonSaved)))
            {
                if (yourDetailsUpdateVM != null)
                {
                    yourDetailsUpdateVM.PrimaryColour = Utilities.GetColorFromHexa(App.ObjBrandingResponse.payload.branding_data.appearance.primary_colour);

                    yourDetailsUpdateVM.SecondaryColour = Utilities.GetColorFromHexa(App.ObjBrandingResponse.payload.branding_data.appearance.secondary_colour);

                    yourDetailsUpdateVM.FontColor           = Utilities.GetColorFromHexa(App.ObjBrandingResponse.payload.branding_data.appearance.font_colour);
                    yourDetailsUpdateVM.ButtonValueOnupdate = App.SurgeonSaved;
                }
                else
                {
                    yourDetailsUpdateVM = new YourDetailsUpdateViewModel(App.ObjLgResponse);
                }
            }
            else
            {
                if (yourDetailsUpdateVM == null)
                {
                    yourDetailsUpdateVM = new YourDetailsUpdateViewModel(App.ObjLgResponse);
                }
                else if (string.IsNullOrEmpty(App.SurgeonSaved) || string.IsNullOrWhiteSpace(App.SurgeonSaved))
                {
                    yourDetailsUpdateVM.ButtonValueOnupdate = "Choose Doctor for surgery (Optional)";
                }
            }

            this.DataContext = yourDetailsUpdateVM;

            new StateHelper().ClearPageLevelData <YourDetailsUpdateViewModel>(_yourDetailsUpdateVMKey, yourDetailsUpdateVM);

            base.OnNavigatedTo(e);
            App.TombStonedPageURL = PageURL.navigateToYourDetailsUpdateURL;

            if (!e.IsNavigationInitiator)
            {
                App.IsToombStoned = false;
                NavigationService.Navigate(new Uri(PageURL.navigateToEnterPinURL, UriKind.RelativeOrAbsolute));
            }
        }