Example #1
0
 void Schedule_ScheduleCellTapped(object sender, ScheduleTappedEventArgs args)
 {
     scheduleview_list.IsVisible = false;
     if (Schedule.ScheduleView == ScheduleView.MonthView)
     {
         ;
         Schedule.ScheduleView          = ScheduleView.DayView;
         scheduleview_list.SelectedItem = 0;
         //Schedule.NavigateTo(args.datetime);
     }
     else
     {
         Schedule.IsVisible = false;
         editor.IsVisible   = true;
         if (args.selectedAppointment != null)
         {
             ScheduleAppointmentCollection appointment = new ScheduleAppointmentCollection();
             appointment        = (ScheduleAppointmentCollection)Schedule.DataSource;
             indexOfAppointment = appointment.IndexOf((ScheduleAppointment)args.selectedAppointment);
             editor.OpenEditor((ScheduleAppointment)args.selectedAppointment, args.datetime);
             isNewAppointment = false;
         }
         else
         {
             //create Apppointmentt
             editor.OpenEditor(null, args.datetime);
             isNewAppointment = true;
         }
     }
 }
Example #2
0
        async void schedule_ScheduleCellTapped(object sender, ScheduleTappedEventArgs args)
        {
            appointment = new Appointment((ScheduleAppointment)args.selectedAppointment);

            if (args.selectedAppointment == null)
            {
                string subject = await DisplayActionSheet("Choose subject", "Cancel", null, "Vet", "Haircut", "Medicine", "Buy dog food", "Put food", "Put water", "Other");

                if (subject != "Cancel")
                {
                    SqliteConnectionSet.isNewAppointment = true;
                    SqliteConnectionSet.mainStack.Children.Add(appointment);
                    appointment.UpdateEditor((ScheduleAppointment)args.selectedAppointment, subject, args.datetime, schedule);
                    schedule.IsVisible    = false;
                    appointment.IsVisible = true;
                }
            }
            else
            {
                Meeting meet = await FindAppointment((ScheduleAppointment)args.selectedAppointment);

                SqliteConnectionSet.isNewAppointment = false;
                schedule.IsVisible = false;

                SqliteConnectionSet.mainStack.Children.Add(appointment);
                SqliteConnectionSet.mainStack.Children[SqliteConnectionSet.mainStack.Children.Count - 1].IsVisible = true;

                appointment.UpdateEditor((ScheduleAppointment)args.selectedAppointment, ((ScheduleAppointment)args.selectedAppointment).Subject, args.datetime, schedule);
            }
        }
Example #3
0
 void schedule_ScheduleTapped(object sender, ScheduleTappedEventArgs e)
 {
     if (selapp != null)
     {
         selapp.AppointmentSelectionBrush = new SolidColorBrush(Colors.Transparent);
     }
     if (e.Appointment != null)
     {
         (e.Appointment as AppointmentWinRT).AppointmentSelectionBrush = new SolidColorBrush(Colors.Black);
         selapp = (AppointmentWinRT)e.Appointment;
     }
     else
     {
         foreach (AppointmentWinRT app in AppointmentCollection)
         {
             app.AppointmentSelectionBrush = new SolidColorBrush(Colors.Transparent);
         }
     }
 }
Example #4
0
 private void Schedulee_ScheduleCellTapped(object sender, ScheduleTappedEventArgs e)
 {
     Navigation.PushAsync(new GetAllocateServiceForEmployeePage(EmpID, "", ""));
 }