yavsc/yavscModel/WorkFlow/Estimate.cs

43 lines
897 B
C#

10 years ago
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;
10 years ago
10 years ago
namespace Yavsc.Model.WorkFlow
10 years ago
{
[Serializable]
public class Estimate
10 years ago
{
public Estimate ()
{
}
[Required]
[Display(ResourceType = typeof(LocalizedText),Name="Title")]
public string Title { get; set; }
[Required]
[DisplayName("Description")]
public string Description { get; set; }
[Required]
[DisplayName("Responsable")]
public string Responsible { get; set; }
[Required]
[DisplayName("Client")]
public string Client { get; set; }
public long Id { get; set; }
[Display(ResourceType = typeof(LocalizedText),Name="Ciffer")]
10 years ago
public decimal Ciffer {
get {
decimal total = 0;
if (Lines == null)
return total;
10 years ago
foreach (Writting l in Lines)
total += l.UnitaryCost * l.Count;
return total;
}
}
10 years ago
public Writting[] Lines { get; set; }
}
}