Exemplo n.º 1
0
        private void BindGrid2()
        {
            bool isGroup = PrjPub.CurrentStudent.IsGroupLearder;
            int  tech    = PrjPub.CurrentStudent.TechnicianTypeID;

            CoursewareBLL coursewareBLL = new CoursewareBLL();
            IList <RailExam.Model.Courseware> coursewareList = coursewareBLL.GetEmployeeStudyCoursewareInfo(Convert.ToInt32(ViewState["TrainTypeID"].ToString()), PrjPub.CurrentStudent.OrgID, PrjPub.CurrentStudent.PostID, isGroup, tech, 5);

            if (coursewareList.Count > 0)
            {
                foreach (RailExam.Model.Courseware courseware in coursewareList)
                {
                    courseware.ToolTip = courseware.CoursewareName;
                    if (courseware.CoursewareName.Length <= 13)
                    {
                        courseware.CoursewareName = courseware.CoursewareName;
                    }
                    else
                    {
                        courseware.CoursewareName = courseware.CoursewareName.Substring(0, 13) + "...";
                    }
                }
            }

            gvCourse.DataSource = coursewareList;
            gvCourse.DataBind();
        }