void menuItemSaveDoc_Click(object sender, RoutedEventArgs e)
 {
     _db.DataTableUpdateCheckSource(_check.ProcedureName);
     _session.CreateDocument(DocTypes.Regular);
     var winSecondary = new WindowSecondary(_session,isWhRestExistsCheckErrorDoc:true);
     winSecondary.ShowDialog();
     WhRestExistsCheckNewDoc(this, null);
 }
 private void WorkerRunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
 {
     if (e.Error != null)
     {
         MessageBox.Show("Ошибка при загрузке документа: " + e.Error.Message, "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error);
     }
     else
     {
         if (e.Result.Equals("Successful"))
         {
             labelInfo.Content = "Окно не активно";
             //_pivotGridControl1.HideFieldList();
             var window =
                 new WindowSecondary(_session);
             //var window = new WindowSecondary(_session);
             window.ShowDialog();
         }
         else
         {
             labelInfo.Content = "Ошибка инициализации";
         }
     }
 }
예제 #3
0
        private void WorkerRunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            Cursor = Cursors.Arrow;

            if (e.Error != null)
            {
                MessageBox.Show("Ошибка инициализации: " + e.Error.Message, "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error);
            }
            else
            {
                if ((InitializeResults)e.Result == InitializeResults.Successful)
                {
                    labelInfo.Content = "Окно не активно";

                    _pivotGridControl1.HideFieldList();

                    var window = new WindowSecondary(_session, _pivotGridControl1);
                    window.ShowDialog();
                    gridInfo.Visibility = Visibility.Hidden;
                    ((UIElement)Content).IsEnabled = true;
                }
                else
                {
                    labelInfo.Content = "Ошибка инициализации";
                    ((UIElement)Content).IsEnabled = true;
                }
            }
        }