public EditViewModel(ProjectFirmaModels.Models.ProjectImage projectImage) { Caption = projectImage.Caption; Credit = projectImage.Credit; ProjectImageTimingID = projectImage.ProjectImageTimingID; ExcludeFromFactSheet = projectImage.ExcludeFromFactSheet; }
public virtual void UpdateModel(ProjectFirmaModels.Models.ProjectImage projectImage, FirmaSession currentFirmaSession) { projectImage.Caption = Caption; projectImage.Credit = Credit; projectImage.ProjectImageTimingID = ProjectImageTimingID; projectImage.ExcludeFromFactSheet = ExcludeFromFactSheet; }
public override void UpdateModel(ProjectFirmaModels.Models.ProjectImage projectImage, FirmaSession currentFirmaSession) { base.UpdateModel(projectImage, currentFirmaSession); projectImage.FileResourceInfo = FileResourceModelExtensions.CreateNewFromHttpPostedFileAndSave(FileResourceData, currentFirmaSession); if (projectImage.Project.ProjectImages.All(x => x.ProjectImageID == projectImage.ProjectImageID)) { projectImage.IsKeyPhoto = true; } }