예제 #1
0
        private async void JePropose1_Click(object sender, RoutedEventArgs e)
        {
            string message = "";
            var dialog = new MessageDialog("");
            dialog.Title = "Proposition d'évenement :";
            dialog.Commands.Add(new UICommand("OK"));
            var eventSending = new EventGest();
            if (await verifForm())
            {
                var NewEvent = new Event();

                NewEvent.TitreEvent = TextBoxTitre.Text;
                NewEvent.NbParticipEvent = int.Parse(TextBoxNbrPartMax.Text);
                NewEvent.ThemeEvent = ThemeCombo.SelectedItem.ToString();
                NewEvent.AdresseEvent = adressSugest.Text;
                NewEvent.DateEvent = CalendarStart.Date.ToString();
                NewEvent.DescripEvent = DescriptionTextboxTitre.Text;
                NewEvent.PhotoEvent = ImageTextBox.Text;
                NewEvent.IdUser = App.MobileService.CurrentUser.UserId.ToString();
                NewEvent.TimeEvent = TimePicker.Time.Hours.ToString();
                NewEvent.Duration = DurationPicker.Time.ToString();
                eventSending.sendEvent(NewEvent);
                Frame.GoBack();
                message = "Envoyé avec succé :D";
            }
            else
            {
                message = "Champs invalide :(";
            }
            dialog.Content = message;
            await dialog.ShowAsync();
        }
예제 #2
0
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     if (e.Parameter is Event)
     {
         MenuItems = e.Parameter as Event;
         eventView.DataContext = MenuItems;
     }
 }
예제 #3
0
        public async void supprEvent(Event sEvent)
        {
            try { 
            await App.MobileService.GetTable<Event>().DeleteAsync(sEvent);
            }
            catch
            {

            }
        }
예제 #4
0
        public async void updateEvent(Event sEvent)
        {
            try
            {
                await App.MobileService.GetTable<Event>().UpdateAsync(sEvent);
            }
            catch
            {

            }
        }
예제 #5
0
        public async void sendEvent(Event sEvent)
        {
            try
            {
                await App.MobileService.GetTable<Event>().InsertAsync(sEvent);
            }
            catch
            {

            }
        }