2014-07-16 20:35:03 +02:00
|
|
|
using System;
|
2014-10-25 23:54:19 +02:00
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
using System.ComponentModel;
|
2014-07-16 20:35:03 +02:00
|
|
|
|
2014-10-06 04:58:47 +02:00
|
|
|
namespace Yavsc.Model.WorkFlow
|
2014-07-16 20:35:03 +02:00
|
|
|
{
|
2014-10-25 23:54:19 +02:00
|
|
|
[Serializable]
|
|
|
|
|
public class Estimate
|
2014-07-16 20:35:03 +02:00
|
|
|
{
|
|
|
|
|
public Estimate ()
|
|
|
|
|
{
|
|
|
|
|
}
|
2014-10-25 23:54:19 +02:00
|
|
|
[Required]
|
|
|
|
|
[DisplayName("Titre")]
|
2014-09-23 01:43:11 +02:00
|
|
|
public string Title { get; set; }
|
2014-10-25 23:54:19 +02:00
|
|
|
[Required]
|
|
|
|
|
[DisplayName("Description")]
|
|
|
|
|
public string Description { get; set; }
|
|
|
|
|
[Required]
|
|
|
|
|
[DisplayName("Responsable")]
|
|
|
|
|
public string Responsible { get; set; }
|
|
|
|
|
[Required]
|
|
|
|
|
[DisplayName("Client")]
|
|
|
|
|
public string Client { get; set; }
|
|
|
|
|
|
2014-09-24 16:19:23 +02:00
|
|
|
public long Id { get; set; }
|
2014-10-25 23:54:19 +02:00
|
|
|
[DisplayName("Chiffre")]
|
2014-07-16 20:35:03 +02:00
|
|
|
public decimal Ciffer {
|
|
|
|
|
get {
|
|
|
|
|
decimal total = 0;
|
2014-09-23 12:25:41 +02:00
|
|
|
if (Lines == null)
|
|
|
|
|
return total;
|
2014-07-16 20:35:03 +02:00
|
|
|
foreach (Writting l in Lines)
|
|
|
|
|
total += l.UnitaryCost * l.Count;
|
|
|
|
|
return total;
|
|
|
|
|
}
|
|
|
|
|
}
|
2014-10-25 23:54:19 +02:00
|
|
|
|
2014-07-16 20:35:03 +02:00
|
|
|
public Writting[] Lines { get; set; }
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|