Ejemplo n.º 1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                var    myName   = name.Text;
                var    myPhone  = phoneNo.Text;
                var    myEmail  = email.Text;
                string a        = "welcome";
                int    myAge    = Convert.ToInt32(age.Text);
                var    todoItem = new myProfile {
                    name = myName, age = myAge, sex = sexw, mobile = myPhone, email = myEmail
                };

                var todoprescription = new Prescription {
                    name = myName, phoneno = myPhone
                };
                var notifytable = new notificationtable {
                    notificationstring = a
                };
                var todocasesheet = new Casesheet {
                    name = myName, sex = sexw, age = myAge
                };

                InsertTodoItem(todoItem, todoprescription, todocasesheet, notifytable);



                NavigationService.Navigate(new Uri("/menuPage.xaml", UriKind.Relative));
            }
            catch
            {
                MessageBox.Show("Invalid input");
            }

            //RefreshTodoItems();
        }
Ejemplo n.º 2
0
        private async void InsertTodoItem(myProfile todoItem, Prescription todoprescription, Casesheet todocasesheet, notificationtable notifytable)
        {
            await casesheetTable.InsertAsync(todocasesheet);

            await profileTable.InsertAsync(todoItem);

            await notiTable.InsertAsync(notifytable);

            await PrescriptionTable.InsertAsync(todoprescription);

            //items.Add(todoItem);
        }