using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Web.DynamicData; using Aspnet.Samples.DynamicData; namespace TicketCenter_Data { [MetadataType(typeof(TicketsAllocationMetadata))] [Security(Role = "Users", Action = "Details")] [Security(Role = "Users", Action = "List")] public partial class TicketsAllocation { } //[TableName("Ticket Allocation")] //Custom Page will not execute when comment is removed public class TicketsAllocationMetadata { // Override the display name [DisplayName("Tickets Issued")] public object TicketsIssued { get; set; } [DisplayName("Total Tickets Sold")] public object TotalTicketsSold { get; set; } [DisplayName("Tickets Commited")] //[Editable(false)] // Make it Read Only public object TicketsCommited { get; set; } [DisplayName("Tickets Remaining")] [ScaffoldColumn(true)] // This entry is required to display SQL calculated field public object TicketsRemaining { get; set; } } }