private void DeletePromotionStudent(string promoteStudentXML)
        {
            try
            {
                messageSB        = new StringBuilder();
                studentPromotion = new StudentPromotion();
                short result = studentPromotion.SavePromotionStudent(promoteStudentXML);
                switch (result)
                {
                case 1:
                    messageSB.Append("\u2022 Record successfully deleted.\n");
                    break;

                case -1:
                    messageSB.Append("\u2022 Error in deleting records.\n");
                    break;
                }
                if (!string.IsNullOrEmpty(messageSB.ToString()))
                {
                    MessageBox.Show(messageSB.ToString(), "Promote Student", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error! Please contact to admin.", "Promote Student", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void GetPurchasesReportFee(short ClassID, short SectionID, int From_Academic_Year)
        {
            try
            {
                _studentPromotion = new StudentPromotion();

                DataSet dsReport = _studentPromotion.GetStudentPromotionReport(ClassID, SectionID, From_Academic_Year);

                if (dsReport != null && dsReport.Tables[0].Rows.Count > 0)
                {
                    ReportStudentPromotion.isRecordFound = true;

                    dsReport.Tables[0].TableName = "StudentPromotion";
                    dsReport.Tables[1].TableName = "School";

                    ReportDocument rdoc = new ReportDocument();
                    rdoc.Load(_appPath + "Reports\\StudentPromotionReport.rpt");
                    rdoc.SetDataSource(dsReport);
                    crystalReportViewer.ReportSource = rdoc;
                    rdoc.Refresh();
                    crystalReportViewer.Refresh();
                    crystalReportViewer.Show();
                    crystalReportViewer.Visible = true;
                }
                else
                {
                    crystalReportViewer.Visible          = false;
                    ReportStudentPromotion.isRecordFound = false;
                    MessageBox.Show("No Result Found.", "Student Promotion", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            catch (Exception ex)
            {
            }
        }
        private void GetStudentPromotionDetails()
        {
            studentPromotion = new StudentPromotion();

            studentPromotionViewModel = studentPromotion.GetStudentPromotionDetails(
                Convert.ToInt16(ddlClass.SelectedValue),
                Convert.ToInt16(ddlSection.SelectedValue),
                Convert.ToInt32(ddlFromAcademicYear.SelectedValue));

            BindStudentGrid(studentPromotionViewModel.ListStudent);
            BindStudentPromotionGrid(studentPromotionViewModel.ListStudentPromotion);
        }