private void loadEducation()
 {
     Education = new DataTable();
     Education.Columns.Add("Achievement");
     Education.Columns.Add("Institute");
     Education.Columns.Add("Year");
     GridEducation.DataSource = EmergencyContact;
     GridEducation.DataBind();
 }
示例#2
0
        private void LoadEducation()
        {
            int id = GetQueryIntValue("id");
            IQueryable <Infobasis.Data.DataEntity.EmployeeEducation> q = DB.EmployeeEducations;

            q = q.Where(item => item.UserID == id);

            // 在查询添加之后,排序和分页之前获取总记录数
            GridEducation.RecordCount = q.Count();

            // 排列和数据库分页
            q = SortAndPage <Infobasis.Data.DataEntity.EmployeeEducation>(q, GridEducation);

            GridEducation.DataSource = q;
            GridEducation.DataBind();
        }