/// <summary> /// Llena el grid de Payment Places /// </summary> /// <param name="paymentPlace">Objeto a seleccionar</param> /// <history> /// [emoguel] created 06/04/2016 /// [erosado] 19/05/2016 Modified. Se agregó asincronía /// </history> private async void LoadPaymentPlaces(PaymentPlace paymentPlace = null) { try { status.Visibility = Visibility.Visible; int nIndex = 0; List <PaymentPlace> lstPaymentPlace = await BRPaymentPlaces.GetPaymentPlaces(_nStatus, _paymentPlaceFilter); dgrPaymentPlace.ItemsSource = lstPaymentPlace; if (lstPaymentPlace.Count > 0 && paymentPlace != null) { paymentPlace = lstPaymentPlace.Where(pc => pc.pcID == paymentPlace.pcID).FirstOrDefault(); nIndex = lstPaymentPlace.IndexOf(paymentPlace); } GridHelper.SelectRow(dgrPaymentPlace, nIndex); StatusBarReg.Content = lstPaymentPlace.Count + " Payment Places."; status.Visibility = Visibility.Collapsed; } catch (Exception ex) { UIHelper.ShowMessage(ex); } }
private async Task LoadPaymentPlaces() { var result = await BRPaymentPlaces.GetPaymentPlaces(); PaymentPlaces = result; }