Ejemplo n.º 1
0
 public static void FillPersonViewModel(Practice practice, Person person, PersonViewModel viewModel)
 {
     viewModel.BirthPlace = person.BirthPlace;
     viewModel.FullName = person.FullName;
     viewModel.Gender = person.Gender;
     viewModel.MaritalStatus = person.MaritalStatus;
     viewModel.Ethnicity = person.Ethnicity;
     viewModel.Schooling = person.Schooling;
     viewModel.FatherName = person.FatherName;
     viewModel.FatherProfession = person.FatherProfession;
     viewModel.MotherName = person.MotherName;
     viewModel.MotherProfession = person.MotherProfession;
     viewModel.DateOfBirth = ConvertToLocalDateTime(practice, person.DateOfBirth);
     viewModel.Profissao = person.Profession;
     viewModel.Cpf = person.CPF;
     viewModel.Rg = person.RG;
     viewModel.Email = person.Email;
     viewModel.PhoneCell = person.PhoneCell;
     viewModel.PhoneLand = person.PhoneLand;
 }
 /// <summary>
 /// Create a new Person object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="fullName">Initial value of the FullName property.</param>
 /// <param name="createdOn">Initial value of the CreatedOn property.</param>
 /// <param name="dateOfBirth">Initial value of the DateOfBirth property.</param>
 /// <param name="gender">Initial value of the Gender property.</param>
 /// <param name="practiceId">Initial value of the PracticeId property.</param>
 public static Person CreatePerson(global::System.Int32 id, global::System.String fullName, global::System.DateTime createdOn, global::System.DateTime dateOfBirth, global::System.Int16 gender, global::System.Int32 practiceId)
 {
     Person person = new Person();
     person.Id = id;
     person.FullName = fullName;
     person.CreatedOn = createdOn;
     person.DateOfBirth = dateOfBirth;
     person.Gender = gender;
     person.PracticeId = practiceId;
     return person;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the People EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToPeople(Person person)
 {
     base.AddObject("People", person);
 }