예제 #1
0
 private void BtRefresh_Click(object sender, RoutedEventArgs e)
 {
     if (tb_CashBenefits.IsSelected)
     {
         CashBenefitSearchControl.ResetSearchControl();
         hrCashBeenfit = new HRCashBenefitModel(this);
     }
     else if (tb_NonCashBenefits.IsSelected)
     {
         NonCashBenefitSearchControl.ResetSearchControl();
         hrNonCashBeenfit = new HRNonCashBenefitModel(this);
     }
     else if (tb_EmpCashBenefits.IsSelected)
     {
         EmpCashBenefitSearchControl.ResetSearchControl();
         hrEmpCashBeenfit = new HREmpCashBenefitModel(this);
     }
     else if (Tb_EmpNonCashBenefits.IsSelected)
     {
         EmpNonCashBenefitSearchControl.ResetSearchControl();
         hrEmpNonCashBeenfit = new HREmpNonCashBenefitModel(this);
     }
 }
예제 #2
0
        private void TbPage_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (!(e.Source is TabControl))
            {
                return;
            }

            if (tb_CashBenefits.IsSelected)
            {
                if (hrCashBeenfit == null)
                {
                    hrCashBeenfit = new HRCashBenefitModel(this);
                }
            }
            else if (tb_NonCashBenefits.IsSelected)
            {
                if (hrNonCashBeenfit == null)
                {
                    hrNonCashBeenfit = new HRNonCashBenefitModel(this);
                }
            }
            else if (tb_EmpCashBenefits.IsSelected)
            {
                if (hrEmpCashBeenfit == null)
                {
                    hrEmpCashBeenfit = new HREmpCashBenefitModel(this);
                }
            }
            else if (Tb_EmpNonCashBenefits.IsSelected)
            {
                if (hrEmpNonCashBeenfit == null)
                {
                    hrEmpNonCashBeenfit = new HREmpNonCashBenefitModel(this);
                }
            }
        }