public override bool IsPersonInPersonTypeAdmin(Person person)
        {
            using (var transaction = new TransactionScope(_configuration))
            {
                var        ds = new PersonTypeDataStore(transaction);
                PersonType adminPersonType = ds.FindByName(BusiBlocksConstants.AdministratorsGroup);

                if (adminPersonType == null)
                {
                    return(false);
                }

                var pds = new PersonPersonTypeDataStore(transaction);
                IList <PersonPersonType> personTypes = pds.FindByPersonAndPersonType(person.Id, adminPersonType.Id);

                if (personTypes.Count > 0)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
        }
        public override void DeletePersonFromPersonType(string personId, string personTypeId)
        {
            // Delete a record in the PersonPersonType table.
            using (var transaction = new TransactionScope(_configuration))
            {
                var pptDS = new PersonPersonTypeDataStore(transaction);
                IList <PersonPersonType> ppts = pptDS.FindByPersonAndPersonType(personId, personTypeId);

                foreach (PersonPersonType item in ppts)
                {
                    item.Deleted = true;
                    pptDS.Update(item);
                }

                transaction.Commit();
            }
        }