yavsc/SalesCatalog/Model/FormInput.cs

27 lines
535 B
C#
Raw Normal View History

2014-07-16 20:35:03 +02:00
using System;
using System.ComponentModel.DataAnnotations;
2014-07-16 20:35:03 +02:00
namespace SalesCatalog.Model
{
public abstract class FormInput: FormElement
{
/// <summary>
/// Gets or sets the identifier, unique in its Form.
/// </summary>
/// <value>
/// The identifier.
/// </value>
[Required]
[StringLength(256)]
2014-07-16 20:35:03 +02:00
public string Id { get; set; }
public abstract string Type { get; }
private string name=null;
[StringLength(256)]
2014-07-16 20:35:03 +02:00
public string Name { get { return name == null ? Id : name; } set { name = value; } }
2014-07-16 20:35:03 +02:00
}
}