Exemplo n.º 1
0
        //clicking on a day
        private void DayBox_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            MonthDayBoxControl dayClicked = (MonthDayBoxControl)sender;
            NewApptDay         dayWindow  = new NewApptDay(dayClicked.getDay(), this.currentMonth, this.currentYear, potentialLength, apptType, targetPatient);

            dayWindow.Owner = this;
            dayWindow.Show();
            this.Hide();
        }
Exemplo n.º 2
0
        //creates a new day
        public NewApptDay(int day, int month, int year, int potentialLength, string apptType, Patient targetPatient)
        {
            NewApptDay.newWindowOpened += handleNewWindow;
            MainWindow.mainClosed      += handleMainClose;
            NewApptDay.newWindowOpened(this, null);

            InitializeComponent();

            this.potentialLength = potentialLength;
            this.apptType        = apptType;
            this.patient         = targetPatient;

            this.time          = new DateTime(year, month, day);
            this.dateText.Text = time.ToString("d MMM yyyy");

            MediSchedData.dbChanged += handleDbChange;

            loadDaySchedules();
        }