public static string GetResultsByExamid(int ExamId)
    {
        WebMsg.Show("codebehind");
        ReportsForResult obj_bal_Report_for_result = new ReportsForResult();
        DataSet          dsResult = new DataSet();

        dsResult = obj_bal_Report_for_result.BAL_SYS_GetResultByExamid(ExamId);

        StringBuilder oBuilder = new StringBuilder();

        string totalscore = "<p class=\"lead\">Total Score:" + " " + dsResult.Tables[1].Rows[0]["Result"].ToString() + " " + "/10</p>";

        oBuilder.Append(totalscore);
        int i = 0;

        foreach (DataRow odr in dsResult.Tables[0].Rows)
        {
            i = i + 1;
            //string divtag = "<div style=\"display: inline-block\"";
            //string question = divtag+"<span class=\"bg-info lead\">Q" + i + ":" + odr["Question"] + "</span></div>";

            string question = "<div style=\"display: inline-block\" class=\"text-primary\">Q" + i + ":</div><div style=\"display: inline-block\" class=\"text-primary\" >" + odr["Question"] + "</div>";


            oBuilder.Append(question);
            string givenanswer = "<p>Given Answer:" + odr["GivenAnswer"] + "</p>";
            oBuilder.Append(givenanswer);
            string crctanswer = "<p>Correct Answer:" + odr["Answer"] + "</p>";
            oBuilder.Append(crctanswer);
            string score = "<p class=\"text-danger\">Score:" + odr["Score"] + "</p><hr/>";
            oBuilder.Append(score);
        }
        return(Convert.ToString(oBuilder));
    }
    protected void BindChart()
    {
        DataSet          ds             = new DataSet();
        ReportsForResult objRsultReport = new ReportsForResult();

        ds = objRsultReport.BAL_SYS_ResultStudentwiseSecond_Select(this.SchoolID, this.StudentID, this.BMSID, this.SubjectID, this.DivisionID, this.FromDate, this.ToDate);

        DataTable dt = new DataTable();


        dt = ds.Tables[0];

        string[]  x = new string[dt.Rows.Count];
        decimal[] y = new decimal[dt.Rows.Count];

        for (int i = 0; i < dt.Rows.Count; i++)
        {
            x[i] = dt.Rows[i][2].ToString();
            string perc = dt.Rows[i][3].ToString().Substring(0, dt.Rows[i][3].ToString().IndexOf("%"));
            y[i] = Convert.ToInt32(perc);
        }

        //BarChart1.Series.Add(new AjaxControlToolkit.BarChartSeries { Data = y });
        //BarChart1.CategoriesAxis = string.Join(",", x);
        //Chart1.Series[0].Points.DataBindXY(x, y);
        //Chart1.Series[0].ChartType = SeriesChartType.Column;
        //Chart1.ChartAreas["ChartArea1"].Area3DStyle.Enable3D = false;
        lblstudentname.Text = studentname;
        //Chart1.Legends[0].Enabled = true;
    }
    protected void btnback_Click(object sender, EventArgs e)
    {
        if (CurrentReport == "SchoolAttendance")
        {
        }
        else if (CurrentReport == "ClassAttendance")
        {
            rptSchoolAttendance.Visible = true;
            rptClassAttendance.Visible  = false;
            //FirstReport.Visible = true;
            Div1.Visible      = true;
            secondRpt.Visible = false;
            btnback.Visible   = false;

            DataSet ds = new DataSet();
            this.Obj_Dal_ClassroomWiseAttendance = new ClassroomWiseAttendance();
            ReportsForResult objRsultReport = new ReportsForResult();
            ds = this.Obj_Dal_ClassroomWiseAttendance.GetClasswiseAttendance(Convert.ToInt32(ddlSchool.SelectedValue), Convert.ToInt32(ddlBoard.SelectedValue), Convert.ToInt32(ddlMedium.SelectedValue), Convert.ToInt32(ddlStandard.SelectedValue), Convert.ToInt32(ddlDivision.SelectedValue), Get_DDMMYYYY(txtDate.Text));
            GetConnectionStringSTRING obj = new GetConnectionStringSTRING();
            connectionstring = obj.BAL_EpathshalaString();

            try
            {
                rptSchoolAttendance.XMLReportFile = Server.MapPath("../ReportXMLFiles/ClassroomWiseAttendanceFirst.xml");
                rptSchoolAttendance.Search(ds.Tables[0]);
                CurrentReport = "SchoolAttendance";
            }
            catch (Exception ex)
            {
                WebMsg.Show("" + ex.Message.ToString());
            }
        }
    }
