Unable to show the detail of the user after logged in..

shubham1shubham1 Member ✭✭✭
edited December 2017 in Cross Platform with Xamarin

this is my code for validating the user
private async void Button_Clicked(object sender, EventArgs e)
{
LoginService services = new LoginService();
var getLoginDetails = await services.CheckLoginIfExist(emlentry.Text, password.Text);
if(getLoginDetails)
{

            App.IsUserLoggedIn = true;
            Application.Current.MainPage = new Pages.HomePages.Home_Page();

        }
        else
        {
            await DisplayAlert("Login Failed", "Username or Password or not exists", "Okay", "Cancle");
        }    
    }

__________________________________________________________________________________________|
this the page where i want to show the detail of the user after logged in
<ContentPage.Content>

_____________________________________________________________________________________-

I am doing this with the help web API.

waiting for the response..

Tagged:

Posts

  • AlessandroCaliaroAlessandroCaliaro ITMember ✭✭✭✭✭

    @Shubhuuu said:
    this is my code for validating the user
    private async void Button_Clicked(object sender, EventArgs e)
    {
    LoginService services = new LoginService();
    var getLoginDetails = await services.CheckLoginIfExist(emlentry.Text, password.Text);
    if(getLoginDetails)
    {

    App.IsUserLoggedIn = true;
    Application.Current.MainPage = new Pages.HomePages.Home_Page();

    }
    else
    {
    await DisplayAlert("Login Failed", "Username or Password or not exists", "Okay", "Cancle");
    }
    }

    __________________________________________________________________________________________|
    this the page where i want to show the detail of the user after logged in
    <ContentPage.Content>

    _____________________________________________________________________________________-

    I am doing this with the help web API.

    waiting for the response..

    which is the problem?

  • shubham1shubham1 Member ✭✭✭

    thanku alesandro for your quick reply..
    I am asking how to fetch the detail of member after the success of login.?

  • shubham1shubham1 Member ✭✭✭

    I would like to show the details of the main user, who have logged in..

  • AlessandroCaliaroAlessandroCaliaro ITMember ✭✭✭✭✭

    I think you have to pass your data to the page, you can use the costructor

    Application.Current.MainPage = new Pages.HomePages.Home_Page(getLoginDetails);
    
  • shubham1shubham1 Member ✭✭✭

    Sorry to irate you, As I understand that getLoginDetail will be used to getting details of the user.
    would you like to elaborate, actually I am new and learning these modules, Please help
    AlessandroCaliaro

  • shubham1shubham1 Member ✭✭✭

    Thank you for all ur help. I think I am doing something wrong that's why you are not getting my point.
    Thanks, Good Day.

Sign In or Register to comment.