Ejemplo n.º 1
0
        private void TbPage_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (!(e.Source is TabControl))
            {
                return;
            }

            if (tb_Bank.IsSelected)
            {
                if (bankmodel == null)
                {
                    bankmodel = new BankModel(this);
                }
            }
            else if (tb_BankBranch.IsSelected)
            {
                if (bankbranchmodel == null)
                {
                    bankbranchmodel = new BankBranchModel(this);
                }
            }
            else if (tb_BankAccount.IsSelected)
            {
                if (bankaccountmodel == null)
                {
                    bankaccountmodel = new BankAccountModel(this);
                }
            }
        }
Ejemplo n.º 2
0
 private void BtRefresh_Click(object sender, RoutedEventArgs e)
 {
     if (tb_Bank.IsSelected)
     {
         BankSearchControl.ResetSearchControl();
         bankmodel = new BankModel(this);
     }
     else if (tb_BankBranch.IsSelected)
     {
         BankBranchSearchControl.ResetSearchControl();
         bankbranchmodel = new BankBranchModel(this);
     }
     else if (tb_BankAccount.IsSelected)
     {
         BankAccountSearchControl.ResetSearchControl();
         bankaccountmodel = new BankAccountModel(this);
     }
 }