/// <summary> /// Llena el combo de Reps /// </summary> /// <history> /// [emoguel] created 11/03/2016 /// [emoguel] modified 30/05/2016 Se volvió async el metodo /// </history> protected async void LoadReps() { try { List <Rep> lstReps = await BRReps.GetReps(new Rep(), 1); cmbagrp.ItemsSource = lstReps; } catch (Exception ex) { UIHelper.ShowMessage(ex); } }
/// <summary> /// Llena el grid de Reps /// </summary> /// <param name="rep">Objeto a seleccionar</param> /// <history> /// [emoguel] created 18/04/2016 /// </history> private async void LoadReps(Rep rep = null) { try { status.Visibility = Visibility.Visible; int nIndex = 0; List <Rep> lstReps = await BRReps.GetReps(_repFilter, _nStatus); dgrReps.ItemsSource = lstReps; if (lstReps.Count > 0 && rep != null) { rep = lstReps.Where(rp => rp.rpID == rep.rpID).FirstOrDefault(); nIndex = lstReps.IndexOf(rep); } GridHelper.SelectRow(dgrReps, nIndex); StatusBarReg.Content = lstReps.Count + " Reps."; status.Visibility = Visibility.Collapsed; } catch (Exception ex) { UIHelper.ShowMessage(ex); } }