public void AddWorkingHours(int employeeID, int projectID) { try { if (selectedDate != null) { DBStore store = new DBStore(); store.AddWorkingHours(projectID, selectedDate.ToString("yyyy-MM-dd"), numNumberOFHours.Value.ToString()); calendar.RemoveAllEvents(); LoadHoursForCurrentUser(); } else { MessageBox.Show("Please select date"); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }