Example #1
0
        private void GetMonthlyFeeReport(long receiptNo)
        {
            try
            {
                feeReport = new FeeReport();

                DataSet dsFeeDeposit = feeReport.GetFeeDepositReportByReceiptNo(receiptNo);

                if (dsFeeDeposit != null && dsFeeDeposit.Tables.Count > 0)
                {
                    dsFeeDeposit.Tables[0].TableName = "FeeDetails";
                    dsFeeDeposit.Tables[1].TableName = "FeeTransaction";
                    dsFeeDeposit.Tables[2].TableName = "School";

                    ReportDocument rdoc = new ReportDocument();

                    rdoc.Load(_appPath + "Reports\\FeeDepositReport.rpt");
                    rdoc.SetDataSource(dsFeeDeposit);
                    crystalReportViewer.ReportSource = rdoc;
                    rdoc.Refresh();
                    crystalReportViewer.Refresh();
                    crystalReportViewer.Show();
                    crystalReportViewer.Visible = true;
                }
                else
                {
                    crystalReportViewer.Visible = true;
                    MessageBox.Show("No Result Found.", "Fee Deposit Report", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            catch (Exception ex)
            {
            }
        }
        private void GetPurchasesReportFee(long ReceiptNo, long RegistrationNo)
        {
            try
            {
                _feeReport = new FeeReport();

                DataSet dsPurchasesReport = _feeReport.GetPurchasesFeeReport(ReceiptNo, RegistrationNo);

                if (dsPurchasesReport != null && dsPurchasesReport.Tables[1].Rows.Count > 0)
                {
                    dsPurchasesReport.Tables[0].TableName = "Student";
                    dsPurchasesReport.Tables[1].TableName = "FeeTransaction";
                    dsPurchasesReport.Tables[2].TableName = "School";

                    ReportDocument rdoc = new ReportDocument();
                    rdoc.Load(_appPath + "Reports\\PurchasesFeeReceiptReport.rpt");
                    rdoc.SetDataSource(dsPurchasesReport);
                    crystalReportViewer.ReportSource = rdoc;
                    rdoc.Refresh();
                    crystalReportViewer.Refresh();
                    crystalReportViewer.Show();
                    crystalReportViewer.Visible = true;
                }
                else
                {
                    crystalReportViewer.Visible = false;
                    MessageBox.Show("No Result Found.", "Purchases Fee", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            catch (Exception ex)
            {
            }
        }
        private void GetStudentDetailsByClassReport()
        {
            btnViewReport.Enabled = false;
            lblPleaseWait.Visible = true;
            try
            {
                int year  = datePickerReport.Value.Year;
                int month = datePickerReport.Value.Month;

                _feeMonthlyReportModel = new FeeMonthlyReportModel
                {
                    ClassID   = Convert.ToInt16(ddlClass.SelectedValue),
                    SectionID = Convert.ToInt16(ddlSection.SelectedValue) == 0 ? null : (short?)Convert.ToInt16(ddlSection.SelectedValue),
                    Month     = (short)month,
                    Year      = (short)year,
                };

                _feeReport = new FeeReport();


                DataSet dsDuesReport = _feeReport.GetStudentDuesDetailsByClass(_feeMonthlyReportModel);

                if (dsDuesReport != null && dsDuesReport.Tables[1].Rows.Count > 0)
                {
                    dsDuesReport.Tables[0].TableName = "School";
                    dsDuesReport.Tables[1].TableName = "StudentDues";

                    ReportDocument rdoc = new ReportDocument();
                    rdoc.Load(_appPath + "Reports\\StudentDuesReport.rpt");
                    rdoc.SetDataSource(dsDuesReport);
                    crystalReportViewer.ReportSource = rdoc;
                    rdoc.Refresh();
                    crystalReportViewer.Refresh();
                    crystalReportViewer.Show();
                    crystalReportViewer.Visible = true;

                    btnViewReport.Enabled = true;
                    lblPleaseWait.Visible = false;
                }
                else
                {
                    crystalReportViewer.Visible = false;
                    MessageBox.Show("No Result Found.", "No Record Found", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    btnViewReport.Enabled = true;
                    lblPleaseWait.Visible = false;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error! Please contact to admin.", "Applicatin Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Example #4
0
        private void GetMonthlyFeeReport()
        {
            try
            {
                int year  = datePickerReport.Value.Year;
                int month = datePickerReport.Value.Month;

                _feeMonthlyReportModel = new FeeMonthlyReportModel
                {
                    ClassID = Convert.ToInt16(ddlClass.SelectedValue),
                    Month   = (short)month,
                    Year    = (short)year,
                };

                _feeReport = new FeeReport();

                DataSet dsMonthlyReport = _feeReport.GetFeeReportByMonth(_feeMonthlyReportModel);

                if (dsMonthlyReport != null && dsMonthlyReport.Tables[0].Rows.Count > 0)
                {
                    dsMonthlyReport.Tables[0].TableName = "FeeDetails";
                    dsMonthlyReport.Tables[1].TableName = "FeeApplicable";
                    dsMonthlyReport.Tables[2].TableName = "PreviousBill";
                    dsMonthlyReport.Tables[3].TableName = "School";

                    ReportDocument rdoc = new ReportDocument();
                    rdoc.Load(_appPath + "Reports\\MonthlyFeeReceipt.rpt");
                    rdoc.SetDataSource(dsMonthlyReport);
                    crystalReportViewer.ReportSource = rdoc;
                    rdoc.Refresh();
                    crystalReportViewer.Refresh();
                    crystalReportViewer.Show();
                    crystalReportViewer.Visible = true;
                }
                else
                {
                    crystalReportViewer.Visible = true;
                    MessageBox.Show("No Result Found.", "Monthly Fee Receipt", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            catch (Exception ex)
            {
            }
        }
        private void GetDailyFeeCollection()
        {
            try
            {
                _feeReport = new FeeReport();

                DateTime feeDate = Common.Convert_String_To_Date(datePickerReport.Text);
                //DateTime.ParseExact(datePickerReport.Text, "dd.MM.yyyy", CultureInfo.InvariantCulture);

                DataSet dsFeeCollection = _feeReport.GetDailyFeeCollection(feeDate);

                if (dsFeeCollection != null && dsFeeCollection.Tables.Count > 0)
                {
                    if (dsFeeCollection.Tables[0].Rows.Count == 0)
                    {
                        MessageBox.Show("No Result Found.", "Daily Fee Collection", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        crystalReportViewer.Visible = false;
                        return;
                    }

                    dsFeeCollection.Tables[0].TableName = "FeeCollection";

                    ReportDocument rdoc = new ReportDocument();

                    rdoc.Load(_appPath + "Reports\\DailyFeeCollectionReport.rpt");
                    rdoc.SetDataSource(dsFeeCollection);
                    crystalReportViewer.ReportSource = rdoc;
                    rdoc.Refresh();
                    crystalReportViewer.Refresh();
                    crystalReportViewer.Show();
                    crystalReportViewer.Visible = true;
                }
                else
                {
                    crystalReportViewer.Visible = false;
                    MessageBox.Show("No Result Found.", "Daily Fee Collection", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            catch (Exception ex)
            {
            }
        }