public BcUserInfoEntity GetBcUserInfoWithPermission(string userAccount)
        {
            var entity = EntityExecution.ReadEntity2<BcUserInfoEntity>(n => n.UserAccount == userAccount && n.ActivityFlag == true && n.DeleteFlag == false);

            //��ȡ�û��Ľ�ɫ
            var userRoleList = new BcUserRoleBiz().GetBcUserRoleList(entity.UserId);
            entity.RoleList = new List<BcRoleEntity>();
            foreach (BcUserRoleEntity userRoleEntity in userRoleList)
            {
                entity.RoleList.Add(new BcRoleEntity() { RoleId = userRoleEntity.RoleId, RoleName = userRoleEntity.RoleName });
            }

            //��ȡ�û��Ƿ�Ϊ��������Ա
            entity.IsSuperAdmin = new SysGlobalSettingBiz().IsSuperAdmin(entity.UserAccount);

            //��ȡ�û���Ȩ��
            if (entity.IsSuperAdmin)
            {
                //����dz�������Ա����ȡ����Ȩ��
                entity.PermisionList = new List<PermissionEntity>();
                var sysRelationList = new SysRelationBiz().GetEnabledSysRelationList();
                foreach (SysRelationEntity sysRelationEntity in sysRelationList)
                {
                    entity.PermisionList.Add(new PermissionEntity()
                    {
                        ModuleId = sysRelationEntity.ModuleId,
                        FuncPointId = sysRelationEntity.FuncPointId,
                        PermissionList = sysRelationEntity.PermissionList
                    });
                }
            }
            else
            {
                //������dz�������Ա����ȡ�û�Ȩ�޺ͽ�ɫȨ��
                var bcPermissionBiz = new BcPermissionBiz();

                //1����ȡ�û�Ȩ��
                entity.PermisionList = new List<PermissionEntity>();
                var bcUserPermissionList = bcPermissionBiz.GetEnabledBcPermissionList(2, entity.UserId);
                foreach (BcPermissionEntity bcPermissionEntity in bcUserPermissionList)
                {
                    entity.PermisionList.Add(new PermissionEntity()
                    {
                        ModuleId = bcPermissionEntity.ModuleId,
                        FuncPointId = bcPermissionEntity.FuncPointId,
                        PermissionList = bcPermissionEntity.Permissions.Split(',').ToList()
                    });
                }

                //2����ȡ��ɫȨ��
                foreach (BcRoleEntity bcRoleEntity in entity.RoleList)
                {
                    var bcRolePermissionList = bcPermissionBiz.GetEnabledBcPermissionList(1, bcRoleEntity.RoleId);
                    foreach (BcPermissionEntity bcPermissionEntity in bcRolePermissionList)
                    {
                        var list = entity.PermisionList.Where(n => n.ModuleId == bcPermissionEntity.ModuleId && n.FuncPointId == bcPermissionEntity.FuncPointId).ToList();
                        if (list.Count > 0)
                        {
                            var pcList = bcPermissionEntity.Permissions.Split(',').ToList();
                            foreach (string s in pcList)
                            {
                                if (!list[0].PermissionList.Contains(s))
                                    list[0].PermissionList.Add(s);
                            }
                        }
                        else
                        {
                            entity.PermisionList.Add(new PermissionEntity()
                            {
                                ModuleId = bcPermissionEntity.ModuleId,
                                FuncPointId = bcPermissionEntity.FuncPointId,
                                PermissionList = bcPermissionEntity.Permissions.Split(',').ToList()
                            });
                        }
                    }
                }
            }

            //�����û�Ȩ�ޣ���ȡ�û��IJ˵��б�
            entity.MenuList = new SysMenuBiz().GetEnabledSysMenuListByPermission(entity.PermisionList);

            return entity;
        }
 private void FillFormData()
 {
     try
     {
         this.hdUserId.Value = Request["id"];
         BcUserInfoEntity entity = Biz.GetSingleBcUserInfo(int.Parse(this.hdUserId.Value));
         if (entity != null)
         {
             this.hdUserId.Value = entity.UserId.ToString();
             this.txtUserAccount.Text = entity.UserAccount.ToString();
             this.txtPassword.Text = entity.Password.ToString();
             this.txtUserName.Text = entity.UserName.ToString();
             this.rMale.Checked = (bool)entity.Sex;
             this.rFemale.Checked = !(bool)entity.Sex;
             this.txtOfficePhone.Text = entity.OfficePhone.ToString();
             this.txtMobilePhone.Text = entity.MobilePhone.ToString();
             this.txtEmail.Text = entity.Email.ToString();
             this.rEnable.Checked = (bool)entity.ActivityFlag;
             this.rDisable.Checked = !(bool)entity.ActivityFlag;
             this.ddlGroup.SelectedValue = entity.GroupId.ToString();
             this.txtUserAccount.Enabled = false;
             var list = new BcUserRoleBiz().GetBcUserRoleList(int.Parse(this.hdUserId.Value));
             if (list != null && list.Count > 0)
             {
                 this.hdRoleIds.Value = string.Join(",", list.Select(n => n.RoleId.ToString()).ToArray());
             }
         }
     }
     catch (Exception ex) { this.lMessage.Text = string.Format("数据加载失败,原因:{0}", ex.Message); }
 }