Ejemplo n.º 1
0
 private void BtRefresh_Click(object sender, RoutedEventArgs e)
 {
     if (tb_AccountType.IsSelected)
     {
         AccountTypeSearchControl.ResetSearchControl();
         at = new AccountTypeModel(this);
     }
     else if (tb_AccountSubType.IsSelected)
     {
         AccountSubTypeSearchControl.ResetSearchControl();
         ast = new AccountSubTypeModel(this);
     }
     else if (tb_AccountSubTypeCategory.IsSelected)
     {
         AccountSubTypeCatSearchControl.ResetSearchControl();
         astc = new AccountSubTypeCategoryModel(this);
     }
     else if (Tb_ProfitLostType.IsSelected)
     {
         ProfitLossSearchControl.ResetSearchControl();
         plt = new ProfitLossModel(this);
     }
     else if (Tb_SpecialAccountType.IsSelected)
     {
         SpecialAccountTypeSearchControl.ResetSearchControl();
         sat = new SpecialAccountTypeModel(this);
     }
 }
Ejemplo n.º 2
0
        private void TbPage_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (!(e.Source is TabControl))
            {
                return;
            }

            if (tb_AccountType.IsSelected)
            {
                if (at == null)
                {
                    at = new AccountTypeModel(this);
                }
            }
            else if (tb_AccountSubType.IsSelected)
            {
                if (ast == null)
                {
                    ast = new AccountSubTypeModel(this);
                }
            }
            else if (tb_AccountSubTypeCategory.IsSelected)
            {
                if (astc == null)
                {
                    astc = new AccountSubTypeCategoryModel(this);
                }
            }
            else if (Tb_ProfitLostType.IsSelected)
            {
                if (plt == null)
                {
                    plt = new ProfitLossModel(this);
                }
            }
            else if (Tb_SpecialAccountType.IsSelected)
            {
                if (sat == null)
                {
                    sat = new SpecialAccountTypeModel(this);
                }
            }
        }