using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel; namespace Yavsc.Model.WorkFlow { /// /// Estimate. /// [Serializable] public class Estimate { /// /// Initializes a new instance of the class. /// public Estimate () { } /// /// Gets or sets the title. /// /// The title. [Required] [Display(ResourceType = typeof(LocalizedText),Name="Title")] public string Title { get; set; } /// /// Gets or sets the description. /// /// The description. [Required] [DisplayName("Description")] public string Description { get; set; } /// /// Gets or sets the responsible. /// /// The responsible. [Required] [DisplayName("Responsable")] public string Responsible { get; set; } /// /// Gets or sets the client. /// /// The client. [Required] [DisplayName("Client")] public string Client { get; set; } /// /// Gets or sets the identifier. /// /// The identifier. public long Id { get; set; } /// /// Gets the ciffer. /// /// The ciffer. [Display(ResourceType = typeof(LocalizedText),Name="Ciffer")] public decimal Ciffer { get { decimal total = 0; if (Lines == null) return total; foreach (Writting l in Lines) total += l.UnitaryCost * l.Count; return total; } } /// /// Gets or sets the lines. /// /// The lines. public Writting[] Lines { get; set; } } }