コード例 #1
0
ファイル: ReportViewer.cs プロジェクト: orette/southville
        public void loadAgeAndAddress(List<Customer> AllStudents)
        {
            AgeAndAddress rpt = new AgeAndAddress();
            DataSetStudents ds = new DataSetStudents();
            foreach (Customer c in AllStudents)
            {
                int age = DateTime.Now.Year - c.Birthday.Year;
                int month = DateTime.Now.Month - c.Birthday.Month;

                DataRow cRow = ds.Student.NewRow();
                cRow["CustomerID"] = c.CustomerID;
                cRow["FirstName"] = c.FirstName;
                cRow["LastName"] = c.LastName;
                cRow["Gender"] = c.Gender;
                //cRow["EmailAddress"] = c.EmailAddress;
                //cRow["Level"] = c.Level;
                //cRow["Section"] = c.Section;
                //cRow["Guardians"] = c.BillTo;
                cRow["Address"] = c.CustomerAddress.AddressString;
                if (month < 0)
                    cRow["Age"] = (age.ToString() + " " + getFraction(getMonthValue((month = (month * 2) + month))));
                else cRow["Age"] = (age.ToString() + " " + getFraction(getMonthValue(month)));
                ds.Student.Rows.Add(cRow);
            }
            rpt.SetDataSource(ds);
            crystalReportViewer1.ReportSource = rpt;
            crystalReportViewer1.Refresh();
        }
コード例 #2
0
        public void loadLetterOfRequest(List <Customer> selectedStudents, String schName, String schAdd, String attained, String schYear)
        {
            LetterOfRequestTOR rpt = new LetterOfRequestTOR();
            DataSetStudents    ds  = new DataSetStudents();

            foreach (Customer c in selectedStudents)
            {
                DataRow cRow = ds.Student.NewRow();
                cRow["CustomerID"]   = c.CustomerID;
                cRow["CustomerName"] = c.CustomerName;
                cRow["FirstName"]    = c.FirstName;
                cRow["LastName"]     = c.LastName;
                cRow["Gender"]       = c.Gender;
                cRow["EmailAddress"] = c.EmailAddress;
                cRow["Level"]        = c.Level;
                cRow["Section"]      = c.Section;
                ds.Student.Rows.Add(cRow);
            }
            rpt.DataDefinition.FormulaFields["schoolName"].Text    = "\"" + schName + "\"";
            rpt.DataDefinition.FormulaFields["schoolAddress"].Text = "\"" + schAdd + "\"";
            rpt.DataDefinition.FormulaFields["attainment"].Text    = "\"" + attained + "\"";
            rpt.DataDefinition.FormulaFields["schoolYear"].Text    = "\"" + schYear + "\"";
            rpt.SetDataSource(ds);
            crystalReportViewer1.ReportSource = rpt;
            crystalReportViewer1.Refresh();
        }
コード例 #3
0
ファイル: ReportViewer.cs プロジェクト: orette/southville
 public void EnrolmentStatus(List<Customer> selectedStudents)
 {
     EnrolmentReportStatus rpt = new EnrolmentReportStatus();
     DataSetStudents ds = new DataSetStudents();
     foreach (Customer c in selectedStudents)
     {
         DataRow cRow = ds.Student.NewRow();
         cRow["CustomerID"] = c.CustomerID;
         cRow["CustomerName"] = c.CustomerName;
         cRow["FirstName"] = c.FirstName;
         cRow["LastName"] = c.LastName;
         cRow["Gender"] = c.Gender;
         cRow["EmailAddress"] = c.EmailAddress;
         cRow["Level"] = c.Level;
         cRow["Section"] = c.Section;
         cRow["Guardians"] = c.BillTo;
         cRow["Address"] = c.CustomerAddress.AddressString;
         cRow["Phone1"] = c.CustomerAddress.PhoneNumber1;
         cRow["Phone2"] = c.CustomerAddress.PhoneNumber2;
         ds.Student.Rows.Add(cRow);
     }
     rpt.SetDataSource(ds);
     crystalReportViewer1.ReportSource = rpt;
     crystalReportViewer1.Refresh();
 }
