private void bwViewReport_DoWork(object sender, DoWorkEventArgs e)
 {
     linePerformanceDetailList = LinePerformanceDetailController.SelectBySection(section.SectionId, monthSearch, yearSearch);
     lineModelList             = LineController.Select(section.SectionId);
     if (selectArea == "Old")
     {
         linePerformanceDetailList = linePerformanceDetailList.Where(w => oldArr.Contains(w.LineId) == true).ToList();
         lineModelList             = lineModelList.Where(w => oldArr.Contains(w.LineId) == true).OrderBy(o => o.Ordinal).ToList();
     }
     if (selectArea == "New")
     {
         linePerformanceDetailList = linePerformanceDetailList.Where(w => newArr.Contains(w.LineId) == true).ToList();
         lineModelList             = lineModelList.Where(w => newArr.Contains(w.LineId) == true).OrderBy(o => o.Ordinal).ToList();
     }
     incentiveGradeList = IncentiveGradeModel.Select().Where(w => w.SectionId == section.SectionId).ToList();
     positionList       = linePerformanceDetailList.Select(s => s.IncentiveGrade).Distinct().ToList();
 }
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            int currentMonth = DateTime.Now.Month;

            int[] monthArray = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 };
            cboMonth.ItemsSource  = monthArray;
            cboMonth.SelectedItem = currentMonth;
            int currentYear = DateTime.Now.Year;

            int[] yearArray = { currentYear - 1, currentYear };
            cboYear.ItemsSource  = yearArray;
            cboYear.SelectedItem = currentYear;
            incentiveGradeList   = IncentiveGradeModel.Select().Where(i => i.SectionId == section.SectionId).ToList();
            if (bwLoadData.IsBusy == false)
            {
                this.Cursor = Cursors.Wait;
                bwLoadData.RunWorkerAsync();
            }
        }