/// /// Method to Update this Entry /// public void Update(PhotographerViewModel photographer) { Id = photographer.Id; Name = photographer.Name; Surname = photographer.Surname; Birthday = photographer.Birthday; Notes = photographer.Notes; }
public PictureViewModel(IPictureModel model) { if (model is PictureModel) { IPTC = new IPTCViewModel(model.IPTC); EXIF = new EXIFViewModel(model.EXIF); Photographer = new PhotographerViewModel(((PictureModel)model).Photographer); Camera = new CameraViewModel(model.Camera); EXIF.Camera = Camera; } if (model != null) { ID = model.ID; FileName = model.FileName; FilePath = GlobalInformation.Path + "\\" + FileName; DisplayName = FileName.Split('.')[0]; string name = model.FileName; string by = model.IPTC.ByLine; DisplayName = name + " (by " + Photographer.FirstName + " " + Photographer.LastName + ")"; } }