Esempio n. 1
0
        private void btSaveRecurrence_Click(object sender, EventArgs e)
        {
            DateTime            dateFrom, dateTo;
            HashSet <DayOfWeek> days = new HashSet <DayOfWeek>();

            days = GetDays();

            //check if valid
            if (InputIsValid())
            {
                dateFrom = DateTime.Parse(dtpStart.Text + " " + dtpFromTime.Text);
                dateTo   = DateTime.Parse(dtpEnd.Text + " " + dtpToTime.Text);

                RecurrentEvent recurrentEvent = new RecurrentEvent()
                {
                    DateFrom     = dateFrom,
                    DateTo       = dateTo,
                    AllDay       = chbade.Checked,
                    WeekDays     = days,
                    DowntimeType = appointmentTypeView.DowntimeType
                };

                //fire delegate and close the dialog
                dialogClosedDelegate(recurrentEvent);
                this.Close();
            }
            else
            {
                MessageBox.Show("Incorrect date format", "Schedule Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Esempio n. 2
0
    private void btSaveRecurrence_Click(object sender, EventArgs e) {
      DateTime dateFrom, dateTo;
      HashSet<DayOfWeek> days = new HashSet<DayOfWeek>();

      days = GetDays();

      //check if valid
      if (InputIsValid()) {
        dateFrom = DateTime.Parse(dtpStart.Text + " " + dtpFromTime.Text);
        dateTo = DateTime.Parse(dtpEnd.Text + " " + dtpToTime.Text);

        RecurrentEvent recurrentEvent = new RecurrentEvent() {
          DateFrom = dateFrom,
          DateTo = dateTo,
          AllDay = chbade.Checked,
          WeekDays = days,
          DowntimeType = appointmentTypeView.DowntimeType
        };

        //fire delegate and close the dialog
        dialogClosedDelegate(recurrentEvent);
        this.Close();
      } else {
        MessageBox.Show("Incorrect date format", "Schedule Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
      }
    }
Esempio n. 3
0
 public void DialogClosed(RecurrentEvent e) {
   CreateDailyRecurrenceDowntimes(e.DateFrom, e.DateTo, e.AllDay, e.WeekDays, e.DowntimeType);
 }
Esempio n. 4
0
 public void DialogClosed(RecurrentEvent e)
 {
     CreateDailyRecurrenceDowntimes(e.DateFrom, e.DateTo, e.AllDay, e.WeekDays, e.DowntimeType);
 }