Created
December 10, 2013 19:46
-
-
Save nareshjois/7896928 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace TestApplication | |
{ | |
[ScaffoldTable(true)] | |
[MetadataType(typeof(Attributes.Project))] | |
public partial class Project | |
{ | |
} | |
[ScaffoldTable(true)] | |
[MetadataType(typeof(Attributes.Task))] | |
public partial class Task | |
{ | |
} | |
namespace Attributes | |
{ | |
public partial class Project | |
{ | |
[Required] | |
[StringLength(50, MinimumLength = 5)] | |
[Display(Name = "Project Name")] | |
public string ProjectName { get; set; } | |
} | |
public partial class Task | |
{ | |
[Required] | |
[Display(Name = "Project", Order = 0)] | |
public Project Project { get; set; } | |
[Required] | |
[Display(Name = "Employee Code", Order = 1, GroupName = "Employee")] | |
public string EmployeeCode { get; set; } | |
[Required] | |
[Display(Name = "Track Date", Order = 2, GroupName = "Date & Time")] | |
public DateTime TrackDate { get; set; } | |
[Required] | |
[Display(Name = "Hours", Order = 3, GroupName = "Date & Time")] | |
public decimal TaskHours { get; set; } | |
[Required] | |
[Display(Name = "Task Descriprion", Order = 4, GroupName = "Information")] | |
public string TaskDescriprion { get; set; } | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment