public void fill_Covered_Chapters_Topics() { obj_BAL_Student_Dashboard = new Student_DashBoard_BLogic(); obj_Student_Dashboard = new StudentDash(); obj_Student_Dashboard.BMSID = Convert.ToInt64(Session["BMSID"]); obj_Student_Dashboard.SubjectID = Convert.ToInt16(Session["SubjectID"]); obj_Student_Dashboard.StudentID = Convert.ToInt64(Session["StudentID"]); DataSet dsSelect = new DataSet(); dsSelect = obj_BAL_Student_Dashboard.BAL_Select_Covered_Chapters_Topics(obj_Student_Dashboard); try { grdAttendance.DataSource = dsSelect.Tables[2]; grdAttendance.DataBind(); } catch { grdAttendance.DataSource = null; grdAttendance.DataBind(); } if (dsSelect.Tables.Count == ((int)EnumFile.AssignValue.One)) { if (dsSelect.Tables[0].Rows[0]["NoRecord"].ToString().Equals("0")) { lblLastChapterName.Text = "-"; lblLastTopicName.Text = "-"; } } else if (dsSelect.Tables.Count > ((int)EnumFile.AssignValue.Zero)) { if (dsSelect.Tables[0].Rows.Count > ((int)EnumFile.AssignValue.Zero)) { lblLastChapterName.Text = dsSelect.Tables[0].Rows[0]["Chapter"].ToString(); } else { lblLastChapterName.Text = "-"; } if (dsSelect.Tables[1].Rows.Count > ((int)EnumFile.AssignValue.Zero)) { lblLastTopicName.Text = dsSelect.Tables[1].Rows[0]["Topic"].ToString(); } else { lblLastTopicName.Text = "-"; } } else { lblLastChapterName.Text = "-"; lblLastTopicName.Text = "-"; } }