public override void RenderPage()
    {

        try
        {

            if (dropModuleTypeID.Items.Count == 0)
            {
                MessageDialog("没有此用户类型绑定的模块类型", "SuperUserList.aspx");
                return;
            }

            hidPowerModuleTypeID.Value = dropModuleTypeID.SelectedValue;
            litUserName.Text = objUserRule.Sys_User.FirstOrDefault(s => s.UserID == UserID).UserName;
            XmlDataSource.Data = objPowerRule.GetPowerTreexXmlText(dropModuleTypeID.SelectedValue, CurrentUser.IsSuper);
            if (UserID.IsNoNull())
            {
                // 取得角色权限
                tvwPower.SetSelectValue(objUserRule.GetUserKeyPower(UserID, dropModuleTypeID.SelectedValue, AuthorizeGroupID), false);
            }
            tvwPower.DataBind();
        }
        catch
        {

        }

    }
Exemple #2
0
 public override void RenderPage()
 {
     try
     {
         UserRule objUserRule = new UserRule();
         litUserName.Text = objUserRule.Sys_User.FirstOrDefault(s => s.UserID == UserID).UserName;
         sys_authorizegroup objsys_authorizegroup = objUserRule.sys_authorizegroup.First(s => s.AuthorizeGroupID == AuthorizeGroupID);
         hidPowerModuleTypeID.Value = objsys_authorizegroup.ModuleTypeID;
         if (objsys_authorizegroup.IsSupertGroup)
         {
             XmlDataSource.Data = objPowerRule.GetPowerTreexXmlText(objsys_authorizegroup.ModuleTypeID, CurrentUser.IsSuper);
         }
         else
         {
             XmlDataSource.Data = objPowerRule.GetPowerTreexXmlText(objsys_authorizegroup.ModuleTypeID, objsys_authorizegroup.AuthorizeGroupID);
         }
         if (UserID.IsNoNull())
         {
             // 取得角色权限
             tvwPower.SetSelectValue(objUserRule.GetUserKeyPower(UserID, objsys_authorizegroup.ModuleTypeID, AuthorizeGroupID), false);
         }
         tvwPower.DataBind();
     }
     catch
     {
     }
 }
Exemple #3
0
    public override void InitDataPage()
    {
        dropUserTypeCID.Items.Clear();

        foreach (Sys_UserType objSys_UserType in objUserRule.Sys_UserType.Where(s => UserTypeList.Contains(s.UserTypeID)))
        {
            dropUserTypeCID.Items.Add(new ListItem(objSys_UserType.UserTypeName, objSys_UserType.UserTypeID.ToString()));
        }
        List <Sys_Role> objSys_RoleList = objUserRule.Sys_Role.WhereCondition("it.AuthorizeGroupID='" + AuthorizeGroupID + "'  and it.IsSystem=false and it.IsUserRole=false").ToList();

        if (UserID.IsNoNull())
        {
            List <string> RoleIDList = objUserRule.Sys_RoleUser.Where(s => s.UserID == UserID).Select(s => s.RoleID).ToList();
            if (RoleIDList.Count > 0)
            {
                foreach (Sys_Role objSys_Role in objSys_RoleList.Where(s => RoleIDList.Contains(s.RoleID)).OrderByDescending(s => s.CreateDate))
                {
                    chkRoleList.Items.Add(new ListItem()
                    {
                        Text = objSys_Role.RoleName, Value = objSys_Role.RoleID, Selected = true
                    });
                }
                foreach (Sys_Role objSys_Role in objSys_RoleList.Where(s => !RoleIDList.Contains(s.RoleID)).OrderByDescending(s => s.CreateDate))
                {
                    chkRoleList.Items.Add(new ListItem()
                    {
                        Text = objSys_Role.RoleName, Value = objSys_Role.RoleID
                    });
                }
            }
            else
            {
                foreach (Sys_Role objSys_Role in objSys_RoleList)
                {
                    chkRoleList.Items.Add(new ListItem()
                    {
                        Text = objSys_Role.RoleName, Value = objSys_Role.RoleID
                    });
                }
            }
        }
        else
        {
            foreach (Sys_Role objSys_Role in objSys_RoleList)
            {
                chkRoleList.Items.Add(new ListItem()
                {
                    Text = objSys_Role.RoleName, Value = objSys_Role.RoleID
                });
            }
        }
    }
Exemple #4
0
    public override void RenderPage()
    {
        chkIsSuper.Enabled = CurrentUser.IsSuper;
        if (UserID.IsNoNull())
        {
            objUser                     = objUserRule.Sys_User.First(p => p.UserID == UserID);
            txtPassword.Enabled         = false;
            txtPassword.CheckValueEmpty = false;
            Page.DataBind();
        }

        else
        {
            chkIsApprove.Checked = true;
        }
    }
Exemple #5
0
 public override void RenderPage()
 {
     if (UserID.IsNoNull())
     {
         trPassword.Visible      = false;
         trtTruePassword.Visible = false;
         objUser = objUserRule.Sys_User.FirstOrDefault(p => p.UserID == UserID);
         chkRoleList.SetSelectValue(objUserRule.GetUserRole(UserID));
         txtPassword.Enabled         = false;
         txtPassword.CheckValueEmpty = false;
         Page.DataBind();
     }
     else
     {
         trPassword.Visible      = true;
         trtTruePassword.Visible = true;
     }
 }