コード例 #4
0
        public void loadEnrollmentReport(List <Customer> students, String enrollmentStatus, String numberOfStudents)
        {
            EnrollmentReport rpt        = new EnrollmentReport();
            DataSetStudents  ds         = new DataSetStudents();
            List <String>    maleList   = new List <string>();
            List <String>    femaleList = new List <string>();

            foreach (Customer c in students)
            {
                DataRow cRow = ds.Student.NewRow();
                cRow["CustomerID"]   = c.CustomerID;
                cRow["CustomerName"] = c.CustomerName;
                cRow["FirstName"]    = c.FirstName;
                cRow["LastName"]     = c.LastName;
                cRow["Level"]        = c.Level;
                cRow["Section"]      = c.Section;
                cRow["Gender"]       = c.Gender;
                ds.Student.Rows.Add(cRow);
                if (c.Gender.Equals("Male"))
                {
                    maleList.Add(c.Gender);
                }
                else
                {
                    femaleList.Add(c.Gender);
                }
            }
            rpt.DataDefinition.FormulaFields["EnrollmentStatus"].Text = "\"" + enrollmentStatus + "\"";
            rpt.DataDefinition.FormulaFields["NumberOfStudents"].Text = "\"" + numberOfStudents + "\"";
            rpt.SetDataSource(ds);

            crystalReportViewer1.ReportSource = rpt;
            crystalReportViewer1.Refresh();
        }
コード例 #5
0
        public void loadAgeAndAddress(List <Customer> AllStudents)
        {
            AgeAndAddress   rpt = new AgeAndAddress();
            DataSetStudents ds  = new DataSetStudents();

            foreach (Customer c in AllStudents)
            {
                int age   = DateTime.Now.Year - c.Birthday.Year;
                int month = DateTime.Now.Month - c.Birthday.Month;

                DataRow cRow = ds.Student.NewRow();
                cRow["CustomerID"] = c.CustomerID;
                cRow["FirstName"]  = c.FirstName;
                cRow["LastName"]   = c.LastName;
                cRow["Gender"]     = c.Gender;
                //cRow["EmailAddress"] = c.EmailAddress;
                //cRow["Level"] = c.Level;
                //cRow["Section"] = c.Section;
                //cRow["Guardians"] = c.BillTo;
                cRow["Address"] = c.CustomerAddress.AddressString;
                if (month < 0)
                {
                    cRow["Age"] = (age.ToString() + " " + getFraction(getMonthValue((month = (month * 2) + month))));
                }
                else
                {
                    cRow["Age"] = (age.ToString() + " " + getFraction(getMonthValue(month)));
                }
                ds.Student.Rows.Add(cRow);
            }
            rpt.SetDataSource(ds);
            crystalReportViewer1.ReportSource = rpt;
            crystalReportViewer1.Refresh();
        }
コード例 #6
0
        public void EnrolmentStatus(List <Customer> selectedStudents)
        {
            EnrolmentReportStatus rpt = new EnrolmentReportStatus();
            DataSetStudents       ds  = new DataSetStudents();

            foreach (Customer c in selectedStudents)
            {
                DataRow cRow = ds.Student.NewRow();
                cRow["CustomerID"]   = c.CustomerID;
                cRow["CustomerName"] = c.CustomerName;
                cRow["FirstName"]    = c.FirstName;
                cRow["LastName"]     = c.LastName;
                cRow["Gender"]       = c.Gender;
                cRow["EmailAddress"] = c.EmailAddress;
                cRow["Level"]        = c.Level;
                cRow["Section"]      = c.Section;
                cRow["Guardians"]    = c.BillTo;
                cRow["Address"]      = c.CustomerAddress.AddressString;
                cRow["Phone1"]       = c.CustomerAddress.PhoneNumber1;
                cRow["Phone2"]       = c.CustomerAddress.PhoneNumber2;
                ds.Student.Rows.Add(cRow);
            }
            rpt.SetDataSource(ds);
            crystalReportViewer1.ReportSource = rpt;
            crystalReportViewer1.Refresh();
        }
