public Person FindPerson(Person person) { if (String.IsNullOrEmpty(person.Email)) { throw new CodeCampAuthorizationException("Email is missing"); } return this.CodeCampDataService.FindPersonByEmail(person); }
private bool CheckIfCodeCampPersonExists(string emailAddress) { this.Person = CodeCampDataService.FindPersonByEmail(emailAddress); if (this.Person != null) { return true; } return false; }
private static bool ValidatePerson(Person person) { if (!String.IsNullOrEmpty(person.Email)) { throw new CodeCampAuthorizationException("Email is null or empty"); } if(!String.IsNullOrEmpty(person.Name)) { throw new CodeCampAuthorizationException("Name is null or empty"); } if(!String.IsNullOrEmpty(person.PasswordHash)) { throw new CodeCampAuthorizationException("PasswordHash is null or empty"); } return true; }
public void ResetAttendeePassword(Person person) { base.ResetPeoplePassword(person); }
public Person FindPersonByEmail(Person person) { return base.GetPersonByEmail(person.Email); }
public void AddPerson(Person person) { base.InsertPerson(person); }
public void AddPerson(Person person) { if (!ValidatePerson(person)) this.CodeCampDataService.AddPerson(person); }
/// <summary> /// Deprecated Method for adding a new object to the People EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToPeople(Person person) { base.AddObject("People", person); }
/// <summary> /// Create a new Person object. /// </summary> /// <param name="id">Initial value of the Id property.</param> /// <param name="firstName">Initial value of the FirstName property.</param> /// <param name="lastName">Initial value of the LastName property.</param> /// <param name="email">Initial value of the Email property.</param> /// <param name="passwordHash">Initial value of the PasswordHash property.</param> public static Person CreatePerson(global::System.Int32 id, global::System.String firstName, global::System.String lastName, global::System.String email, global::System.String passwordHash) { Person person = new Person(); person.Id = id; person.FirstName = firstName; person.LastName = lastName; person.Email = email; person.PasswordHash = passwordHash; return person; }