示例#1
0
        public void OnImageSignin(object sender, System.EventArgs args)
        {
            if (CrossConnectivity.Current.IsConnected)
            {
                if (App.RePagelogin == true)
                {
                    App.RePagelogin = false;
                    Navigation.PushAsync(new LoginPage());
                }
                else
                {
                    App.RePagelogin = false;
                    var      username  = mUsernameEntry.Text;
                    var      password  = mPasswordEntry.Text;
                    Login    MasQLogin = new Login(username, password);
                    UIReturn uiReturn  = LoginController.getInstance().LoginMember(MasQLogin);

                    if (uiReturn.isSuccess)
                    {
                        App.fristtime = true;
                        Navigation.PushAsync(new MainPage());
                    }
                    else
                    {
                        DisplayAlert(App.AppicationName, uiReturn.getDescription(), "Close");
                    }
                }
            }
            else
            {
                App.RePagelogin = true;
                DisplayAlert(App.AppicationName, App.NoInternet, "Close");
            }
        }
示例#2
0
        private void login()
        {
            Login m = new Login();

            m.username = "******";
            m.password = "******";
            UIReturn result = LoginController.getInstance().LoginMember(m);
        }
示例#3
0
        async void OnImageMainExit(object sender, System.EventArgs args)
        {
            if (CrossConnectivity.Current.IsConnected)
            {
                if (App.RePagemain == true)
                {
                    App.RePagemain = false;
                    await Navigation.PushAsync(new MainPage());
                }
                else
                {
                    var answer = await DisplayAlert(Utils.getLabel(LabelConstants.MAIN_PAGE_LOGOUT), Utils.getLabel(LabelConstants.MAIN_PAGE_CONFIRMLOGOUT), "Yes", "No");

                    if (answer == true)
                    {
                        UIReturn Chklogout = LoginController.getInstance().LogutMember();
                        if (!Chklogout.isSuccess)
                        {
                            App.timercheck = false;
                            CountstartMain = false;
                            await DisplayAlert(App.AppicationName, Chklogout.getDescription(), "Close");
                        }
                        else
                        {
                            App.timercheck = false;
                            CountstartMain = false;
                            //SessionModel.bookingQ = null;
                            Navigation.InsertPageBefore(new LoginPage(), this);
                            await Navigation.PopAsync();
                        }
                    }
                }
            }
            else
            {
                App.RePagemain = false;
                await DisplayAlert(App.AppicationName, App.NoInternet, "Close");
            }
        }