Esempio n. 1
0
        //true on succsess exception if somthing went wrong
        public bool disapproveOwnershipRequest(int requestId)
        {
            OwnershipRequest ownershipRequest = ConnectionStubTemp.GetOwnershipRequest(requestId);

            ownershipRequest.approveOrDisapprovedOwnership(-1, this);
            return(true);
        }
Esempio n. 2
0
 public static void UpdateOwnershipRequest(OwnershipRequest entity)
 {
     if (useStub())
     {
         return;
     }
     repo.Update <OwnershipRequest>(entity);
 }
Esempio n. 3
0
 public static void AddOwnershipRequest(OwnershipRequest entity)
 {
     if (useStub())
     {
         getOwnershipRequestDbStub().Add(entity);
         return;
     }
     repo.Add <OwnershipRequest>(entity);
 }
Esempio n. 4
0
        /*** 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());
        }
Esempio n. 5
0
 public static void deleteOwnershipRequest(OwnershipRequest ownership)
 {
     RemoveOwnershipRequest(ownership.ID);
 }