private void btnPrint_Click(object sender, EventArgs e)
        {
            using (frmChooseForm chooseForm = new frmChooseForm())
            {
                if (chooseForm.ShowDialog() == DialogResult.OK)
                {
                    frmReportViewer assessmentReport;

                    if (chooseForm.SelectedAssessmentForm == AssessmentForm.BasicEducation)
                    {
                        assessmentReport = new frmReportViewer("Assessment Report", new rptAssessment()
                                                               , new KeyValuePair <string, object>("Assessment No", transaction.DocumentNumber)
                                                               , new KeyValuePair <string, object>("SOP Type", (int)transaction.TransactionType));

                        assessmentReport.Show();
                    }
                    else if (chooseForm.SelectedAssessmentForm == AssessmentForm.College)
                    {
                        assessmentReport = new frmReportViewer("Assessment Report", new rptCollegeAssessment()
                                                               , new KeyValuePair <string, object>("Assessment No", transaction.DocumentNumber)
                                                               , new KeyValuePair <string, object>("SOP Type", (int)transaction.TransactionType));

                        assessmentReport.Show();
                    }
                }
            }
        }
Esempio n. 2
0
        private void btnPrint_Click(object sender, EventArgs e)
        {
            using (frmChooseForm chooseForm = new frmChooseForm())
            {
                if (chooseForm.ShowDialog() == DialogResult.OK)
                {
                    frmReportViewer assessmentReport;

                    if (chooseForm.SelectedAssessmentForm == AssessmentForm.BasicEducation)
                    {
                        assessmentReport = new frmReportViewer("Assessment Report", new rptAssessment()
                        , new KeyValuePair<string, object>("Assessment No", transaction.DocumentNumber)
                        , new KeyValuePair<string, object>("SOP Type", (int)transaction.TransactionType));

                        assessmentReport.Show();
                    }
                    else if (chooseForm.SelectedAssessmentForm == AssessmentForm.College)
                    {
                        assessmentReport = new frmReportViewer("Assessment Report", new rptCollegeAssessment()
                        , new KeyValuePair<string, object>("Assessment No", transaction.DocumentNumber)
                        , new KeyValuePair<string, object>("SOP Type", (int)transaction.TransactionType));

                        assessmentReport.Show();
                    }

                }
            }
        }
Esempio n. 3
0
        private void btnPrint_Click(object sender, EventArgs e)
        {
            //check detail windows
            if (!WindowOpen(discountDetails) && !WindowOpen(paymentDetails))
            {
                if (Required())
                {
                    try
                    {
                        transaction.DocumentNumber = txtAssessmentNo.Text;
                        if (transaction.TransactionType == Transaction_Type.Assessment)
                        {
                            transaction.ExpirationDate = transaction.DocumentDate.AddDays(Convert.ToInt32(config["Quote_Expiration"]));
                        }
                        transaction.StudentID    = txtStudentID.Text;
                        transaction.StudentName  = txtName.Text;
                        transaction.BatchID      = txtBatchID.Text;
                        transaction.DocumentDate = dtpDocumentDate.Value;
                        transaction.CurrencyID   = txtCurrencyID.Text;
                        transaction.Comments     = txtRemarks.Text;

                        //Added code 5/4/12
                        transaction.InstallmentFee = Convert.ToDecimal(txtInstallmentFee.Text);

                        //Added Code 5/7/12
                        transaction.RecalculatePaymentSchedules();
                        //transaction.totalMiscellaneousFees = Convert.ToDecimal(txtInstallmentFee.Text) + Convert.ToDecimal(txtMiscellaneousFees.Text);

                        TransactionAdapter.Instance.SaveTransaction(transaction
                                                                    , documentID
                                                                    , config["Default_Site_ID"].ToString());

                        //addedd 20101006 - clear first before printing the report
                        clearHeader();
                        clearItems();
                        clearTotals();

                        using (frmChooseForm chooseForm = new frmChooseForm())
                        {
                            if (chooseForm.ShowDialog() == DialogResult.OK)
                            {
                                //TODO: add code to choose report to show

                                frmReportViewer assessmentReport;

                                if (chooseForm.SelectedAssessmentForm == AssessmentForm.BasicEducation)
                                {
                                    assessmentReport = new frmReportViewer("Assessment Report", new rptAssessment()
                                                                           , new KeyValuePair <string, object>("Assessment No", transaction.DocumentNumber)
                                                                           , new KeyValuePair <string, object>("SOP Type", (int)transaction.TransactionType));

                                    assessmentReport.Show();
                                }
                                else if (chooseForm.SelectedAssessmentForm == AssessmentForm.College)
                                {
                                    assessmentReport = new frmReportViewer("Assessment Report", new rptCollegeAssessment()
                                                                           , new KeyValuePair <string, object>("Assessment No", transaction.DocumentNumber)
                                                                           , new KeyValuePair <string, object>("SOP Type", (int)transaction.TransactionType));

                                    assessmentReport.Show();
                                }
                            }
                        }

                        //show assessment report
                        //frmReportViewer assessmentReport = new frmReportViewer();//transaction.DocumentNumber, (int)transaction.TransactionType);

                        transaction = null;
                    }
                    catch (Exception ex)
                    {
                        log.Error(ex);
                        Prompt.ShowError(ex.Message);
                    }
                }
            }
        }
