Esempio n. 1
0
        private void ConstantTableView_InitNewRow(object sender, InitNewRowEventArgs e)
        {
            var row = ConstatnsGrid.GetRow(e.RowHandle) as ORM.Dictionary;

            row.DictionaryView = FocusedDictionary;
            row.IsVisible      = true;
            ConstatnsGrid.Focus();
        }
Esempio n. 2
0
 private void ConstantsDeleteButton_Click(object sender, RoutedEventArgs e)
 {
     if (MessageBox.Show("Вы действительно хотите исключить выбранную константу из справочника?", "Исключить константу", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes)
     {
         var rowHandle = ConstatnsGrid.View.FocusedRowHandle;
         var row       = ConstatnsGrid.GetRow(rowHandle) as ORM.Dictionary;
         if (row.DictionaryNumber == 1)
         {
             if (!_dc.Project.Any(x => x.Type == row.ID))
             {
                 ((TableView)ConstatnsGrid.View).DeleteRow(rowHandle);
                 _dc.Dictionary.DeleteOnSubmit(row);
             }
             else if (MessageBox.Show("Тип проекта не может быть удален, т.к. имеются проекты с выбранным типом.\nИсключить тип для будущих проектов?", "Ошибка исключения", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes)
             {
                 row.IsVisible = false;
             }
             ;
         }
         ;
     }
     ;
 }
Esempio n. 3
0
 private void ParameterTableView_InitNewRow(object sender, InitNewRowEventArgs e)
 {
     ConstatnsGrid.Focus();
 }