public void Free() { _context = null; _listemployeesweek.Clear(); _dictionEmployees.Clear(); _StoreWorldInfo = null; _summary.Clear(); }
private void FillCommonInfoForWorld(WorldPlanningInfo worldinfo, StoreToWorld storeworld, DateTime begin, DateTime end) { short year = (short)DateTimeHelper.GetYearByDate(begin); PersonMinMax personMinMax = ExStoreToWorld.GetPersonMinMax(storeworld, year); WorldAvailableBufferHoursManager availBufferHours = new WorldAvailableBufferHoursManager(storeworld, begin); AvgAmount avgamount = _avgamountservice.GetAvgAmountByYear(CountryId, year); worldinfo.StoreWorldId = storeworld.ID; if (personMinMax != null) { worldinfo.MinimumPresence = personMinMax.Min; worldinfo.MaximumPresence = personMinMax.Max; } if (availBufferHours.BufferHours != null && availBufferHours.BufferHours.Value != 0) { worldinfo.AvailableWorldBufferHours = Convert.ToInt32(availBufferHours.GetPrevAvailableBufferForWeek(begin) + availBufferHours.BufferHoursPerWeek); } else worldinfo.AvailableWorldBufferHours = Int32.MinValue; if (!worldinfo.IsCashDesk) { Benchmark benchmark = ExStoreToWorld.GetBenchmark(storeworld, year);//_benchmarkservice.GetBenchmark(storeworld.ID, year); if (benchmark != null) worldinfo.Benchmark = benchmark.Value; } }