コード例 #7
0
        public void loadEasyGradeProReport(List <Customer> students)
        {
            EasyGradeProReport rpt = new EasyGradeProReport();
            DataSetStudents    ds  = new DataSetStudents();

            foreach (Customer c in students)
            {
                DataRow cRow = ds.Student.NewRow();
                cRow["CustomerID"]   = c.CustomerID;
                cRow["CustomerName"] = c.CustomerName;
                cRow["FirstName"]    = c.FirstName;
                cRow["LastName"]     = c.LastName;
                cRow["Gender"]       = c.Gender;
                cRow["EmailAddress"] = c.EmailAddress;
                cRow["Level"]        = c.Level;
                cRow["Section"]      = c.Section;
                ds.Student.Rows.Add(cRow);
            }
            rpt.SetDataSource(ds);
            crystalReportViewer1.ReportSource = rpt;
            crystalReportViewer1.Refresh();
        }
コード例 #8
0
ファイル: ReportViewer.cs プロジェクト: orette/southville
 public void loadLetterOfRequest(List<Customer> selectedStudents, String schName, String schAdd, String attained, String schYear)
 {
     LetterOfRequestTOR rpt = new LetterOfRequestTOR();
     DataSetStudents ds = new DataSetStudents();
     foreach (Customer c in selectedStudents)
     {
         DataRow cRow = ds.Student.NewRow();
         cRow["CustomerID"] = c.CustomerID;
         cRow["CustomerName"] = c.CustomerName;
         cRow["FirstName"] = c.FirstName;
         cRow["LastName"] = c.LastName;
         cRow["Gender"] = c.Gender;
         cRow["EmailAddress"] = c.EmailAddress;
         cRow["Level"] = c.Level;
         cRow["Section"] = c.Section;
         ds.Student.Rows.Add(cRow);
     }
     rpt.DataDefinition.FormulaFields["schoolName"].Text = "\"" + schName+"\"";
     rpt.DataDefinition.FormulaFields["schoolAddress"].Text = "\"" + schAdd + "\"";
     rpt.DataDefinition.FormulaFields["attainment"].Text = "\"" + attained + "\"";
     rpt.DataDefinition.FormulaFields["schoolYear"].Text = "\"" + schYear + "\"";
     rpt.SetDataSource(ds);
     crystalReportViewer1.ReportSource = rpt;
     crystalReportViewer1.Refresh();
 }
コード例 #9
0
ファイル: ReportViewer.cs プロジェクト: orette/southville
        public void loadEnrollmentReport(List<Customer> students, String enrollmentStatus, String numberOfStudents)
        {
            EnrollmentReport rpt = new EnrollmentReport();
            DataSetStudents ds = new DataSetStudents();
            List<String> maleList = new List<string>();
            List<String> femaleList = new List<string>();
            foreach (Customer c in students)
            {
                DataRow cRow = ds.Student.NewRow();
                cRow["CustomerID"] = c.CustomerID;
                cRow["CustomerName"] = c.CustomerName;
                cRow["FirstName"] = c.FirstName;
                cRow["LastName"] = c.LastName;
                cRow["Level"] = c.Level;
                cRow["Section"] = c.Section;
                cRow["Gender"] = c.Gender;
                ds.Student.Rows.Add(cRow);
                if (c.Gender.Equals("Male"))
                    maleList.Add(c.Gender);
                else femaleList.Add(c.Gender);
            }
            rpt.DataDefinition.FormulaFields["EnrollmentStatus"].Text = "\""+enrollmentStatus+"\"";
            rpt.DataDefinition.FormulaFields["NumberOfStudents"].Text = "\"" + numberOfStudents + "\"";
            rpt.SetDataSource(ds);

            crystalReportViewer1.ReportSource = rpt;
            crystalReportViewer1.Refresh();
        }
コード例 #10
0
ファイル: ReportViewer.cs プロジェクト: orette/southville
 public void loadEasyGradeProReport(List<Customer> students)
 {
     EasyGradeProReport rpt = new EasyGradeProReport();
     DataSetStudents ds = new DataSetStudents();
     foreach (Customer c in students)
     {
         DataRow cRow = ds.Student.NewRow();
         cRow["CustomerID"] = c.CustomerID;
         cRow["CustomerName"] = c.CustomerName;
         cRow["FirstName"] = c.FirstName;
         cRow["LastName"] = c.LastName;
         cRow["Gender"] = c.Gender;
         cRow["EmailAddress"] = c.EmailAddress;
         cRow["Level"] = c.Level;
         cRow["Section"] = c.Section;
         ds.Student.Rows.Add(cRow);
     }
     rpt.SetDataSource(ds);
     crystalReportViewer1.ReportSource = rpt;
     crystalReportViewer1.Refresh();
 }