private void getDepartmentCompleted(object sender, SearchDEPARTMENTCompletedEventArgs e)
        {
            try
            {
                if (e.Result != null && e.Result.Count > 0)
                {
                    this.DepartmentData = e.Result;
                }
                else
                {
                    this.DepartmentData = new ObservableCollection <CM_DEPARTMENT_SearchResult>();
                }

                this.OnPropertyChanged("DepartmentData");
                this.OnPropertyChanged("CurrentItem");
            }
            catch (Exception)
            {
                this.messagePop.SetSingleError(CommonResource.errorCannotConnectServer);
            }
        }
Example #2
0
 private void searchCompleted(object sender, SearchDEPARTMENTCompletedEventArgs e)
 {
     try
     {
         if (e.Result != null && e.Result.Count > 0)
         {
             this.currentData = e.Result;
         }
         else
         {
             this.currentData = new ObservableCollection <CM_DEPARTMENT_SearchResult>();
         }
         this.DataRefresh();
     }
     catch (Exception)
     {
         this.messagePop.SetSingleError(CommonResource.errorCannotConnectServer);
     }
     finally
     {
         MyHelper.IsFree();
     }
 }
        private void getDepartmentCompleted(object sender, SearchDEPARTMENTCompletedEventArgs e)
        {
            try
            {
                if (e.Result != null && e.Result.Count > 0)
                    this.DepartmentData = e.Result;
                else
                    this.DepartmentData = new ObservableCollection<CM_DEPARTMENT_SearchResult>();

                this.OnPropertyChanged("DepartmentData");
                this.OnPropertyChanged("CurrentItem");                
            }
            catch (Exception)
            {
                this.messagePop.SetSingleError(CommonResource.errorCannotConnectServer);           
            }
        }
 private void searchCompleted(object sender, SearchDEPARTMENTCompletedEventArgs e)
 {
     try
     {
         if (e.Result != null && e.Result.Count > 0)
             this.currentData = e.Result;
         else
             this.currentData = new ObservableCollection<CM_DEPARTMENT_SearchResult>();
         this.DataRefresh();
     }
     catch (Exception)
     {
         this.messagePop.SetSingleError(CommonResource.errorCannotConnectServer);
     }
     finally
     {
         MyHelper.IsFree();
     }
 }