private IEnumerator<IResult> GetCharges() { if (UILib.IsDesignMode()) yield break; GetChargeItemsRequest getChargesRequest = new GetChargeItemsRequest(false); yield return getChargesRequest; if (getChargesRequest.Error != null) { yield return new HandleExceptionResult(getChargesRequest.Error); yield break; } Instance.Charges = getChargesRequest.Result.Clone(); }
public IEnumerable<IResult> LoadViewCharges() { if (this.HasLoadedCharges) yield break; GetChargeItemsRequest getChargesRequest = new GetChargeItemsRequest(true); yield return getChargesRequest; if (getChargesRequest.Error != null) { yield return new HandleExceptionResult(getChargesRequest.Error); } this.Charges = getChargesRequest.Result; ChargesView.ChargeGrid.Enable(defaultFocusDelegate); ChargesView.ChargeData.Disable(); NotifyOfPropertyChange(() => AssistantChargeMode); this.HasLoadedCharges = true; }