示例#1
0
        private void barButtonItem24_ItemClick(object sender, ItemClickEventArgs e)
        {
            var number = new frmSubmitText("Learner Number", "Please enter learner number");
            number.ShowDialog();
            while (Database.Count("learner_details", "LearnerNumber = '" + number.Selection + "' AND Division = '" +
                GlobalProperties.loggedOnUserDivison + "'") == 0)
            {
                if (number.Selection == "***")
                    return;
                MessageBox.Show("Invalid Learner Number", "Error");
                number.ShowDialog();
            }
            string reactivate =
                MessageBox.Show("Would you like to request a re-activation?", "Re-Activation Request",
                                MessageBoxButtons.YesNo) == System.Windows.Forms.DialogResult.Yes
                    ? "Yes"
                    : "No";
            var Data = Database.Row("learner_details", "LearnerNumber = '" + number.Selection + "' AND Division = '" +
                                                       GlobalProperties.loggedOnUserDivison + "'");
            var report = new rptPaidInFull();
            report.DataDefinition.FormulaFields["college"].Text = "\"" + GlobalProperties.LoggedOnUserDivision + "\"";
            report.DataDefinition.FormulaFields["clerk"].Text = "\"" + GlobalProperties.loggedOnUser + "\"";
            report.DataDefinition.FormulaFields["Name"].Text = "\"" + Data["Name"] + " " + Data["Surname"] + "\"";
            report.DataDefinition.FormulaFields["learnerNumber"].Text = "\"" + number.Selection + "\"";
            report.DataDefinition.FormulaFields["activate"].Text = "\"" + reactivate + "\"";

            var frmReport = new frmReport(report) { Text = "Handover Paid in Full" };
            frmReport.ShowDialog();
        }
示例#2
0
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
 {
     rptPaidInFull rpt = new rptPaidInFull();
     rpt.Site = this.Site;
     return rpt;
 }