private void BtRefresh_Click(object sender, RoutedEventArgs e) { if (tb_CostCenter.IsSelected) { CCSearchControl.ResetSearchControl(); cc = new CostCenterModel(this); } else if (tb_CostCenterwiseConfiguration.IsSelected) { CCwCSearchControl.ResetSearchControl(); ccwc = new CostCenterwiseConfigurationModel(this); } }
private void TbPage_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (!(e.Source is TabControl)) { return; } if (tb_CostCenter.IsSelected) { if (cc == null) { cc = new CostCenterModel(this); } } }