Esempio n. 4
0
        private void btnPrint_Click(object sender, EventArgs e)
        {
            //check detail windows
            if (!WindowOpen(discountDetails) && !WindowOpen(paymentDetails))
            {
                if (Required())
                {
                    try
                    {
                        transaction.DocumentNumber = txtAssessmentNo.Text;
                        if (transaction.TransactionType == Transaction_Type.Assessment)
                        {
                            transaction.ExpirationDate = transaction.DocumentDate.AddDays(Convert.ToInt32(config["Quote_Expiration"]));
                        }
                        transaction.StudentID = txtStudentID.Text;
                        transaction.StudentName = txtName.Text;
                        transaction.BatchID = txtBatchID.Text;
                        transaction.DocumentDate = dtpDocumentDate.Value;
                        transaction.CurrencyID = txtCurrencyID.Text;
                        transaction.Comments = txtRemarks.Text;

                        //Added code 5/4/12
                        transaction.InstallmentFee = Convert.ToDecimal(txtInstallmentFee.Text);

                        //Added Code 5/7/12
                        transaction.RecalculatePaymentSchedules();
                        //transaction.totalMiscellaneousFees = Convert.ToDecimal(txtInstallmentFee.Text) + Convert.ToDecimal(txtMiscellaneousFees.Text);

                        TransactionAdapter.Instance.SaveTransaction(transaction
                            , documentID
                            , config["Default_Site_ID"].ToString());

                        //addedd 20101006 - clear first before printing the report
                        clearHeader();
                        clearItems();
                        clearTotals();

                        using (frmChooseForm chooseForm = new frmChooseForm())
                        {
                            if (chooseForm.ShowDialog() == DialogResult.OK)
                            {
                                //TODO: add code to choose report to show

                                frmReportViewer assessmentReport;

                                if (chooseForm.SelectedAssessmentForm == AssessmentForm.BasicEducation)
                                {
                                    assessmentReport = new frmReportViewer("Assessment Report", new rptAssessment()
                                    , new KeyValuePair<string, object>("Assessment No", transaction.DocumentNumber)
                                    , new KeyValuePair<string, object>("SOP Type", (int)transaction.TransactionType));

                                    assessmentReport.Show();
                                }
                                else if(chooseForm.SelectedAssessmentForm == AssessmentForm.College)
                                {
                                    assessmentReport = new frmReportViewer("Assessment Report", new rptCollegeAssessment()
                                    , new KeyValuePair<string, object>("Assessment No", transaction.DocumentNumber)
                                    , new KeyValuePair<string, object>("SOP Type", (int)transaction.TransactionType));

                                    assessmentReport.Show();
                                }
                            }
                        }

                        //show assessment report
                        //frmReportViewer assessmentReport = new frmReportViewer();//transaction.DocumentNumber, (int)transaction.TransactionType);

                        transaction = null;
                    }
                    catch (Exception ex)
                    {
                        log.Error(ex);
                        Prompt.ShowError(ex.Message);
                    }
                }
            }
        }