public override bool IsPersonInPersonType(Person person, PersonType personType) { using (var transaction = new TransactionScope(_configuration)) { var pptDS = new PersonPersonTypeDataStore(transaction); IList <PersonPersonType> peoples = pptDS.FindPersonByPersonType(personType.Id); IEnumerable <PersonPersonType> q = from x in peoples where x.Person.Id.Equals(person.Id) select x; if (q.Count() > 0) { return(true); } else { return(false); } } }
public override void UpdatePersonType(PersonType personType) { //Check required for MSDN if (string.IsNullOrEmpty(personType.Name)) { throw new ProviderException("PersonType name cannot be empty or null."); } if (personType.Name.IndexOf(',') > 0) { throw new ArgumentException("PersonType names cannot contain commas."); } using (var transaction = new TransactionScope(_configuration)) { var ptDS = new PersonTypeDataStore(transaction); ptDS.Update(personType); transaction.Commit(); } }
public static bool IsPersonInPersonType(Person person, PersonType personType) { if (person == null) { throw new ArgumentNullException("person"); } if (personType == null) { throw new ArgumentNullException("personType"); } if (string.IsNullOrEmpty(person.Id)) { throw new ArgumentNullException("person.Id"); } if (string.IsNullOrEmpty(personType.Id)) { throw new ArgumentNullException("personType.Id"); } return(Provider.IsPersonInPersonType(person, personType)); }
public static IList <Person> GetAllPersonsByPersonType(PersonType personType) { return(Provider.GetAllPersonsByPersonType(personType)); }
public abstract IList <PersonTypeRole> GetPersonTypeRolesByPersonType(PersonType personType);
public abstract IList <Person> GetAllPersonsByPersonType(PersonType personType);
public abstract void UpdatePersonType(PersonType personType);
public abstract void CreatePersonType(PersonType personType);
public abstract bool IsPersonInPersonType(Person person, PersonType personType);