예제 #4
0
    protected void ViewResult(object sender, EventArgs e)
    {
        using (GridViewRow row = (GridViewRow)((LinkButton)sender).Parent.Parent)
        {
            int   totalquescnt = Convert.ToInt32(row.Cells[2].Text) + Convert.ToInt32(row.Cells[3].Text);
            Label lblstudentid = (Label)row.FindControl("lblstudentID");
            lbltotalquesstudent.Text = totalquescnt.ToString();
            int   inttoatalquescnt = Convert.ToInt32(Request.QueryString["noq"]);
            Label lblresultperc    = (Label)row.FindControl("lblresultperc");
            if (totalquescnt >= inttoatalquescnt)
            {
                lblcorrectans.Text = row.Cells[2].Text;
                lblwrongans.Text   = row.Cells[3].Text;
                lblperc.Text       = lblresultperc.Text;

                DataSet          ds             = new DataSet();
                ReportsForResult objRsultReport = new ReportsForResult();

                ds = objRsultReport.BAL_SYS_ResultRPTByStudentDetails(Convert.ToInt32(lblstudentid.Text), Convert.ToInt32(Request.QueryString["BMSSCTID"]), Convert.ToInt32(AppSessions.EmpolyeeID), DateTime.Now);
                lblstudentname.Text  = "Detail Result of " + row.Cells[1].Text;
                GridView1.DataSource = ds.Tables[1];
                GridView1.DataBind();


                //dvMainstudentresult.Visible = false;
                dvMainstudentresult.Visible = true;
            }
            else
            {
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Exam is running, you can view result after exam fininshed')", true);
                //WebMsg.Show("Exam is running, you can view result after exam fininshed");
            }
        }
    }
    public void BindGrid(int ExamId)
    {
        obj_bal_Report_for_result = new ReportsForResult();
        DataSet dsResult = new DataSet();

        dsResult = obj_bal_Report_for_result.BAL_SYS_GetResultByExamid(ExamId);
        GrdExamResult.DataSource = dsResult.Tables[0];
        GrdExamResult.DataBind();
    }
    private void StageFourCalling()
    {
        DataSet          ds             = new DataSet();
        ReportsForResult objRsultReport = new ReportsForResult();

        ds = objRsultReport.BAL_SYS_ResultSubjectwiseFourth_Select(this.SchoolID, this.BMSID, this.SubjectID, this.EmployeeID, this.DivisionID, this.StudentID, this.FromDate, this.ToDate);

        CommanCallUserControl(ds, "../ReportXMLFiles/SubjectWiseReportForth.xml");
    }
예제 #7
0
    private void StageOneCalli()
    {
        ViewState["Stage"]     = 1;
        ReportControl1.Visible = true;
        DataSet          ds             = new DataSet();
        ReportsForResult objRsultReport = new ReportsForResult();

        ds = objRsultReport.BAL_SYS_ResultClassroomwise_Select(Convert.ToInt32(ddlSchool.SelectedValue), Convert.ToInt32(ddlBoard.SelectedValue), Convert.ToInt32(ddlMedium.SelectedValue), Convert.ToInt32(ddlStandard.SelectedValue), Convert.ToInt32(ddlsubject.SelectedValue), Convert.ToInt32(ddlchapter.SelectedValue), Convert.ToInt32(ddltopic.SelectedValue), Convert.ToDateTime(txtfromdate.Text), Convert.ToDateTime(txttodate.Text));
        CommanCallUserControl(ds, "../ReportXMLFiles/SchoolExamReports.xml");
    }
    private void StageOneCalli()
    {
        DataSet          ds             = new DataSet();
        ReportsForResult objRsultReport = new ReportsForResult();

        ds = objRsultReport.BAL_SYS_ResultStudentwise_Select(Convert.ToInt32(ddlSchool.SelectedValue), Convert.ToInt32(ddlBoard.SelectedValue), Convert.ToInt32(ddlMedium.SelectedValue), Convert.ToInt32(ddlStandard.SelectedValue), Convert.ToInt32(ddlsubject.SelectedValue), Convert.ToInt32(ddlDivision.SelectedValue), Convert.ToDateTime(txtfromdate.Text), Convert.ToDateTime(txttodate.Text));

        GetConnectionStringSTRING obj = new GetConnectionStringSTRING();

        connectionstring        = obj.BAL_EpathshalaString();
        WebUserControl1.Visible = true;
        CommanCallUserControl(ds, "../ReportXMLFiles/StudentWiseFirstReport.xml");
    }
