public void Service_On_ResponseRecived(string message, object data) { IsLoading = false; LoginResponse[] response = (LoginResponse[])data; //dynamic[] response = (dynamic[])data; if (response?.Length > 0) { Application.Current.Properties["userData"] = response[0]; LoginResponse loginUser = response[0] as LoginResponse; if (loginUser.role_id == "3") { var driverSlideMenu = new DriverSlideMenuPage(); Application.Current.MainPage = driverSlideMenu; } else { var slideMenu = new SlideMenuPage(); Application.Current.MainPage = slideMenu; } } else { //Application.Current.MainPage.DisplayAlert("Please enter correct details", "", "OK"); Application.Current.MainPage.DisplayAlert("Shofar", message, "OK"); } }
public void Service_On_ResponseRecived(string message, object data) { IsLoading = false; LoginResponse[] response = (LoginResponse[])data; //dynamic[] response = (dynamic[])data; if (response?.Length > 0) { var slideMenu = new SlideMenuPage(); Application.Current.MainPage = slideMenu; } else { //Application.Current.MainPage.DisplayAlert("Please enter correct details", "", "OK"); Application.Current.MainPage.DisplayAlert("Shofar", message, "OK"); } }