//NOT FOR LOGIN PROXY!! public static void MakeAdmin(int memberId) { Member member = ConnectionStubTemp.getMember(memberId); Password.Password passOrig = ConnectionStubTemp.pHandler.GetPasswordForMember(memberId); Password.Password passCopy = new Password.Password(passOrig); SystemAdmin newsys = new SystemAdmin(member); ConnectionStubTemp.removeMember(member); ConnectionStubTemp.addMemberJustForExternalUsage(newsys, new Password.Password(passCopy)); }
public static void addMemberJustForExternalUsage(Member m, Password.Password pass) { try { AddMember(m); pass.memberId = m.id; pHandler.Add(pass); //members.Add(m.id, m); //mapIDUsermane.Add(m.username, m.id); } catch (WorkShopDbException dbExc) { throw dbExc; } catch (Exception ignore) { throw new Exception("this should not happen, member couldn't be added"); } }