예제 #9
0
    private void StageTwoCalling()
    {
        DataSet          ds             = new DataSet();
        ReportsForResult objRsultReport = new ReportsForResult();

        ds = objRsultReport.BAL_SYS_ResultClassroomwiseByFirRPT_Select(this.SchoolID, this.BMSSCTID, this.EmployeeID, this.DivisionID, this.ExamDate);

        GetConnectionStringSTRING obj = new GetConnectionStringSTRING();

        connectionstring = obj.BAL_EpathshalaString();

        CommanCallUserControl(ds, "../ReportXMLFiles/SchoolExamReportsSec.xml");
    }
    private void StageTwoCalling()
    {
        DataSet          ds             = new DataSet();
        ReportsForResult objRsultReport = new ReportsForResult();

        ds = objRsultReport.BAL_SYS_ResultStudentwiseSecond_Select(this.SchoolID, this.StudentID, this.BMSID, this.SubjectID, this.DivisionID, this.FromDate, this.ToDate);


        GetConnectionStringSTRING obj = new GetConnectionStringSTRING();

        connectionstring = obj.BAL_EpathshalaString();

        CommanCallUserControl(ds, "../ReportXMLFiles/StudentWiseReportSecond.xml");

        Chart1.Visible = true;
        BindChart(ds);
    }
