/// <summary> /// Carga el comoboBox de Posts /// </summary> /// <history> /// [emoguel] created 12/04/2016 /// </history> private async void LoadPosts() { try { List <Post> lstPosts = await BRPosts.GetPosts(); cmbpppo.ItemsSource = lstPosts; } catch (Exception ex) { UIHelper.ShowMessage(ex); } }
/// <summary> /// Carga los post /// </summary> /// <history> /// [vku] 13/Jul/2016 Created /// </history> public async void LoadPost() { try { List <Post> lstPost = await BRPosts.GetPosts(nStatus : -1); cboPost.ItemsSource = lstPost; } catch (Exception ex) { UIHelper.ShowMessage(ex); } }
/// <summary> /// Llena el grid de Posts /// </summary> /// <param name="post">Objeto a seleccionar</param> /// <history> /// [emoguel] created 11/04/2016 /// </history> private async void LoadPosts(Post post = null) { try { status.Visibility = Visibility.Visible; int nIndex = 0; List <Post> lstPost = await BRPosts.GetPosts(_nStatus, _postFilter); dgrPosts.ItemsSource = lstPost; if (lstPost.Count > 0 && post != null) { post = lstPost.Where(po => po.poID == post.poID).FirstOrDefault(); nIndex = lstPost.IndexOf(post); } GridHelper.SelectRow(dgrPosts, nIndex); StatusBarReg.Content = lstPost.Count + " Posts."; status.Visibility = Visibility.Collapsed; } catch (Exception ex) { UIHelper.ShowMessage(ex); } }