/// <summary> /// Llena el grid de reasons /// </summary> /// <history> /// [emoguel] created 05/05/2016 /// </history> private async void loadReasons() { try { List <ReasonCancellationFolio> lstReasons = await BRReasonCancellationFolios.GetReasonCancellationFolios(1); cmbReason.ItemsSource = lstReasons; } catch (Exception ex) { UIHelper.ShowMessage(ex); } }
/// <summary> /// Llena el grid de Folio Cancelation Folios /// </summary> /// <param name="reasonCancellationFollio">Objeto a seleccionar</param> /// <history> /// [emoguel] created 14/04/2016 /// </history> private async void LoadReasonCancellationFolios(ReasonCancellationFolio reasonCancellationFollio = null) { try { status.Visibility = Visibility.Visible; int nIndex = 0; List <ReasonCancellationFolio> lstReaCanFols = await BRReasonCancellationFolios.GetReasonCancellationFolios(_nStatus, _reasonCancelFolFilter); dgrReaCanFols.ItemsSource = lstReaCanFols; if (lstReaCanFols.Count > 0 && reasonCancellationFollio != null) { reasonCancellationFollio = lstReaCanFols.Where(rcf => rcf.rcfID == reasonCancellationFollio.rcfID).FirstOrDefault(); nIndex = lstReaCanFols.IndexOf(reasonCancellationFollio); } GridHelper.SelectRow(dgrReaCanFols, nIndex); StatusBarReg.Content = lstReaCanFols.Count + " Reason For Cancellation Of Folios."; status.Visibility = Visibility.Collapsed; } catch (Exception ex) { UIHelper.ShowMessage(ex); } }