55 lines
1.6 KiB
C#
55 lines
1.6 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace EnVisage.Models
|
|
{
|
|
public class StrategicGoalModel : IBaseModel<StrategicGoal>
|
|
{
|
|
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<Guid> CompanyId { get; set; }
|
|
|
|
/// <summary>
|
|
/// Copies data from model to DAL object.
|
|
/// </summary>
|
|
/// <param name="dbObj">A target DAL object.</param>
|
|
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;
|
|
}
|
|
}
|
|
} |