using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Web.DynamicData; using Aspnet.Samples.DynamicData; namespace TicketCenter_Data { [Security(Role = "Users", Action = "Details")] [Security(Role = "Users", Action = "Edit")] [Security(Role = "Users", Action = "Insert")] [Security(Role = "Users", Action = "List")] [MetadataType(typeof(BankDepositMetadata))] public partial class BankDeposit { } [TableName("Bank Deposit")] public class BankDepositMetadata { //Override the display name [DisplayName("Date Deposit")] [DefaultValue("mm-dd-yyyy")] [DisplayFormat(DataFormatString = "{0:MM-dd-yyyy}")] [UIHint("CalendarDateTime")] public object DateDeposit { get; set; } [DisplayName("Amount Deposit")] [DisplayFormat(DataFormatString = "{0:c}")] public object AmountDeposit { get; set; } [DisplayName("Reference Number")] public object ReferenceNumber { get; set; } } }