Esempio n. 1
0
 /// <summary>
 /// 新增一个用户的某个控制器域权限
 /// </summary>
 /// <param name="userID"></param>
 /// <param name="controlID"></param>
 public void CreateDomainPrivilege(string userID, string controlID)
 {
     Privilege newPrivilege = new Privilege();
     newPrivilege.PrivilegeAccess = ServiceConstant.SYS_ACCESS_TYPE_DEVICE_DOMAIN;
     newPrivilege.PrivilegeAccessValue = controlID;
     newPrivilege.PrivilegeMaster = ServiceConstant.SYS_MASTER_TYPE_USER;
     newPrivilege.PrivilegeMasterValue = userID;
     newPrivilege.PrivilegeOperation = ServiceConstant.SYS_OPRATION_VALUE_VISIBLE;
     privilegeDao.create(newPrivilege);
 }
Esempio n. 2
0
 /// <summary>
 /// 根据用户ID获取 主菜单
 /// </summary>
 /// <param name="userid"></param>
 /// <returns></returns>
 public AbstractDataSource<Privilege> getPrivilegeList(Privilege filter)
 {
     List<QueryCondition> conditionList = new List<QueryCondition>();
        AbstractDataSource<Privilege> dataSource = new DatabaseSourceImpl<Privilege>(conditionList);
        return dataSource;
 }