public class Person : BALBase
{
public PersonDTO Data { get; set; }
public Person()
{
this.Data = new PersonDTO();
}
public Person(PersonDTO dto)
{
this.Data = dto;
}
public override List Validate()
{
Val_Name();
Val_Email();
Val_Password();
Val_TimeZone();
Val_City();
Val_State();
Val_ZipCode();
Val_ImType();
return this.ValidationErrors;
}
public bool Val_Name()
{
if (this.Data.Name == DTOBase.String_NullValue)
{
this.ValidationErrors.Add(
new ValidationError("Person.Name", " est requis")
);
return false;
}
else
{
return true;
}
}
}