private void BindGridCourseByCoursewareTypeID()
        {
            int postID;

            if (!Int32.TryParse(ViewState["PostID"].ToString(), out postID))
            {
                return;
            }

            int typeID = Convert.ToInt32(ViewState["KnowledgeID"]);
            int orgID  = PrjPub.CurrentStudent.OrgID;
            int techID = PrjPub.CurrentStudent.TechnicianTypeID;
            int leader = PrjPub.CurrentStudent.IsGroupLearder ? 1 : 0;

            CoursewareBLL coursewareBLL = new CoursewareBLL();
            IList <RailExam.Model.Courseware> coursewareList = coursewareBLL.GetStudyCoursewareInfoByTypeID(typeID, orgID, postID, leader, techID, 0);

            if (coursewareList.Count > 0)
            {
                foreach (RailExam.Model.Courseware courseware in coursewareList)
                {
                    courseware.CoursewareName = "<a onclick=OpenCourse('" + courseware.CoursewareID + "')  href=#  title=" + courseware.CoursewareName + ">" + courseware.CoursewareName + "</a>";
                }
                Grid2.DataSource = coursewareList;
                Grid2.DataBind();
            }
        }
Example #2
0
        private void BindGridByCoursewareTypeID()
        {
            int typeID = Convert.ToInt32(ViewState["CoursewareTypeID"].ToString());
            int postID = Convert.ToInt32(ViewState["PostID"].ToString());
            int orgID  = Convert.ToInt32(ViewState["OrgID"].ToString());
            int techID = Convert.ToInt32(ViewState["Tech"].ToString());
            int leader = Convert.ToInt32(ViewState["Leader"].ToString());

            CoursewareBLL coursewareBLL = new CoursewareBLL();
            IList <RailExam.Model.Courseware> coursewareList = coursewareBLL.GetStudyCoursewareInfoByTypeID(typeID, orgID, postID, leader, techID, 0);


            if (coursewareList.Count > 0)
            {
                foreach (RailExam.Model.Courseware courseware in coursewareList)
                {
                    //if (courseware.CoursewareName.Length <= 15)
                    //{
                    courseware.CoursewareName = "<a onclick=OpenIndex('" + courseware.CoursewareID + "')  href=#  title=" + courseware.CoursewareName + ">" + courseware.CoursewareName + "</a>";
                    //}
                    //else
                    //{
                    //    courseware.CoursewareName = "<a onclick=OpenIndex('" + courseware.Url + "')  href=#  title=" + courseware.CoursewareName + ">" + courseware.CoursewareName.Substring(0, 15) + "...</a>";
                    //}
                }
                gvCourse.DataSource = coursewareList;
                gvCourse.DataBind();
            }
        }
Example #3
0
        private void BindGridCourseByCoursewareTypeID()
        {
            int typeID = Convert.ToInt32(ViewState["KnowledgeID"].ToString());
            int postID = Convert.ToInt32(ViewState["PostID"].ToString());
            int orgID  = Convert.ToInt32(ViewState["OrgID"].ToString());
            int techID = Convert.ToInt32(ViewState["Tech"].ToString());
            int leader = Convert.ToInt32(ViewState["Leader"].ToString());

            CoursewareBLL coursewareBLL = new CoursewareBLL();
            IList <RailExam.Model.Courseware> coursewareList = coursewareBLL.GetStudyCoursewareInfoByTypeID(typeID, orgID, postID, leader, techID, 0);

            if (coursewareList.Count > 0)
            {
                foreach (RailExam.Model.Courseware courseware in coursewareList)
                {
                    courseware.CoursewareName = "<a onclick=OpenCourse('" + courseware.CoursewareID + "')  href=#  title=" + courseware.CoursewareName + ">" + courseware.CoursewareName + "</a>";
                }
                Grid2.DataSource = coursewareList;
                Grid2.DataBind();
            }
        }
Example #4
0
        private void BindGridCourseByCoursewareTypeID()
        {
            int typeID = Convert.ToInt32(ViewState["KnowledgeID"]);

            CoursewareBLL coursewareBLL = new CoursewareBLL();
            IList <RailExam.Model.Courseware> coursewareList = coursewareBLL.GetCoursewaresByCoursewareTypeID(typeID, 200);

            if (ViewState["PostID"] != null && ViewState["PostID"].ToString() != "undefined")
            {
                int postID = Int32.Parse(ViewState["PostID"].ToString());
                coursewareList = coursewareBLL.GetStudyCoursewareInfoByTypeID(typeID, 200, postID, 0, 1, 0);
            }

            if (coursewareList.Count > 0)
            {
                foreach (RailExam.Model.Courseware courseware in coursewareList)
                {
                    courseware.CoursewareName = "<a onclick=OpenCourse('" + courseware.CoursewareID + "')  href=#  title=" + courseware.CoursewareName + ">" + courseware.CoursewareName + "</a>";
                }
                Grid2.DataSource = coursewareList;
                Grid2.DataBind();
            }
        }