Beispiel #1
0
        /// <summary>
        /// Event occurs when there'is a double-click on a free space scheduler (not on an event).
        /// </summary>
        private void slotGenerationScheduler_OnEventDoubleClick(object sender, Event e)
        {
            AddSlotScheduleWindow slotScheduleWin = new AddSlotScheduleWindow(e, slotGenerationScheduler);

            slotScheduleWin.lblPerson.Content = "";
            slotScheduleWin.ShowDialog();
        }
 /// <summary>
 /// Event occurs when there'is a double-click on an event.
 /// </summary>
 private void slotGenerationScheduler_OnScheduleDoubleClick(object sender, DateTime e)
 {
     if (cbxPeople.SelectedIndex != -1)
     {
         AddSlotScheduleWindow slotScheduleWin = new AddSlotScheduleWindow(e, slotGenerationScheduler);
         slotScheduleWin.lblAttendencySlot.Visibility = Visibility.Hidden;
         slotScheduleWin.cbAttendencySlot.Visibility  = Visibility.Hidden;
         slotScheduleWin.ShowDialog();
         btnSlotScheduleGeneration.Visibility = Visibility.Visible;
     }
     else
     {
         MessageBox.Show("Veuillez choisir un employé dans la liste déroulante !");
     }
 }
        /// <summary>
        /// Event occurs when there'is a double-click on a free space scheduler (not on an event).
        /// </summary>
        private void slotGenerationScheduler_OnEventDoubleClick(object sender, Event e)
        {
            Person p = bdModel.AbsencePreferences.First(a => a.idTimeSlot == e.IdShift).Person;

            if (cbxPeople.SelectedIndex == -1)
            {
                AddAbsencePreferenceOnScheduler(p);
                cbxPeople.SelectedValue = p.idPerson;
            }
            else
            {
                AddSlotScheduleWindow slotScheduleWin = new AddSlotScheduleWindow(e, slotGenerationScheduler);
                slotScheduleWin.lblPerson.Content            = "Employé : " + p.firstName + " " + p.name;
                slotScheduleWin.lblAttendencySlot.Visibility = Visibility.Hidden;
                slotScheduleWin.cbAttendencySlot.Visibility  = Visibility.Hidden;
                slotScheduleWin.ShowDialog();
                btnSlotScheduleGeneration.Visibility = Visibility.Visible;
            }
        }