private void tbcDynamicWork_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (this.CanLoadData)
     {
         if (this.tbcDynamicWork.SelectedIndex != -1)
         {
             TabItem ti = this.tbcDynamicWork.SelectedItem as TabItem;
             if (ti != null)
             {
                 if (ti.Content != null)
                 {
                     OAAllCurrentWork oAAllCurrentWork = ti.Content as OAAllCurrentWork;
                     if (oAAllCurrentWork != null)
                     {
                         AllBaseDynamicWorkObjViewModel vm = oAAllCurrentWork.AllBaseDynamicWorkObjViewModel;
                         if (vm != null)
                         {
                             if (!vm.GetMoreDataCalled)
                             {
                                 vm.GetMoreData();
                             }
                         }
                     }
                 }
             }
         }
     }
 }
 public AllBaseDynamicWorkObjViewModel(DynamicWorkModuleType moduleType, Staff staff, OAAllCurrentWork oAAllCurrentWork)
 {
     this.moduleType = moduleType;
     this.baseDynamicWorkObjViewModels = new ObservableCollection <BaseDynamicWorkObjViewModel>();
     this.currentPage = 1;
     this.InitService();
     if (staff == null)
     {
         throw new System.ArgumentNullException("staff");
     }
     if (oAAllCurrentWork == null)
     {
         throw new System.ArgumentNullException("oAAllCurrentWork");
     }
     this.oAAllCurrentWork = oAAllCurrentWork;
     this.staff            = staff;
     this.dataService      = ServiceUtil.Instance.DataService;
     this.connection.EventHandler.DynamicWorkDataGettedEvent += new DynamicWorkDataGettedHandler(this.OnDynamicWorkDataGetted);
     this.Group();
 }