Beispiel #1
0
    protected string GetUserNameCsv(object roleId)
    {
        PrivUserRoleService privUserRoleService = new PrivUserRoleService();
        IList <string>      userByRole          = privUserRoleService.GetUserByRole(roleId.ToString());
        PTYhmcService       pTYhmcService       = new PTYhmcService();
        IList <string>      nameList            = pTYhmcService.GetNameList(userByRole);

        return(nameList.ToCsv());
    }
Beispiel #2
0
        public void AddUser(IList <string> idList, IList <string> userList, string tableName)
        {
            PrivUserRoleService service = new PrivUserRoleService();

            foreach (string str in userList)
            {
                foreach (string str2 in idList)
                {
                    PrivUserRole userRole = new PrivUserRole {
                        Id       = Guid.NewGuid().ToString(),
                        RoleId   = str2,
                        UserCode = str
                    };
                    if (!service.Exists(userRole))
                    {
                        service.Add(userRole);
                    }
                }
            }
        }
Beispiel #3
0
        public IList <string> GetExistsUser(string id, string tableName)
        {
            PrivUserRoleService service = new PrivUserRoleService();

            return(service.GetUserByRole(id));
        }