public void SetSportsEvent(SportsEvent ar) { _editingSportsEvent = ar; if (SportsEvent != null) { SportsEvent.ErrorsChanged -= RaiseCanExecuteChanged; } SportsEvent = new DtoSportsEvent(); SportsEvent.ErrorsChanged += RaiseCanExecuteChanged; CopySportsEvent(ar, SportsEvent); }
private void UpdateSportsEvent(DtoSportsEvent source, SportsEvent target) { source.Gender = target.Gender; source.Gender = target.Gender; source.GenderId = target.GenderId; source.Location = target.Location; source.LocationId = target.LocationId; source.Organizer = target.Organizer; source.OrganizerId = target.OrganizerId; source.Schedule = target.Schedule; source.ScheduleId = target.ScheduleId; source.Sport = target.Sport; source.SportId = target.SportId; }
private void CopySportsEvent(SportsEvent source, DtoSportsEvent target) { target.Id = source.Id; if (EditMode) { source.Gender = target.Gender; source.GenderId = target.GenderId; source.Location = target.Location; source.LocationId = target.LocationId; source.Organizer = target.Organizer; source.OrganizerId = target.OrganizerId; source.Schedule = target.Schedule; source.ScheduleId = target.ScheduleId; source.Sport = target.Sport; source.SportId = target.SportId; } }