public static void SavePersonData(PersonDm person) { PersonData.SetValueInPersonData("FirstName", person.FirstName); PersonData.SetValueInPersonData("LastName", person.LastName); PersonData.SetValueInPersonData("Email", person.Email); PersonData.SetValueInPersonData("DateOfBirth", person.DateOfBirth); }
public static PersonDm Map(PersonVm vm) { var dm = new PersonDm { FirstName = vm.FirstName, LastName = vm.LastName, Email = vm.Email, DateOfBirth = Convert.ToDateTime(vm.DateOfBirth) }; return(dm); }
public static PersonDm GetPersonData() { var person = new PersonDm { FirstName = PersonData.GetValueFromPersonData <string>("FirstName"), LastName = PersonData.GetValueFromPersonData <string>("LastName"), Email = PersonData.GetValueFromPersonData <string>("Email"), DateOfBirth = PersonData.GetValueFromPersonData <DateTime>("DateOfBirth") }; return(person); }
public static PersonVm Map(PersonDm dm) { var vm = new PersonVm { FirstName = dm.FirstName, LastName = dm.LastName, Email = dm.Email, DateOfBirth = dm.DateOfBirth.ToString("MM/dd/yyyy") }; return(vm); }