public System.DirectoryServices.Protocols.ResultCode AddUserToAdamGroup(Entities.User user, AdamConnetion.AdamServer adamServer, string group) { try { AdamHelper adamHelper = new AdamHelper(adamServer.ServerIP, adamServer.ServerPort, adamServer.UsersDistinguishedName, adamServer.GetCredential()); return adamHelper.AddUserToGroup(user.UserNameWithoutMembership, group); } catch (Exception ex) { throw ex; } }
public void DeleteUserAdam(string profile, AdamConnetion.AdamServer adamServer) { try { AdamHelper adamHelper = new AdamHelper(adamServer.ServerIP, adamServer.ServerPort, adamServer.UsersDistinguishedName, adamServer.GetCredential()); if (adamHelper.UserExist(profile)) { adamHelper.DeleteUser(profile); } } catch (Exception ex) { throw ex; } }
public bool UserExistAdam(AdamConnetion.AdamServer adamServer, Entities.User user) { try { AdamHelper adamHelper = new AdamHelper(adamServer.ServerIP, adamServer.ServerPort, adamServer.UsersDistinguishedName, adamServer.GetCredential()); return adamHelper.UserExist(user.UserNameWithoutMembership); } catch (Exception ex) { throw ex; } }
public System.DirectoryServices.Protocols.ResultCode CreateUserAdam(Entities.User user, AdamConnetion.AdamServer adamServer) { try { AdamHelper adamHelper = new AdamHelper(adamServer.ServerIP, adamServer.ServerPort, adamServer.UsersDistinguishedName, adamServer.GetCredential()); return adamHelper.CreateUser(user.UserNameWithoutMembership, user.FullName, user.Password); } catch (Exception ex) { throw ex; } }