|
|
@@ -625,6 +625,7 @@ namespace PRSDesktop
|
|
|
EndHour = 24;
|
|
|
}
|
|
|
|
|
|
+ CalendarControl.RowInterval = TimeIntervalToTimeSpan(TimeInterval);
|
|
|
CalendarViewSelector.ItemsSource = new List<KeyValuePair<CalendarViewType, string>>
|
|
|
{
|
|
|
new(CalendarViewType.Day, "Day"),
|
|
|
@@ -874,44 +875,6 @@ namespace PRSDesktop
|
|
|
return _assignments.Where(a => (a.EmployeeLink.ID == employeeid) && (a.Date == date)).ToArray();
|
|
|
}
|
|
|
|
|
|
- // public void UpdateAssignment(Assignment assignment)
|
|
|
- // {
|
|
|
- //
|
|
|
- // void UpdateCalendar<TEntity, TModel>(
|
|
|
- // TEntity entity,
|
|
|
- // List<TModel> collection,
|
|
|
- // Action<TModel> refresh
|
|
|
- // ) where TEntity : Entity where TModel : class, IModel
|
|
|
- // {
|
|
|
- //
|
|
|
- // if (Calendar.ItemsSource is CalendarAppointments appointments)
|
|
|
- // {
|
|
|
- // var appointment = appointments.FirstOrDefault(x => (Guid)x.Id == entity.ID) as ScheduleAppointment;
|
|
|
- // if (appointment != null)
|
|
|
- // {
|
|
|
- // appointments.Remove(appointment);
|
|
|
- // var calappt = appointment as ICalendarAppointment<TModel>;
|
|
|
- // if (calappt != null)
|
|
|
- // collection.Remove(calappt.Model);
|
|
|
- // }
|
|
|
-
|
|
|
- // var table = new CoreTable();
|
|
|
- // table.LoadColumns(typeof(TEntity));
|
|
|
- // var row = table.NewRow();
|
|
|
- // table.FillRow(row, entity);
|
|
|
- // var model = (Activator.CreateInstance(typeof(TModel),row) as TModel)!;
|
|
|
- // collection.Add(model);
|
|
|
- // refresh(model);
|
|
|
-
|
|
|
- // }
|
|
|
-
|
|
|
- // }
|
|
|
- //
|
|
|
- // if (Calendar.ItemsSource is CalendarAppointments appointments)
|
|
|
- // UpdateCalendar(assignment, _assignments, (model) => LoadAssignment(model, appointments));
|
|
|
- //
|
|
|
- // }
|
|
|
-
|
|
|
private void LoadBackground()
|
|
|
{
|
|
|
var regions = new ObservableCollection<CalendarRegion>();
|