示例#1
0
    public void Fill_Chart_Data()
    {
        Student_DashBoard_BLogic obj_BAL_Student_Dashboard = new Student_DashBoard_BLogic();
        StudentDash obj_Student_Dashboard = new StudentDash();

        obj_Student_Dashboard.BMSID      = Convert.ToInt64(Session["BMSID"]);
        obj_Student_Dashboard.SubjectID  = Convert.ToInt16(Session["SubjectID"]);
        obj_Student_Dashboard.DivisionID = Convert.ToInt16(Session["DivisionID"]);
        obj_Student_Dashboard.StudentID  = Convert.ToInt64(AppSessions.StudentID);
        obj_Student_Dashboard.SchoolID   = Convert.ToInt64(Session["SchoolID"]);

        DataSet dsSelect = new DataSet();

        dsSelect = obj_BAL_Student_Dashboard.BAL_Select_Chart_Data(obj_Student_Dashboard);

        if (dsSelect.Tables[0].Rows.Count > ((int)EnumFile.AssignValue.Zero))
        {
            LblCoveredChapter.Visible   = true;
            LblUncoveredChapter.Visible = true;

            Int32 CoveredChapters   = Convert.ToInt32(dsSelect.Tables[0].Rows[0]["Covered"].ToString());
            Int32 UncoveredChapters = 100 - CoveredChapters;

            LblCoveredChapter.Width   = CoveredChapters * 2;
            LblUncoveredChapter.Width = UncoveredChapters * 2;


            lblCovered.Text   = Convert.ToString(CoveredChapters) + "%";
            lblUncovered.Text = Convert.ToString(UncoveredChapters) + "%";

            lblCovered1.Text   = Convert.ToString(CoveredChapters) + "%";
            lblUncovered1.Text = Convert.ToString(UncoveredChapters) + "%";
        }
        else
        {
            LblCoveredChapter.Visible   = false;
            LblUncoveredChapter.Visible = false;

            LblCoveredChapter.Text   = "";
            LblUncoveredChapter.Text = "";
        }
    }