public override void OnNavigatedTo(NavigationContext navigationContext)
 {
     ServiceZipList.Clear();
     StoresWithCheckList.Clear();
     IsServiceBusy = true;
     _worker.RunWorkerAsync();
 }
Пример #2
0
 private void AddServiceZipsWork_Completed(object sender, RunWorkerCompletedEventArgs e)
 {
     ZipList = _zipService.GetZips();
     RefreshEmptyList();
     ServiceZipList.Clear();
     IsServiceBusy = false;
 }
Пример #3
0
 public override void OnNavigatedTo(NavigationContext navigationContext)
 {
     ServiceZipList.Clear();
     StoresList.Clear();
     MonthExpList.Clear();
     MonthServExpList.Clear();
     ServiceAccountsList.Clear();
     IsServiceBusy = true;
     _worker.RunWorkerAsync();
 }
 private void LoadReport()
 {
     StackedStoreList.Clear();
     StoreZipList.Clear();
     foreach (var store in StoresWithCheckList.Where(s => s.Check))
     {
         var stackedStore = new StackedStoreInfo();
         stackedStore.Store          = store.Store;
         stackedStore.EquipmentSum   = ServiceZipList.Where(se => se.StoreNumber == store.Store.StoreNumber && (new DateTime(se.ServiceYear.Value, ReturnNumberMonth(se.ServiceMonth), 1) >= new DateTime(StartDate.Year, StartDate.Month, 1)) && (new DateTime(se.ServiceYear.Value, ReturnNumberMonth(se.ServiceMonth), 1) < new DateTime(EndDate.Year, EndDate.Month, 1)) && se.ZipName != "Ремонт").Sum(se => se.ZipQuantity == 0 ? se.ZipPrice : se.ZipPrice * se.ZipQuantity.Value);
         stackedStore.RepairSum      = ServiceZipList.Where(se => se.StoreNumber == store.Store.StoreNumber && (new DateTime(se.ServiceYear.Value, ReturnNumberMonth(se.ServiceMonth), 1) >= new DateTime(StartDate.Year, StartDate.Month, 1)) && (new DateTime(se.ServiceYear.Value, ReturnNumberMonth(se.ServiceMonth), 1) < new DateTime(EndDate.Year, EndDate.Month, 1)) && se.ZipName == "Ремонт").Sum(se => se.ZipPrice);
         stackedStore.ServiceZipList = ServiceZipList.Where(se => se.StoreNumber == store.Store.StoreNumber && (new DateTime(se.ServiceYear.Value, ReturnNumberMonth(se.ServiceMonth), 1) >= new DateTime(StartDate.Year, StartDate.Month, 1)) && (new DateTime(se.ServiceYear.Value, ReturnNumberMonth(se.ServiceMonth), 1) < new DateTime(EndDate.Year, EndDate.Month, 1)));
         StackedStoreList.Add(stackedStore);
     }
 }
Пример #5
0
 private void LoadSpecification()
 {
     ServiceZipList.Clear();
     EmptyZipsList.Clear();
     NewZipList.Clear();
     _reportsController.ShowDialogWindow();
     foreach (var serviceZip in _excelSpecificationLoader.GetServiceZips(SelectedCompany, _specFileName, SelectedMonth, SelectedYear).Result)
     {
         ServiceZipList.Add(serviceZip);
     }
     foreach (var serviceZip in ServiceZipList)
     {
         if (!ZipList.Any(z => z.ZipName.ToLower() == serviceZip.ZipName.ToLower()))
         {
             if (!NewZipList.Any(e => e.ZipName.ToLower() == serviceZip.ZipName.ToLower()))
             {
                 NewZipList.Add(new ZipSet {
                     ZipName = serviceZip.ZipName
                 });
             }
         }
     }
 }