public Home() { InitializeComponent(); BindingContext = new DemoHandsetPendingRPTViewModel(); activelistview.RefreshCommand = new Command(() => { if (CrossConnectivity.Current.IsConnected) { BindingContext = new DemoHandsetPendingRPTViewModel(); activelistview.IsRefreshing = false; } else { DisplayAlert("Alert", "Please check your internet connection", "OK"); } }); }
protected override void OnAppearing() { base.OnAppearing(); try { act.IsRunning = true; act.IsVisible = true; BindingContext = new DemoHandsetPendingRPTViewModel(); memberDatabase = new MemberDatabase(); var members = memberDatabase.GetUserDetail(); UserDetail userin = (from blog in members select blog).FirstOrDefault(); if (userin != null) { UserID = userin.Userid; var imlocal = userin.Imagename; string url = "http://elixirct.in/ShopRConservicePublish/Uploads/" + imlocal; StoreId = userin.StoreId; profileimage2.Source = url; } else { // Navigation.PushAsync(new MainPage()); } act.IsRunning = false; act.IsVisible = false; } catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex); act.IsRunning = false; act.IsVisible = false; } }