public async Task LoadDetail(int invoiceid, string lineItemId) { try { if (ApplicationView.Value == ApplicationViewState.Snapped) { ApplicationView.TryUnsnap(); } IsBusy = true; IsChildBusy = true; var serializableData = new { InvoiceId = invoiceid, LineItemId = lineItemId }; this.LineItemDetails = await ServiceInvoker.Instance.InvokeServiceUsingGet <LineItemDetail>(ServiceInvoker.Instance.AppendUrl(string.Format(ServiceInvoker.GetLineItemSummary, invoiceid, lineItemId))); SetSummaryListsFromInvoiceDetail(this.LineItemDetails, this.Invoice); var a = this.LineItemDetails.LineItemId; IsChildBusy = false; IsBusy = false; Messenger.Default.Send <ReturnToPage>(new ReturnToPage() { PageItem = NavigationFactory.GetNavigationItem(Destination.InvoiceLineItemsView), Invoice = this.Invoice, LineItemId = this.LineItemDetails.LineItemId }); } catch (T360Exception ex) { string message = getMessages(ex); ShowErrorMessage(message, Constants.InvoiceLineItemDetailFailed); if (T360ErrorCodes.NotInReviewerQueue.Equals(ex.ErrorCodes[0].Code)) { Navigator.Navigate(Destination.InvoiceListView); } } }
public InvoiceLineItemsViewModel() { Messenger.Default.Register <InvoiceWithDetailParameter>(this, (s) => { LoadDetail(s.InvoiceId, s.InvoiceSummaryDetailId.ToString()); }); GoBackToInvoiceCommand = new RelayCommand(e => CallGoBackToInvoice()); Messenger.Default.Send <ReturnToPage>(new ReturnToPage() { PageItem = NavigationFactory.GetNavigationItem(Destination.InvoiceLineItemsView) }); }
public InvoiceListViewModel() { if (InvoiceDetail != null) { SetSummary(InvoiceDetail.InvoiceId); } Messenger.Default.Send <ReturnToPage>(new ReturnToPage() { PageItem = NavigationFactory.GetNavigationItem(Destination.InvoiceListView) }); GoBackToDashboardCommand = new RelayCommand(e => CallGoBackToDashboard()); }
public ShellView() { this.InitializeComponent(); this.ChildPopup = new Popup(); var shellNavigationItem = NavigationFactory.GetNavigationItem(Destination.ShellView); this.DataContext = Container.ResolveViewModel(shellNavigationItem.ViewModelType); var resolution = Window.Current.Bounds; SunGlasses.Height = resolution.Height; SunGlasses.Width = resolution.Width; UseSunGlasses(false); SettingsPane.GetForCurrentView().CommandsRequested += onCommandsRequested; TileXML = TileUpdateManager.GetTemplateContent(TileTemplate); Window.Current.CoreWindow.KeyDown += KeyDowns; }