コード例 #1
0
ファイル: frmMainRibbon.cs プロジェクト: robertfall/LAD
        private void barButtonItem26_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();
            }
            var reason = new frmSubmitText("Reason", "Please enter reason forwithdrawel");
            reason.ShowDialog();
            if (reason.Selection == "***")
                return;
            var Data = Database.Row("learner_details", "LearnerNumber = '" + number.Selection + "' AND Division = '" +
                                                       GlobalProperties.loggedOnUserDivison + "'");
            var report = new rptWithdrawn();
            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["Reason"].Text = "\"" + reason.Selection + "\"";

            var frmReport = new frmReport(report) { Text = "Withdrawel Request" };
            frmReport.ShowDialog();
        }
コード例 #2
0
ファイル: rptWithdrawn.cs プロジェクト: robertfall/LAD
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
 {
     rptWithdrawn rpt = new rptWithdrawn();
     rpt.Site = this.Site;
     return rpt;
 }