示例#1
0
        private bool CheckPhoneUnique()
        {
            GetData.ClassAccount classAccount = new ClassAccount();

            Account account = classAccount.SelectAccount(EntryPhone.Text);

            if (account.Phone != null)
            {
                return(false);
            }
            return(true);
        }
示例#2
0
        private bool LoginExists()
        {
            GetData.ClassAccount classAccount = new ClassAccount();

            Account account = classAccount.SelectAccount(EntryLogin.Text);

            if (account.Phone == null || account.Password != EntryPassword.Text)
            {
                return(false);
            }
            AccountManager.Account = account;
            return(true);
        }
示例#3
0
        private async void EntryPhone_Completed(object sender, EventArgs e)
        {
            GetData.ClassAccount classAccount = new ClassAccount();

            Account account = classAccount.SelectAccount(EntryPhone.Text);

            if (account.Phone == null)
            {
                await DisplayAlert("Помилка", "Цей телефон не прив'язаний до жодного аккаунту", "Ок");

                EntryPhone.Text = "";
            }
        }
示例#4
0
        private async void ButtonApply_Clicked(object sender, EventArgs e)
        {
            if (validEmail.IsMatch(EntryPhone.Text))
            {
                string pas = GenerateNewPass();

                GetData.ClassAccount classAccount = new ClassAccount();

                Account account = classAccount.SelectAccount(EntryPhone.Text);

                account.Password = pas;
                classAccount.UpdateAccount(account);

                (new Messager()).SendMessage(EntryPhone.Text, account.NickName, pas);

                await DisplayAlert("Відновлення паролю", "Новий пароль відправлений на Email", "OK");
            }
            else
            {
                await DisplayAlert("Помилка", "Невірний формат телефону", "Ок");
            }
        }