protected override void OnNavigatedFrom(NavigationEventArgs e)
        {
            RejectPage rejectNote = e.Content as RejectPage;

            if (rejectNote != null)
            {
                rejectNote.Reasons = RejectInput;
                NavigationService.RemoveBackEntry();
            }
            AdjustLineItem adjustLineItem = e.Content as AdjustLineItem;

            if (adjustLineItem != null)
            {
                adjustLineItem.Reasons = AdjustInput;
                NavigationService.RemoveBackEntry();
            }
            base.OnNavigatedFrom(e);
        }
Beispiel #2
0
        protected override void OnNavigatedFrom(NavigationEventArgs e)
        {
            if (Constants.ExternalURI.Equals(e.Uri.ToString()))
            {
                this.PreviousSource = this.Source;
                this.Source         = Source.EXTERNAL;
                return;
            }
            InvoiceCommonDetails commonDetails = e.Content as InvoiceCommonDetails;

            if (commonDetails != null)
            {
                commonDetails.Source            = Source.BACK_TO_LINE_ITEM_LIST;
                commonDetails.MultiConfirmation = new LineItemConfirmationDetails()
                {
                    InvoiceDetails = HeaderDetails
                };
            }
            RejectPage rejectPage = e.Content as RejectPage;

            if (rejectPage != null)
            {
                rejectPage.Source  = Source.LINE_ITEM_SINGLE_REJECT;
                rejectPage.Reasons = RejectInput;
                List <string> lineItems = new List <string>();
                lineItems.Add(CurrentLineItem.LineItemId);
                rejectPage.LineItemRejectDetails = new LineItemConfirmationDetails()
                {
                    InvoiceDetails      = HeaderDetails,
                    SelectedLineItemIds = lineItems,
                    NetAmount           = LineItemSummaryDetails.NetTotal
                };
            }
            AdjustPage adjustPage = e.Content as AdjustPage;

            if (adjustPage != null)
            {
                adjustPage.Source  = Source.LINE_ITEM_SINGLE_ADJUST;
                adjustPage.Reasons = AdjustInput;
                List <string> lineItems = new List <string>();
                lineItems.Add(CurrentLineItem.LineItemId);
                adjustPage.LineItemAdjustDetails = new LineItemConfirmationDetails()
                {
                    InvoiceDetails      = HeaderDetails,
                    SelectedLineItemIds = lineItems,
                    CurrencySymbol      = LineItemSummaryDetails.CurrencySymbol,
                    PositiveAdjustment  = LineItemSummaryDetails.Permissions.PositiveAdjustment,
                    NetAmount           = LineItemSummaryDetails.NetTotal
                };
            }
            NotesPage notesPage = e.Content as NotesPage;

            if (notesPage != null)
            {
                notesPage.Input = LineItemSummaryDetails.NotesList;
            }
            ViewNotePage viewNote = e.Content as ViewNotePage;

            if (viewNote != null)
            {
                viewNote.Note = ViewNoteInput;
            }
            base.OnNavigatedFrom(e);
        }
Beispiel #3
0
        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);
        }