using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; namespace EnVisage.Models { public class StrategicGoalModel : IBaseModel { public Guid Id { get; set; } [Required] [MaxLength(100)] [Display(Name = "Goal")] public string Name { get; set; } [Display(Name = "Description")] public string Description { get; set; } [Display(Name = "Number of Projects")] public int NbrProjects { get; set; } [Required] [DataType(DataType.Date), DisplayFormat(DataFormatString = "{0:MM/dd/yy}", ApplyFormatInEditMode = true)] [Display(Name = "Start Date")] public DateTime? StartDate { get; set; } [Required] [DataType(DataType.Date), DisplayFormat(DataFormatString = "{0:MM/dd/yy}", ApplyFormatInEditMode = true)] [Display(Name = "End Date")] public DateTime? EndDate { get; set; } [Display(Name = "Color")] public string Color { get; set; } [UIHint("MultipleSelect")] [Display(Name = "Business Units")] public List CompanyId { get; set; } /// /// Copies data from model to DAL object. /// /// A target DAL object. public void CopyTo(StrategicGoal dbObj) { if (dbObj == null) throw new ArgumentNullException(); dbObj.Id = Id; dbObj.Name = Name; dbObj.Description = Description; dbObj.StartDate = StartDate; dbObj.EndDate = EndDate; dbObj.Color = Color; } } }