/// <summary> /// llena el combo de desk /// </summary> /// <history> /// [emoguel] created 16/03/2016 /// [emoguel] modified 30/05/2016 se volvió async /// </history> private async void LoadDesks() { try { List <Desk> lstDesk = await BRDesks.GetDesks(new Desk()); cmbDesk.ItemsSource = lstDesk; skpStatus.Visibility = Visibility.Collapsed; } catch (Exception ex) { UIHelper.ShowMessage(ex); } }
/// <summary> /// Llena el grid de desks /// </summary> /// <history> /// [emoguel] created 17/03/2016 /// </history> private async void LoadDesks(Desk desk = null) { try { status.Visibility = Visibility.Visible; int nIndex = 0; List <Desk> lstDesks = await BRDesks.GetDesks(_deskFilter, _nStatus); dgrDesks.ItemsSource = lstDesks; if (desk != null && lstDesks.Count > 0) { desk = lstDesks.Where(dk => dk.dkID == desk.dkID).FirstOrDefault(); nIndex = lstDesks.IndexOf(desk); } GridHelper.SelectRow(dgrDesks, nIndex); StatusBarReg.Content = lstDesks.Count + " Desks."; status.Visibility = Visibility.Collapsed; } catch (Exception ex) { UIHelper.ShowMessage(ex); } }