//true on succsess exception if somthing went wrong public bool disapproveOwnershipRequest(int requestId) { OwnershipRequest ownershipRequest = ConnectionStubTemp.GetOwnershipRequest(requestId); ownershipRequest.approveOrDisapprovedOwnership(-1, this); return(true); }
public static void UpdateOwnershipRequest(OwnershipRequest entity) { if (useStub()) { return; } repo.Update <OwnershipRequest>(entity); }
public static void AddOwnershipRequest(OwnershipRequest entity) { if (useStub()) { getOwnershipRequestDbStub().Add(entity); return; } repo.Add <OwnershipRequest>(entity); }
/*** END - SYSTEM ADMIN FUNCTIONS ***/ public static int createOwnershipRequest(Store store, Member memberThatOpenRequest, Member candidate) { OwnershipRequest newOwnership = new OwnershipRequest(store, candidate, memberThatOpenRequest); //foreach (KeyValuePair<int, Member> entry in members) foreach (Member m in GetMembers()) { //Member m = entry.Value; if (m.isStoresOwner(store.id)) { newOwnership.addOwner(m); } } AddOwnershipRequest(newOwnership); //add ownership request to list newOwnership.sendRequestsToOwners(store, memberThatOpenRequest.id, candidate.username, newOwnership.getID()); //should handle notifications newOwnership.approveOrDisapprovedOwnership(1, memberThatOpenRequest); //first approval of asker return(newOwnership.getID()); }
public static void deleteOwnershipRequest(OwnershipRequest ownership) { RemoveOwnershipRequest(ownership.ID); }