public static async Task <bool> Logging()
        {
            var user = UserOptions.GetUser();

            if (string.IsNullOrEmpty(user))
            {
                return(false);
            }

            var model = new LoginModel
            {
                email    = user,
                password = UserOptions.GetPassword(),
            };

            UIFunc.ShowLoading(U.StandartLoggingText);
            var result = await WebServiceFunc.SubmitLogin(model);

            UIFunc.HideLoading();

            if (!result.Item1)
            {
                return(false);
            }

            var aspxauth = result.Item4;

            UserOptions.SetAspxauth(aspxauth);

            return(true);
        }
        public async Task Commit()
        {
            UIFunc.ShowLoading(U.StandartLoggingText);
            var result = await WebServiceFunc.SubmitLogin(Model);

            UIFunc.HideLoading();

            if (!result.Item1)
            {
                var errtext = (string.IsNullOrEmpty(result.Item3) ? Globalization.T("(!)LoginError") : result.Item3);
                await UIFunc.AlertError(errtext);

                return;
            }

            var userProfileRowId = result.Item2.Value;
            var aspxauth         = result.Item4;

            UserOptions.SetUsernamePassword(Model.email, Model.password, userProfileRowId);
            UserOptions.SetAspxauth(aspxauth);

            await NavFunc.RestartApp();
        }