Пример #1
0
 void bgSave_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
 {
     if (((spTally != null) ? spTally.CheckTallyConnection() : false) || ((spExcell != null) ? spExcell.CheckExcellConnection() : false))
     {
         if (!bg.IsBusy)
         {
             bg.RunWorkerAsync(Header);
         }
     }
     else
     {
         ShowMessage(Process);
         grdMain.Children.OfType <DataGrid>().ToList().ForEach(b => grdMain.Children.Remove(b));
         pbProgressBar.IsIndeterminate = false;
         mainmaenu.IsEnabled           = true;
         grdLeftMenu.IsEnabled         = true;
         grdMain.IsEnabled             = true;
         Messages = null;
     }
 }