Ejemplo n.º 1
0
 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();
 }
Ejemplo n.º 2
0
        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;
        }