public List <StudentCourseEvaluation> GetAllCourseEvaluation()
        {
            var reader = dbHelper.GetCourseEvaluationByStudent(Constant.SP_GetCourseEvaluationByStudent);
            List <StudentCourseEvaluation> studentCourseEvalList = new List <StudentCourseEvaluation>();
            StudentCourseEvaluation        courseEval            = null;

            while (reader.Read())
            {
                courseEval = new StudentCourseEvaluation();
                courseEval.OpportunityID = Convert.ToInt32(reader["OpportunityID"]);

                courseEval.StudentID = Convert.ToInt32(reader["StudentID"]);

                courseEval.Name = reader["Name"].ToString();

                courseEval.FirstName = reader["FirstName"].ToString();

                courseEval.LastName = reader["LastName"].ToString();

                courseEval.SectionName = reader["SectionName"].ToString();

                studentCourseEvalList.Add(courseEval);
            }
            reader.Close();
            return(studentCourseEvalList);
        }
        public void DataBind()
        {
            StudentCourseEvaluation sce = new StudentCourseEvaluation();

            List <StudentCourseEvaluation> sceList = new List <StudentCourseEvaluation>();

            sceList = sce.GetAllCourseEvaluation();

            gvEvaluations.DataSource = sceList;
            gvEvaluations.DataBind();
        }
        protected void gvEvaluations_SelectedIndexChanged(object sender, EventArgs e)
        {
            //Get the button that raised the event
            HyperLink hlnkEval = (HyperLink )sender;
            // Get the row that contains this button
            GridViewRow gvr           = (GridViewRow)hlnkEval.NamingContainer;
            Label       OpportunityID = (Label)gvr.FindControl("lblOpportunityID");
            Label       StudentID     = (Label)gvr.FindControl("lblStudentID");

            StudentCourseEvaluation sce = new StudentCourseEvaluation();

            sce.OpportunityID = Convert.ToInt32(Session["OpportunityID"]);
            sce.StudentID     = Convert.ToInt32(Session["StudentID"]);



            // Response.Write("<script>window.open('~/CommunityPartnerContent/StudentEvaluation.aspx?OpportunityID='Convert.ToInt32 (Session["OpportunityID"]) ; 'StudentID=' Convert.ToInt32(Session["StudentID"]) );</script>");
        }
예제 #4
0
 protected void gvEvaluations_SelectedIndexChanged(object sender, EventArgs e)
 {
     StudentCourseEvaluation sce = new StudentCourseEvaluation();
 }