private void showHolidayManagerEdit(object sender, EventArgs e) { int id = (int)((Hyperlink)(sender)).Tag; if (id != -1) { var editHoliday = new AddHolidayWindow(DateTime.Today, id); editHoliday.ShowDialog(); DisplayCurrentDate(); } }
private void showHolidayManager(object sender, MouseButtonEventArgs e) { int day = (int)((Grid)(sender)).Tag; if (day != 0) { var selectedDate = new DateTime(currentDate.Year, currentDate.Month, day); var addHoliday = new AddHolidayWindow(selectedDate, -1); addHoliday.ShowDialog(); DisplayCurrentDate(); } }