示例#1
0
        private void getGroupDepCompleted(object sender, SearchCM_DEPT_GROUPCompletedEventArgs e)
        {
            try
            {
                ObservableCollection <CM_DEPT_GROUP_SearchResult> tempGroup;
                if (e.Result != null && e.Result.Count > 0)
                {
                    tempGroup = e.Result;
                }
                else
                {
                    tempGroup = new ObservableCollection <CM_DEPT_GROUP_SearchResult>();
                }

                tempGroup.Add(new CM_DEPT_GROUP_SearchResult()
                {
                    GROUP_ID = "", GROUP_NAME = CommonResource.lblAll
                });
                this.GroupData = tempGroup;
                this.OnPropertyChanged("GroupData");
            }
            catch (Exception)
            {
                this.messagePop.SetSingleError(CommonResource.errorCannotConnectServer);
            }
            finally
            {
                MyHelper.IsFree();
            }
        }
        private void searchComplete(object sender, SearchCM_DEPT_GROUPCompletedEventArgs e)
        {
            try
            {
                if (e.Result != null && e.Result.Count > 0)
                {
                    this.currentData = e.Result;
                }
                else
                {
                    this.currentData = new ObservableCollection <CM_DEPT_GROUP_SearchResult>();
                }

                this.DataRefresh();
            }
            catch (Exception)
            {
                this.messagePop.SetSingleError(CommonResource.errorCannotConnectServer);
            }
            finally
            {
                MyHelper.IsFree();
            }
        }
        private void getGroupDepCompleted(object sender, SearchCM_DEPT_GROUPCompletedEventArgs e)
        {
            try
            {
                ObservableCollection<CM_DEPT_GROUP_SearchResult> tempGroup;
                if (e.Result != null && e.Result.Count > 0)
                    tempGroup = e.Result;
                else
                    tempGroup = new ObservableCollection<CM_DEPT_GROUP_SearchResult>();

                tempGroup.Add(new CM_DEPT_GROUP_SearchResult() { GROUP_ID = "", GROUP_NAME = CommonResource.lblAll });
                this.GroupData = tempGroup;
                this.OnPropertyChanged("GroupData");
            }
            catch (Exception)
            {
                this.messagePop.SetSingleError(CommonResource.errorCannotConnectServer);
            }
            finally
            {
                MyHelper.IsFree();
            }
        }