private void AddNewFooter() { var newFooter = new Dict_Balance_FreeHierarchy_Footers { BalanceFreeHierarchy_UN = _container.BalanceFreeHierarchyUn, BalanceFreeHierarchySection_UN = _container.BalanceFreeHierarchySectionUN, BalanceFreeHierarchyFooterName = "Итого", Coef = 1, UseInTotalResult = false, SortNumber = (byte)_viewModel.GridData.Count, }; var balanceFooter = new BalanceFreeHierarchyFooterEditorControl(newFooter, _container.Sections, () => { _viewModel.GridData.Add(newFooter); }); Manager.UI.ShowLocalModal(balanceFooter, "Добавить новый итог для '" + _container.BalanceFreeHierarchySectionName + "'", this, false, true); }
private void EditFooterClick(object sender, RoutedEventArgs e) { var fe = sender as FrameworkElement; if (fe == null) { return; } var footer = fe.DataContext as Dict_Balance_FreeHierarchy_Footers; if (footer == null) { return; } var balanceFooter = new BalanceFreeHierarchyFooterEditorControl(footer, _container.Sections, null); Manager.UI.ShowLocalModal(balanceFooter, "Редактировать итог для '" + _container.BalanceFreeHierarchySectionName + "'", this, false, true); }