コード例 #1
0
ファイル: ResultUserControl.cs プロジェクト: joydeba/sn_rm
 private void StudentWisePrintSingleButton_Click(object sender, EventArgs e)
 {
     if (student.StudentId != null)
     {
         ResultStudentWiseDataSet ds = new ResultStudentWiseDataSet();
         ResultStudentWiseTableAdapter resultStudentWiseTableAdapter = new ResultStudentWiseTableAdapter();
         resultStudentWiseTableAdapter.FillStudentBy(ds.ResultStudentWiseDataTable, (int)StudentWiseSessionComboBox.SelectedValue, (int)StudentWiseYearComboBox.SelectedValue, (int)StudentWiseTermComboBox.SelectedValue,(int)student.StudentId);
         ReportForm rf = new ReportForm();
         rf.Show();
         ResultStudentWiseCR report = new ResultStudentWiseCR();
         report.SetDataSource(ds);
         report.SetParameterValue("DisciplineName", Depertment.DisciplineName);
         report.SetParameterValue("SchoolName", Depertment.SchoolName);
         rf.crystalReportViewer1.ReportSource = report;
     }
     else
     {
         MessageBox.Show("No such Student");
     }
 }
コード例 #2
0
ファイル: ResultUserControl.cs プロジェクト: joydeba/sn_rm
 private void CourseWisePrintSelectedButton_Click(object sender, EventArgs e)
 {
     ResultCourseWiseDataSet ds = new ResultCourseWiseDataSet();
     //course
     ResultCourseWiseTableAdapter resultCourseWiseTableAdapter = new ResultCourseWiseTableAdapter();
     resultCourseWiseTableAdapter.FillBy(ds.ResultCourseWiseDataTable, (int)CourseWiseSessionComboBox.SelectedValue, (int)CourseWiseCourseNoComboBox.SelectedValue);
     ReportForm rf = new ReportForm();
     rf.Show();
     bool isTheory = int.Parse(courseList[CourseWiseCourseNoComboBox.SelectedIndex].Course_No) % 2 == 1;
     if (isTheory)
     {
         ResultCourseWiseAllTheoryCR report = new ResultCourseWiseAllTheoryCR();
         report.SetDataSource(ds);
         report.SetParameterValue("DisciplineName", Depertment.DisciplineName);
         report.SetParameterValue("SchoolName", Depertment.SchoolName);
         rf.crystalReportViewer1.ReportSource = report;
     }
     else
     {
         ResultCourseWiseAllSessionalCR report = new ResultCourseWiseAllSessionalCR();
         report.SetDataSource(ds);
         report.SetParameterValue("DisciplineName", Depertment.DisciplineName);
         report.SetParameterValue("SchoolName", Depertment.SchoolName);
         rf.crystalReportViewer1.ReportSource = report;
     }
 }
コード例 #3
0
ファイル: ResultUserControl.cs プロジェクト: joydeba/sn_rm
        private void CourseWisePrintAllSessionalButton_Click(object sender, EventArgs e)
        {
            ResultCourseWiseDataSet ds = new ResultCourseWiseDataSet();
            ResultCourseWiseTableAdapter resultCourseWiseTableAdapter = new ResultCourseWiseTableAdapter();
            int isTheory = 0;
            resultCourseWiseTableAdapter.FillAllBy(ds.ResultCourseWiseDataTable, (int)CourseWiseSessionComboBox.SelectedValue, (int)CourseWiseYearComboBox.SelectedValue, (int)CourseWiseTermComboBox.SelectedValue, isTheory);
            ReportForm rf = new ReportForm();
            rf.Show();
            ResultCourseWiseAllSessionalCR report = new ResultCourseWiseAllSessionalCR();
            report.SetDataSource(ds);
            report.SetParameterValue("DisciplineName", Depertment.DisciplineName);
            report.SetParameterValue("SchoolName", Depertment.SchoolName);
            rf.crystalReportViewer1.ReportSource = report;

        }
コード例 #4
0
ファイル: MarksEntryControl.cs プロジェクト: joydeba/sn_rm
 private void PrintButton_Click(object sender, EventArgs e)
 {
     ResultCourseWiseDataSet ds = new ResultCourseWiseDataSet();
     //course
     ResultCourseWiseTableAdapter resultCourseWiseTableAdapter = new ResultCourseWiseTableAdapter();
     resultCourseWiseTableAdapter.FillBy(ds.ResultCourseWiseDataTable,(int)SessionToolStripComboBox.ComboBox.SelectedValue, (int)CourseNoToolStripComboBox.ComboBox.SelectedValue);
     ReportForm rf = new ReportForm();
     rf.Show();
     if (isTheory)
     {
         ResultCourseWiseAllTheoryCR report = new ResultCourseWiseAllTheoryCR();
         report.SetDataSource(ds);
         rf.crystalReportViewer1.ReportSource = report;
     }
     else
     {
         ResultCourseWiseAllSessionalCR report = new ResultCourseWiseAllSessionalCR();
         report.SetDataSource(ds);
         rf.crystalReportViewer1.ReportSource = report;
     }
 }