public EventsController(EventInterface iEvent, GameInterface iGame, CharacterInterface iChar, AccountInterface iAcct)
 {
     eventInterface = iEvent;
     charInterface = iChar;
     gameInterface = iGame;
     accountInterface = iAcct;
 }
        public CommitResponse AddNewEventAttendee(int charID, int eventID, int roleID, string note, int status, int? memberID)
        {
            int memID = 0;
            if (memberID != null)
                memID = (int)memberID;
            else
            {
                Member Member = new AccountInterface(LeetRaidsDB).GetMemberByCharacterID(charID);
                memID = Member.MemberID;
            }

            EventAttendee attendee = new EventAttendee()
            {
                CharacterID = charID,
                EventID = eventID,
                RoleID = roleID,
                Note = String.Empty,
                Status = status,
                MemberID = memID
            };

            bool success = false;

            try
            {

                if (IsMemberAlreadyAttendee(eventID, memID))
                {
                    return new CommitResponse() { success = false, errorMsg = Errors.MEMBER_ALREADY_HAS_CHARACTER_IN_EVENT };
                }
                LeetRaidsDB.EventAttendees.InsertOnSubmit(attendee);
                LeetRaidsDB.SubmitChanges();
                success = true;
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return new CommitResponse() { success = success };
        }
 public AccountController(AccountInterface currentAccountInterface, GameInterface currentGameInterface, CharacterInterface currentCharInterface)
 {
     accountInterface = currentAccountInterface;
     gameInterface = currentGameInterface;
     charInterface = currentCharInterface;
 }