Exemplo n.º 1
0
    /// <summary>
    /// 绑定已经有的权限
    /// </summary>
    /// <param name="groupid"></param>
    private void EditGroupBang(int groupid)
    {
        GroupAuthorityDAL     bga  = Leyp.SQLServerDAL.Factory.getGroupAuthorityDAL();
        List <GroupAuthority> list = bga.getALLGroupAuthorityByGroupID(groupid);

        for (int i = 0; i <= AuthorityList.Rows.Count - 1; i++)
        {
            int id = Convert.ToInt32(AuthorityList.DataKeys[i].Value.ToString());
            for (int j = 0; j < list.Count; j++)
            {
                if (id == list[j].AuthorityID)
                {
                    CheckBox cbox = (CheckBox)AuthorityList.Rows[i].FindControl("CheckBox1");

                    cbox.Checked = true;
                }
            }
        }
    }
Exemplo n.º 2
0
 /// <summary>
 /// 根据GroupID 返回权限组
 /// </summary>
 /// <param name="GroupID">GroupID</param>
 /// <returns>list</returns>
 public List <GroupAuthority> getALLGroupAuthorityByGroupID(int GroupID)
 {
     return(groupAuthority.getALLGroupAuthorityByGroupID(GroupID));
 }