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()); }
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); } } } }
public IList <string> GetExistsUser(string id, string tableName) { PrivUserRoleService service = new PrivUserRoleService(); return(service.GetUserByRole(id)); }