Пример #1
0
 private IEnumerator<IResult> GetComplaints()
 {
     if (UILib.IsDesignMode())
         yield break;
     GetComplaintsRequest getComplaintTypesRequest = new GetComplaintsRequest(false);
     yield return getComplaintTypesRequest;
     if (getComplaintTypesRequest.Error != null) {
         yield return new HandleExceptionResult(getComplaintTypesRequest.Error);
         yield break;
     }
     Instance.Complaints = getComplaintTypesRequest.Result.Clone();
 }
Пример #2
0
        public IEnumerable<IResult> LoadViewComplaints()
        {
            if (this.HasLoadedComplaints)
                yield break;

            GetComplaintsRequest getComplaintsRequest = new GetComplaintsRequest(true);
            yield return getComplaintsRequest;
            if (getComplaintsRequest.Error != null) {
                yield return new HandleExceptionResult(getComplaintsRequest.Error);
            }
            this.Complaints = getComplaintsRequest.Result;
            ComplaintsView.ComplaintGrid.Enable(defaultFocusDelegate);
            ComplaintsView.ComplaintData.Disable();
            NotifyOfPropertyChange(() => AssistantComplaintMode);
            this.HasLoadedComplaints = true;
        }