Example #1
0
        public Boolean SaveContact(StibContact stibContact)
        {
            StibContactDataContext db = new StibContactDataContext();
            stibContact.ID = Guid.NewGuid();

            if (!IsValidStibContact(stibContact))
                throw new InvalidContactInfoException("Er is niet voldoende informatie om de contactinfo op te slaan.");

            db.StibContacts.InsertOnSubmit(stibContact);
            try
            {
                db.SubmitChanges();
                return true;
            }
            catch
            {
                return false;
            }
        }
Example #2
0
 public StibContactManager(StibContactDataContext dataContext)
 {
     stibContactDataContext = dataContext;
 }
Example #3
0
 public StibContactManager()
 {
     stibContactDataContext = new StibContactDataContext();
 }