Esempio n. 1
0
        /// <summary>
        /// 获得列表
        /// </summary>
        /// <param name="userInfo">用户</param>
        /// <param name="parentId">父亲节点主键</param>
        /// <returns>数据表</returns>
        public DataTable GetErrorDataTable(BaseUserInfo userInfo, string parentId)
        {
            var dt = new DataTable(BaseOrganizeEntity.TableName);

            var parameter = ServiceInfo.Create(userInfo, MethodBase.GetCurrentMethod());

            ServiceUtil.ProcessUserCenterReadDb(userInfo, parameter, (dbHelper) =>
            {
                // 这里可以缓存起来,提高效率
                var manager         = new BaseOrganizeManager(dbHelper, userInfo);
                dt                  = manager.GetErrorDataTable(parentId);
                dt.DefaultView.Sort = BaseOrganizeEntity.FieldSortCode;
                dt.TableName        = BaseOrganizeEntity.TableName;
            });
            return(dt);
        }