private void ConfigureDisplay()
        {
            if (!string.IsNullOrEmpty(Request.QueryString["pfID"]))
            {
                PreInvoiceID = int.Parse(Request.QueryString["pfID"]);
            }

            if (PreInvoiceID > 0)
            {
                Facade.IPalletForceImportPreInvoice facPFiii = new Facade.PreInvoice();
                Facade.IPreInvoice facPreInvoice             = new Facade.PreInvoice();

                Entities.PalletForceImportedInvoice pfImportedInvoice = facPFiii.GetImportedInvoiceForPreInvoiceID(PreInvoiceID);
                Entities.PreInvoice preInvoice = facPreInvoice.GetPreInvoice(PreInvoiceID);

                preInvoiceDate = pfImportedInvoice.InvoiceDate;
                preInvoiceNo   = pfImportedInvoice.InvoiceNo;
                preInvoiceType = pfImportedInvoice.InvoiceType;

                lblSystemItemTotal.Text = preInvoice.NetAmount.ToString("C", ci);

                UploadedFileExtension = Path.GetExtension(pfImportedInvoice.Filename);
                UploadedFileName      = Path.GetFileName(pfImportedInvoice.Filename);
                UploadedFilePath      = pfImportedInvoice.Filename;

                UploadedFileDetails.Style["display"] = "";
                UploadInvoiceFile.Style["display"]   = "none";
            }

            DisplayFileDetails();

            RebindGrid();
            UserID = ((Entities.CustomPrincipal)Page.User).UserName;

            // Define button visibilty.
            // If the pre-invoice has been created allow removal.
            btnRemove.Visible = btnRemove1.Visible = PreInvoiceID > 0;
            // If the pre-invoice has been created and all items are matched, allow creation.
            btnApprove.Visible = btnApprove1.Visible = PreInvoiceID > 0 && UnMatchedItems == 0;
        }