예제 #11
0
    private void BindGrvResultDetails()
    {
        DataSet          ds             = new DataSet();
        ReportsForResult objRsultReport = new ReportsForResult();

        ds = objRsultReport.BAL_SYS_ResultClassroomwise_Select(Convert.ToInt32(ddlSchool.SelectedValue), Convert.ToInt32(ddlBoard.SelectedValue), Convert.ToInt32(ddlMedium.SelectedValue), Convert.ToInt32(ddlStandard.SelectedValue), Convert.ToInt32(ddlsubject.SelectedValue), Convert.ToInt32(ddlchapter.SelectedValue), Convert.ToInt32(ddltopic.SelectedValue), Convert.ToDateTime(txtfromdate.Text), Convert.ToDateTime(txttodate.Text));

        if (ds.Tables.Count > 0)
        {
            GridViewOperations GrvOperation = new GridViewOperations();
            GrvOperation.BindGridWithSorting(GrvResultDetails, ds, this.SortField, this.SortDirection);
        }
        else
        {
            GrvResultDetails.DataSource = null;
            GrvResultDetails.DataBind();
        }
    }
    private void StageThreeCalling()
    {
        DataSet          ds             = new DataSet();
        ReportsForResult objRsultReport = new ReportsForResult();

        ds = objRsultReport.BAL_SYS_ResultSubjectwiseThird_Select(this.SchoolID, this.BMSID, this.SubjectID, this.EmployeeID, this.DivisionID, this.FromDate, this.ToDate);

        switch (AppSessions.RoleID)
        {
        case (int)EnumFile.Role.Teacher:
            ds = objRsultReport.BAL_SYS_ResultSubjectwiseThird_Select(this.SchoolID, this.BMSID, this.SubjectID, this.EmployeeID, this.DivisionID, this.FromDate, this.ToDate);
            break;

        case (int)EnumFile.Role.Student:
            ds = BAL_SYS_ResultSubjectwiseThird_Select(this.SchoolID, this.BMSID, this.SubjectID, this.EmployeeID, this.DivisionID, this.FromDate, this.ToDate, AppSessions.StudentID);
            break;
        }

        CommanCallUserControl(ds, "../ReportXMLFiles/SubjectWiseReportThird.xml");
    }
    private void StageOneCalli()
    {
        DataSet          ds             = new DataSet();
        ReportsForResult objRsultReport = new ReportsForResult();

        switch (AppSessions.RoleID)
        {
        case (int)EnumFile.Role.Teacher:
            ds = objRsultReport.BAL_SYS_ResultSubjectwise_Select(Convert.ToInt32(ddlSchool.SelectedValue), Convert.ToInt32(ddlBoard.SelectedValue), Convert.ToInt32(ddlMedium.SelectedValue), Convert.ToInt32(ddlStandard.SelectedValue), Convert.ToInt32(ddlsubject.SelectedValue), Convert.ToDateTime(txtfromdate.Text), Convert.ToDateTime(txttodate.Text));
            break;

        case (int)EnumFile.Role.Student:
            ds = BAL_SYS_ResultSubjectwise_Select(Convert.ToInt32(ddlSchool.SelectedValue), Convert.ToInt32(ddlBoard.SelectedValue), Convert.ToInt32(ddlMedium.SelectedValue), Convert.ToInt32(ddlStandard.SelectedValue), Convert.ToInt32(ddlsubject.SelectedValue), Convert.ToDateTime(txtfromdate.Text), Convert.ToDateTime(txttodate.Text), AppSessions.StudentID);
            break;
        }



        CommanCallUserControl(ds, "../ReportXMLFiles/SubjectWiseReportFir.xml");
    }
    private void GetReportdata(int studentid, int subjectid)
    {
        try
        {
            DataSet          dsResult   = new DataSet();
            ReportsForResult Report_Bal = new ReportsForResult();


            string data;

            dsResult = Report_Bal.BAL_SYS_ResultRPTByStudentSubDetails(studentid, subjectid);

            if (dsResult.Tables[0].Rows.Count > 0)
            {
                int count = dsResult.Tables[0].Rows.Count;


                for (int i = 0; i < count; i++)
                {
                    string examDate           = dsResult.Tables[0].Rows[i]["ExamDate"].ToString();
                    string chapterIndex       = dsResult.Tables[0].Rows[i]["ChapterIndex"].ToString();
                    string chapterName        = dsResult.Tables[0].Rows[i]["Chapter"].ToString();
                    string percentageObtained = dsResult.Tables[0].Rows[i]["ObtainedPercentage"].ToString();
                    int    examid             = Convert.ToInt16(dsResult.Tables[0].Rows[i]["ExamID"]);

                    //tableData += "<tr><td  class=\"col-md-2 \">" + examDate + "</td><td class=\"col-md-2 \">" + chapterIndex + "</td><td class=\"col-md-4 \">" + chapterName + "</td><td class=\"col-md-2 \">" + percentageObtained + "</td><td class=\"col-md-2 \" id=\"click" + i + "\"><asp:Button class=\"btn btn-outline-success\"  Text=\"Details\" runat=\"server\" OnClick=\"GetExamdetails(" + examid + ")\"/></td></tr>";

                    tableData += "<tr><td>" + examDate + "</td><td>" + chapterIndex + "</td><td>" + chapterName + "</td><td>" + percentageObtained + "</td><td><button type=\"button\" class=\"btn btn-link\" data-toggle=\"modal\" data-target=\"#myModal\" onclick=\"GetExamdetails(" + examid + ")\">Details</button></td></tr>";
                    //WebMsg.Show(tableData);
                }
            }
            else
            {
                tableData = "<tr><td><bold>" + "Chapter Test not taken" + "</bold></td></tr>";
            }
        }
        catch (Exception ex)
        {
            WebMsg.Show("" + ex.Message.ToString());
        }
    }
    private void StageTwoCalling()
    {
        DataSet          ds             = new DataSet();
        ReportsForResult objRsultReport = new ReportsForResult();

        ds = objRsultReport.BAL_SYS_ResultSubjectwiseSecond_Select(this.SchoolID, this.BoardID, this.MediumID, this.StandardID, this.SubjectID, this.FromDate, this.ToDate);

        switch (AppSessions.RoleID)
        {
        case (int)EnumFile.Role.Teacher:
            ds = objRsultReport.BAL_SYS_ResultSubjectwiseSecond_Select(this.SchoolID, this.BoardID, this.MediumID, this.StandardID, this.SubjectID, this.FromDate, this.ToDate);
            break;

        case (int)EnumFile.Role.Student:
            ds = BAL_SYS_ResultSubjectwiseSecond_Select(this.SchoolID, this.BoardID, this.MediumID, this.StandardID, this.SubjectID, this.FromDate, this.ToDate, AppSessions.StudentID);
            break;
        }


        CommanCallUserControl(ds, "../ReportXMLFiles/SubjectWiseReportSecond.xml");
    }
    public void Displayselecteddata(Hashtable hashtable, object objsender)
    {
        if (Convert.ToInt32(ViewState["Stage"].ToString()) == 1)
        {
            FirstRpt.Visible  = true;
            secondRpt.Visible = true;
            thirdRpt.Visible  = false;
            fourthRpt.Visible = false;

            btnback.Visible        = true;
            ViewState["Stage"]     = 2;
            lblTitleSecond.Visible = true;
            lblTitleFirst.Visible  = true;
            this.SchoolID          = Convert.ToInt32(ddlSchool.SelectedValue.ToString());
            this.BMSID             = Convert.ToInt32(hashtable["BMSID"].ToString());
            this.StudentID         = Convert.ToInt32(hashtable["StudentID"].ToString());
            this.DivisionID        = Convert.ToInt32(hashtable["DivisionID"].ToString());
            this.FromDate          = Convert.ToDateTime(txtfromdate.Text);
            this.ToDate            = Convert.ToDateTime(txttodate.Text);
            this.StudentName       = hashtable["FirstName"].ToString();
            this.Standard          = hashtable["Standard"].ToString();
            this.Perc = hashtable["Perc"].ToString();
            //this.StudentID= ;
            //this.SchoolID, this.StudentID, this.BMSID, this.SubjectID, this.DivisionID, this.FromDate, this.ToDate
            BindValuesToLabels();
            StageTwoCalling();
        }
        else if (Convert.ToInt32(ViewState["Stage"].ToString()) == 2)
        {
            FirstRpt.Visible       = true;
            secondRpt.Visible      = false;
            thirdRpt.Visible       = true;
            fourthRpt.Visible      = false;
            lblTitleThird.Visible  = true;
            lblTitleSecond.Visible = false;

            btnback.Visible    = true;
            ViewState["Stage"] = 3;

            this.SubjectID  = Convert.ToInt32(hashtable["SubjectID"].ToString());
            this.EmployeeID = Convert.ToInt32(hashtable["EmployeeID"].ToString());


            tlblSchoolValue.Text   = ddlSchool.SelectedItem.Text;
            tlblBoardValue.Text    = ddlBoard.SelectedItem.Text;
            tlblMediumValue.Text   = ddlMedium.SelectedItem.Text;
            tlblStandardValue.Text = this.Standard;
            tlblStudentValue.Text  = this.StudentName;
            tlblFromDateValue.Text = string.Format("{0:dd-MMM-yyyy}", this.FromDate);
            tlblToDateValue.Text   = string.Format("{0:dd-MMM-yyyy}", this.ToDate);
            tlblStudentValue.Text  = this.StudentName;
            tlblPercValue.Text     = hashtable["Perc"].ToString();
            tlblteacherValue.Text  = hashtable["Teacher"].ToString();
            tlblsubjectValue.Text  = hashtable["Subject"].ToString();

            StageThreeCalling();
        }
        else if (Convert.ToInt32(ViewState["Stage"].ToString()) == 3)
        {
            FirstRpt.Visible  = true;
            secondRpt.Visible = false;
            thirdRpt.Visible  = false;
            fourthRpt.Visible = true;
            //lblTitleFourth.Visible = true;
            //lblTitleThird.Visible = false;

            userControlDv.Visible    = false;
            notusercontroldv.Visible = true;

            btnback.Visible    = true;
            ViewState["Stage"] = 4;

            flblSchoolValue.Text = ddlSchool.SelectedItem.Text;
            flblBoardValue.Text  = ddlBoard.SelectedItem.Text;
            flblMediumValue.Text = ddlMedium.SelectedItem.Text;


            // BMSSCTID StudentID,ExamDate,EmployeeID
            this.BMSSCTID = Convert.ToInt32(hashtable["BMSSCTID"].ToString());
            this.ExamDate = Convert.ToDateTime(hashtable["ExamDate"].ToString());
            DataSet          ds             = new DataSet();
            ReportsForResult objRsultReport = new ReportsForResult();

            ds = objRsultReport.BAL_SYS_ResultRPTByStudentDetails(this.StudentID, this.BMSSCTID, this.EmployeeID, this.ExamDate);

            int FirstTime = 1;
            if (ds.Tables.Count > 0)
            {
                if (FirstTime == 1)
                {
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        flblStandardValue.Text = ds.Tables[0].Rows[0]["Standard"].ToString();
                        flblsubjectValue.Text  = ds.Tables[0].Rows[0]["Subject"].ToString();
                        flblChapterValue.Text  = ds.Tables[0].Rows[0]["Chapter"].ToString();
                        flbltopicValue.Text    = ds.Tables[0].Rows[0]["Topic"].ToString();
                        flblDateValue.Text     = string.Format("{0:dd-MMM-yyyy}", Convert.ToDateTime(ViewState["ExamDate"].ToString()));
                        flblteacherValue.Text  = ds.Tables[0].Rows[0]["Teacher"].ToString();
                        flblStudentValue.Text  = ds.Tables[0].Rows[0]["FirstName"].ToString();
                        flblTrueAnsValue.Text  = ds.Tables[0].Rows[0]["True"].ToString();
                        flblFalseAnsValue.Text = ds.Tables[0].Rows[0]["False"].ToString();
                        flblResultValue.Text   = ds.Tables[0].Rows[0]["Perc"].ToString();

                        Label1.Text            = ds.Tables[0].Rows[0]["True"].ToString();
                        Label2.Text            = ds.Tables[0].Rows[0]["False"].ToString();
                        lblTotalQues.Text      = (Convert.ToInt32(ds.Tables[0].Rows[0]["True"].ToString()) + Convert.ToInt32(ds.Tables[0].Rows[0]["False"].ToString())).ToString();
                        lbluserScoreValue.Text = Label1.Text + "/" + lblTotalQues.Text;
                    }
                    FirstTime = 0;
                }
                gvAnalysis.DataSource = ds.Tables[1];
                gvAnalysis.DataBind();
            }
            else
            {
                gvAnalysis.DataSource = null;
                gvAnalysis.DataBind();
            }
        }
    }
    public static List <object> GetPerformanceChartdata(int subjectid)
    {
        StringBuilder sb             = new StringBuilder();
        List <object> iData          = new List <object>();
        List <string> labels         = new List <string>();
        List <string> lst_dataItem_1 = new List <string>();

        try
        {
            //int subjectid = Convert.ToInt16(AppSessions.SubjectID);
            //int subjectid = 1;
            int studentid = Convert.ToInt32(AppSessions.StudentID);
            int bmsid     = Convert.ToInt32(AppSessions.BMSID);


            DataTable dtexam = new DataTable();
            dtexam.Columns.Add("Chapter", typeof(string));
            dtexam.Columns.Add("ObtainedPercentage", typeof(string));


            DataSet          dsResult   = new DataSet();
            ReportsForResult Report_Bal = new ReportsForResult();


            string data;

            // dsResult = Report_Bal.BAL_SYS_ResultRPTByStudentSubDetails(studentid, subjectid,bmsid);
            dsResult = Report_Bal.BAL_SYS_Student_Performance_Chart(studentid, subjectid, bmsid);

            //sb.Append("[");

            if (dsResult.Tables[0].Rows.Count > 0 && dsResult != null)
            {
                for (int i = 0; i < dsResult.Tables[0].Rows.Count; i++)
                {
                    //int count = dsResult.Tables[0].Rows.Count;
                    //DataRow dr = dtexam.NewRow();

                    //dr["Chapter"] = dsResult.Tables[0].Rows[0]["Chapter"].ToString();
                    //dr["ObtainedPercentage"] = dsResult.Tables[0].Rows[0]["ObtainedPercentage"].ToString(); ;
                    //dtexam.Rows.Add(dr);
                    //sb.Append("{");
                    //System.Threading.Thread.Sleep(50);
                    //string color = String.Format("#{0:X6}", new Random().Next(0x1000000));
                    //sb.Append(string.Format("text :'{0}', value:{1}, color: '{2}'", dsResult.Tables[0].Rows[0]["Chapter"].ToString(), dsResult.Tables[0].Rows[0]["ObtainedPercentage"].ToString(), color));
                    //sb.Append("},");
                    labels.Add(dsResult.Tables[0].Rows[i]["Chapter"].ToString());
                    // lst_dataItem_1.Add(Convert.ToInt32(dsResult.Tables[0].Rows[i]["ObtainedPercentage"]));
                    if (dsResult.Tables[0].Rows[i]["ObtainedPercentage"].ToString().Length > 0)
                    {
                        lst_dataItem_1.Add(dsResult.Tables[0].Rows[i]["ObtainedPercentage"].ToString());
                    }
                    else
                    {
                        lst_dataItem_1.Add(null);
                    }
                }
                iData.Add(labels);
                iData.Add(lst_dataItem_1);
            }

            else
            {
                DataRow dr = dtexam.NewRow();
                dr["chapter"]            = "";
                dr["ObtainedPercentage"] = "";
                dtexam.Rows.Add(dr);
            }
            //sb = sb.Remove(sb.Length - 1, 1);
            //sb.Append("]");
        }
        catch (Exception ex)
        {
            WebMsg.Show("" + ex.Message.ToString());
        }
        //return sb.ToString();
        return(iData);
    }
    public void Displayselecteddata(Hashtable hashtable, object objsender)
    {
        ReportControl rpt = (ReportControl)objsender;

        if (rpt.ID == "rptSchoolAttendance")
        {
            rptSchoolAttendance.Visible = false;
            rptClassAttendance.Visible  = true;
            //FirstReport.Visible = false;
            Div1.Visible      = true;
            secondRpt.Visible = true;
            btnback.Visible   = true;

            this.SchoolID      = Convert.ToInt32(ddlSchool.SelectedValue.ToString());
            this.BMSID         = Convert.ToInt32(hashtable["BMSID"].ToString());
            ViewState["BMSID"] = Convert.ToInt32(hashtable["BMSID"].ToString());
            this.BMS           = (hashtable["BMS"].ToString());
            this.Attendance    = (hashtable["Attendance"].ToString());
            this.Division      = (hashtable["Division"].ToString());
            this.Date          = Convert.ToDateTime(txtDate.Text);
            BindValuesToLabels();

            DataSet          ds             = new DataSet();
            ReportsForResult objRsultReport = new ReportsForResult();
            this.Obj_Dal_ClassroomWiseAttendance = new ClassroomWiseAttendance();
            ds = this.Obj_Dal_ClassroomWiseAttendance.GetAttendance(SchoolID, Date, BMSID);

            GetConnectionStringSTRING obj = new GetConnectionStringSTRING();
            connectionstring = obj.BAL_EpathshalaString();

            try
            {
                rptClassAttendance.XMLReportFile = Server.MapPath("../ReportXMLFiles/ClassroomWiseAttendanceSecond.xml");
                rptClassAttendance.Search(ds.Tables[0]);
                CurrentReport = "ClassAttendance";
            }
            catch (Exception ex)
            {
                WebMsg.Show("" + ex.Message.ToString());
            }
        }
        if (rpt.ID == "rptClassAttendance")
        {
            this.SchoolID = Convert.ToInt32(ddlSchool.SelectedValue.ToString());
            this.BMSID    = Convert.ToInt32(ViewState["BMSID"].ToString());
            this.Date     = Convert.ToDateTime(txtDate.Text);
            BindValuesToLabels();

            DataSet          ds             = new DataSet();
            ReportsForResult objRsultReport = new ReportsForResult();
            this.Obj_Dal_ClassroomWiseAttendance = new ClassroomWiseAttendance();

            ds = this.Obj_Dal_ClassroomWiseAttendance.GetAttendance(SchoolID, Date, BMSID);

            GetConnectionStringSTRING obj = new GetConnectionStringSTRING();
            connectionstring = obj.BAL_EpathshalaString();

            try
            {
                rptClassAttendance.XMLReportFile = Server.MapPath("../ReportXMLFiles/ClassroomWiseAttendanceSecond.xml");
                rptClassAttendance.Search(ds.Tables[0]);
                CurrentReport = "ClassAttendance";
            }
            catch (Exception ex)
            {
                WebMsg.Show("" + ex.Message.ToString());
            }
        }
    }