/// <summary> /// Does the select item. /// </summary> /// <param name="item">The item.</param> /// <returns></returns> private async Task DoSelectItem(SentItemViewModel item) { await Task.Run(() => { ShowViewModel <SentItemViewModel>(item); }); }
/// <summary> /// Gets the sent applications. /// </summary> /// <returns></returns> public async Task GetSentApplications() { _isProductLoaded = false; CheckLoadingStatus(); try { var applications = await Mvx.Resolve <IMobileDataService>().GetSentApplications(); if (applications == null) { return; } SentApplicationCollection.Clear(); var head = new SentItemViewModel() { IsHeading = true, FirstName = "Brown", LastName = "Njemza" }; SentApplicationCollection.Add(head); foreach (var application in applications) { var item = new SentItemViewModel() { IsHeading = false, Id = application.Id, FirstName = application.FirstName, LastName = application.LastName }; SentApplicationCollection.Add(item); } RaisePropertyChanged(() => SentApplicationCollection); HasFetched = true; } finally { _isProductLoaded = true; CheckLoadingStatus(); } }
/// <summary> /// Initializes the specified item. /// </summary> /// <param name="item">The item.</param> public void Init(SentItemViewModel item) { Id = item.Id; }