Пример #1
0
        private void getBranchCompleted(object sender, GetByTopBranchCompletedEventArgs e)
        {
            try
            {
                if (e.Result != null && e.Result.Count > 0)
                {
                    this.BranchData = e.Result;
                }
                else
                {
                    this.BranchData = new ObservableCollection <CM_BRANCH>();
                }

                this.OnPropertyChanged("BranchData");
                this.CurrentItem.FATHER_ID = this.preParentId;
                this.OnPropertyChanged("CurrentItem");
            }
            catch (Exception)
            {
                this.messagePop.SetSingleError(CommonResource.errorCannotConnectServer);
            }
        }
Пример #2
0
 private void searchCompleted(object sender, GetByTopBranchCompletedEventArgs e)
 {
     try
     {
         if (e.Result != null && e.Result.Count > 0)
         {
             this.currentData = e.Result;
         }
         else
         {
             this.currentData = new ObservableCollection <CM_BRANCH>();
         }
         this.Refresh();
     }
     catch (Exception)
     {
         this.messagePop.SetSingleError(CommonResource.errorCannotConnectServer);
     }
     finally
     {
         MyHelper.IsFree();
     }
 }