Пример #1
0
        private void register(object sender, RoutedEventArgs e)
        {
            var todoItem = new TodoItem2
            {
                Name = textBox.Text,
                SchoolID = textBox1.Text,
                username = textBox2.Text,
                password = passwordBox.Password,
                email = textBox3.Text,
                phoneno = textBox4.Text
            };
            var todoItem2 = new TodoItem4
            {
                username = textBox2.Text,
                password = passwordBox.Password,
                value = "Parent"
            };
            string pw1 = passwordBox.Password;
            string pw2 = passwordBox2.Password;
            if (pw1.Equals(pw2))
            {
                InsertTodoItem(todoItem);
                InsertTodoItem(todoItem2);
                this.Frame.Navigate(typeof(MainPage), null);
            }
            else
            {

            }
        }
Пример #2
0
 private async Task InsertTodoItem(TodoItem2 todoitem2)
 {
     await registerparent.InsertAsync(todoitem2);
     items2.Add(todoitem2);
 }