protected override void OnNavigatedFrom(NavigationEventArgs e) { if (Constants.ExternalURI.Equals(e.Uri.ToString())) { this.PreviousSource = this.Source; this.Source = Source.EXTERNAL; return; } if (userdata.IsMultipleInvoiceReject) { userdata.IsMultipleInvoiceReject = false; } InvoiceApproveError approveError = e.Content as InvoiceApproveError; if (approveError != null) { approveError.Source = Source; approveError.InvoiceDetails = InvoiceErrorDetails; approveError.InvoiceInputDetails = InvoiceDetails; approveError.LineItemInputDetails = LineItemRejectDetails; NavigationService.RemoveBackEntry(); } InvoiceCommonDetails commonDetailsPage = e.Content as InvoiceCommonDetails; if (commonDetailsPage != null) { if (Source == Model.Base.Source.INVOICE_SINGLE_REJECT) { commonDetailsPage.Source = Model.Base.Source.BACK_TO_INVOICE_SUMMARY; commonDetailsPage.InvoiceSummaryDetails = InvoiceDetails; } else if (Source == Model.Base.Source.LINE_ITEM_MULTI_REJECT_CONFIRMATION) { commonDetailsPage.Source = Model.Base.Source.BACK_TO_LINE_ITEM_LIST; commonDetailsPage.MultiConfirmation = LineItemRejectDetails; } } LineItemSummary lineItemSummary = e.Content as LineItemSummary; if (lineItemSummary != null) { lineItemSummary.Source = Source.BACK_TO_LINE_ITEM_SUMMARY; lineItemSummary.SelectedLineItemId = LineItemRejectDetails.SelectedLineItemIds[0]; } base.OnNavigatedFrom(e); }
protected override void OnNavigatedFrom(NavigationEventArgs e) { if (Constants.ExternalURI.Equals(e.Uri.ToString())) { this.PreviousSource = this.Source; this.Source = Source.EXTERNAL; return; } RejectPage rejectPage = e.Content as RejectPage; if (Source == Model.Base.Source.INVOICE_MULTI_APPROVE) { InvoiceApproveError approveError = e.Content as InvoiceApproveError; if (approveError != null) { approveError.InvoiceDetails = InvoiceErrorDetails; NavigationService.RemoveBackEntry(); } } else if (Source == Model.Base.Source.INVOICE_MULTI_REJECT) { if (rejectPage != null) { rejectPage.Source = Model.Base.Source.INVOICE_MULTI_REJECT_CONFIRMATION; rejectPage.InvoiceInputDetails = InvoiceInputDetails; rejectPage.Reasons = InvoiceInputDetails.Reasons; NavigationService.RemoveBackEntry(); } } else if (Source == Model.Base.Source.LINE_ITEM_MULTI_ADJUST) { AdjustPage adjustPage = e.Content as AdjustPage; if (adjustPage != null) { adjustPage.Source = Model.Base.Source.LINE_ITEM_MULTI_ADJUST_CONFIRMATION; adjustPage.LineItemAdjustDetails = LineItemInputDetails; adjustPage.Reasons = LineItemInputDetails.Reasons; NavigationService.RemoveBackEntry(); } } else if (Source == Model.Base.Source.LINE_ITEM_MULTI_REJECT) { if (rejectPage != null) { rejectPage.Source = Model.Base.Source.LINE_ITEM_MULTI_REJECT_CONFIRMATION; rejectPage.LineItemRejectDetails = LineItemInputDetails; rejectPage.Reasons = LineItemInputDetails.Reasons; } } InvoiceCommonDetails commonDetailsPage = e.Content as InvoiceCommonDetails; if (commonDetailsPage != null) { if (Source == Model.Base.Source.LINE_ITEM_MULTI_ADJUST || Source == Model.Base.Source.LINE_ITEM_MULTI_REJECT) { commonDetailsPage.Source = Model.Base.Source.BACK_TO_LINE_ITEM_LIST; commonDetailsPage.MultiConfirmation = LineItemInputDetails; } } base.OnNavigatedFrom(e); }