예제 #1
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            try {
                string content = "";

                clsGloFun.LogWrite("#SUMMARY PAGE", "INFO");
                clsGloVar.str_Page_Name = "SUMMARY_WINDOW";

                clsGloVar.str_SummaryAnswer = "";
                content = "Transaction: " + clsGloVar.str_TrasactionType + "\n";
                content = content + "Account Type: " + clsGloVar.str_AccountType + "\n";

                //IF TRANSACTION TYPE IS BMP - "BILLS PAYMENT" Add the Biller's Account number Field
                if (clsGloVar.str_TrasactionType == "BPM")
                {
                    content = content + "Biller's Account No.: " + clsGloVar.str_BillerAccountNumber + "\n";
                    content = content + "Subscriber's Account No.: " + clsGloVar.str_AccountNumber + "\n\n";
                }
                else
                {
                    content = content + "Account No.: " + clsGloVar.str_AccountNumber + "\n\n";
                }


                //IDENTIFY THE TRANSACTION TYPE MODE TO KNOW WHICH LIST TO DISPLAY
                switch (clsGloVar.str_TransTypeMode)
                {
                case "CIM":
                    content = content + MainWindow.GetMDSNoteListSummary();
                    content = content + "\nTotal Amount: " + clsGloFun.CurrencyFormat(clsGloVar.str_TotalCashAmount, true);
                    break;

                case "IPM":
                    content = content + MainWindow.GetMDSChequeListSummary();
                    content = content + "\nTotal Amount: " + clsGloFun.CurrencyFormat(clsGloVar.str_TotalChequeAmount, true);
                    break;

                case "MIX":
                    //Do nothing
                    break;

                default:
                    //Go to Out of Service Page
                    break;
                }

                StringBuilder sb = new StringBuilder();
                sb.AppendLine(content);

                RichTextBox1.SelectAll();
                RichTextBox1.Selection.Text = sb.ToString();


                //For Timer to work
                lblTimer.Content         = timelimit.ToString();
                dispatcherTimer.Tick    += dispatcherTimer_Tick;
                dispatcherTimer.Interval = new TimeSpan(0, 0, 1);
                dispatcherTimer.Start();
            } catch (Exception ex) {
                //Go to Out of Service Page
            }
        }