protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            ReceiptInformation info = (ReceiptInformation)e.Parameter;

            thisVisit    = info.visit;
            medList      = info.medList;
            servicesList = info.serviceList;
            totalPayment = info.totalPayment;

            LblPatientID.Text  = thisVisit.patientId;
            LblName.Text       = getPatientName(thisVisit.patientId);
            LblType.Text       = thisVisit.type;
            LblInvoiceNo.Text  = thisVisit.id;
            LblDate.Text       = thisVisit.date;
            LblTotalValue.Text = "Rs" + totalPayment;



            // Register for PrintTaskRequested event
            printMan = PrintManager.GetForCurrentView();
            printMan.PrintTaskRequested += PrintTaskRequested;

            // Build a PrintDocument and register for callbacks
            printDoc                 = new PrintDocument();
            printDocSource           = printDoc.DocumentSource;
            printDoc.Paginate       += Paginate;
            printDoc.GetPreviewPage += GetPreviewPage;
            printDoc.AddPages       += AddPages;
        }
Esempio n. 2
0
        private async void BtnDialogOK2_Click(object sender, RoutedEventArgs e)
        {
            string incomeId = saveIncome();

            thisVisit = createPatientVisit(thisAppointment, incomeId);

            addPatientVisit(thisVisit);
            addPatientMedication(thisVisit.id);
            addPatientServices(thisVisit.id);

            updateStock();

            await createFolders();
            await addPatientDocuments();
            await addPatientPhotos();

            if (thisAssessment != null)
            {
                insertVisitAssessment(thisVisit);
            }

            double totalPayment = getTotalPayment();

            ReceiptInformation info = new ReceiptInformation(thisVisit, patientMedList, patientServiceList, totalPayment);

            Frame.Navigate(typeof(Receipt), info);
        }
        private void BtViewReceipt_Click(object sender, RoutedEventArgs e)
        {
            ReceiptInformation info = new ReceiptInformation(thisVisit, medList, servList, getTotalPayment());

            Frame.Navigate(typeof(Receipt), info);
        }