private async void createBtn_Click(object sender, RoutedEventArgs e)
        {
            if (usernameTextBox.Text == "" || emailTextBox.Text == "" || passwordTextBox.Password == "" || confirmPasswordTextBox.Password == "")
            {
                MessageBox.Show("Username, Email and Password are required.");
            }
            else
            {
                RegisterBinder registerBinder = new RegisterBinder()
                {
                    Email           = emailTextBox.Text,
                    FName           = firstNameTextBox.Text,
                    LName           = lastNameTextBox.Text,
                    PhoneNumber     = phoneNumberTextBox.Text,
                    Username        = usernameTextBox.Text,
                    Password        = passwordTextBox.Password,
                    ConfirmPassword = confirmPasswordTextBox.Password,
                };

                await userManager.Register(registerBinder);

                if (userManager.Register(registerBinder) == null)
                {
                    mainWindow.GoToThingPage();
                }
            }
        }
Example #2
0
        public static async Task <string[]> MainAsync()
        {
            RestClient.SetDomain("https://*****:*****@gmail.com",
                FName           = $"Name{random}",
                LName           = $"LName{random}",
                Password        = $"Password{random}",
                ConfirmPassword = $"Password{random}"
            });


            ThingDto dto = things.Get(1);

            dto.Household = households.Get(dto.HouseholdId);
            Console.WriteLine(JsonConvert.SerializeObject(dto));


            //      dto = complete thing, ready for use


            return("Oi");
        }