Exemplo n.º 1
0
        private void bt_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                var myName   = tb.Text;
                var id       = App.MobileService.CurrentUser.UserId;
                var todoItem = new notificationtable {
                    notificationstring = myName
                };


                InsertTodoItem(todoItem);

                //NavigationService.Navigate(new Uri("/Page2.xaml", UriKind.Relative));
            }
            catch
            {
                MessageBox.Show("Invalid input");
            }
        }
Exemplo n.º 2
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();
        }
Exemplo n.º 3
0
 private async void InsertTodoItem(notificationtable todoItem)
 {
     await notiTable.InsertAsync(todoItem);
 }
Exemplo n.º 4
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);
        }