我有以下法典:
jobsToShiftUp.AddRange(PresentationManager.Instance.ScheduleViewSource.Where(o => o.Resources.First().ResourceName == criticalJob.Resources.First().ResourceName && ((o.Start >= criticalJob.Start) || (o.Start < criticalJob.Start && o.End > criticalJob.Start)) && !o.JobGuid.Equals(((Job)state.DraggedAppointments.First()).JobGuid) && GetWeekNumber(o.Start) == GetWeekNumber(criticalJob.Start)));
jobsToShiftUp = jobsToShiftUp.OrderBy(o => o.Start).ToList();
TimeSpan timeToShift = criticalJob.End - jobsToShiftUp.First().Start;
foreach (Job job in jobsToShiftUp)
{
if (jobsToShiftUp.IndexOf(job) == 0)
{
((ObservableCollection<Job>)state.DestinationAppointmentsSource).Single(o => o.JobGuid.Equals(job.JobGuid)).Start += timeToShift;
((ObservableCollection<Job>)state.DestinationAppointmentsSource).Single(o => o.JobGuid.Equals(job.JobGuid)).End += timeToShift;
......
最后一个两条线(增加就业机会的开始和结束性质)既影响到国家,也影响到目的地名单和工作机会。 清单(即,它影响到目前在每个路口中提到的工作对象)。 我想,它为什么会影响到ToShiftUp就业名单!