Initial import
This commit is contained in:
parent
0c865416ca
commit
04804b89a9
279 changed files with 12945 additions and 0 deletions
22
yavscModel/WorkFlow/Estimate.cs
Normal file
22
yavscModel/WorkFlow/Estimate.cs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
using System;
|
||||
|
||||
namespace yavscModel.WorkFlow
|
||||
{
|
||||
public class Estimate
|
||||
{
|
||||
public Estimate ()
|
||||
{
|
||||
}
|
||||
public string Description { get; set; }
|
||||
public decimal Ciffer {
|
||||
get {
|
||||
decimal total = 0;
|
||||
foreach (Writting l in Lines)
|
||||
total += l.UnitaryCost * l.Count;
|
||||
return total;
|
||||
}
|
||||
}
|
||||
public Writting[] Lines { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
13
yavscModel/WorkFlow/IContent.cs
Normal file
13
yavscModel/WorkFlow/IContent.cs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace yavscModel.WorkFlow
|
||||
{
|
||||
public interface IContent
|
||||
{
|
||||
object Data { get; set; }
|
||||
string MimeType { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
12
yavscModel/WorkFlow/IContentProvider.cs
Normal file
12
yavscModel/WorkFlow/IContentProvider.cs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace yavscModel.WorkFlow
|
||||
{
|
||||
public interface IContentProvider: IDisposable
|
||||
{
|
||||
string Order (IWFCommand c);
|
||||
IContent Get (string orderId);
|
||||
}
|
||||
}
|
||||
|
||||
10
yavscModel/WorkFlow/IWFCommand.cs
Normal file
10
yavscModel/WorkFlow/IWFCommand.cs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace yavscModel.WorkFlow
|
||||
{
|
||||
public interface IWFCommand
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
13
yavscModel/WorkFlow/IWFModule.cs
Normal file
13
yavscModel/WorkFlow/IWFModule.cs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
using System;
|
||||
using yavscModel.WorkFlow;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace WorkFlow
|
||||
{
|
||||
public interface IWFModule
|
||||
{
|
||||
int GetState (IWFCommand c);
|
||||
int Handle (IWFCommand c,FormCollection collection);
|
||||
}
|
||||
}
|
||||
|
||||
23
yavscModel/WorkFlow/NewProjectModel.cs
Normal file
23
yavscModel/WorkFlow/NewProjectModel.cs
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace yavscModel.WorkFlow
|
||||
{
|
||||
public class NewProjectModel
|
||||
{
|
||||
[DisplayName("Nom du projet")]
|
||||
[Required()]
|
||||
public string Name { get; set; }
|
||||
|
||||
[DisplayName("Manager du projet")]
|
||||
[Required]
|
||||
public string Manager { get; set; }
|
||||
|
||||
[DisplayName("Description du projet")]
|
||||
[Required]
|
||||
public string Description { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
39
yavscModel/WorkFlow/WFOrder.cs
Normal file
39
yavscModel/WorkFlow/WFOrder.cs
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using SalesCatalog.Model;
|
||||
using yavscModel.WorkFlow;
|
||||
|
||||
namespace WorkFlow
|
||||
{
|
||||
public class WFOrder : IWFCommand
|
||||
{
|
||||
private Product p;
|
||||
private DateTime date;
|
||||
private string catref;
|
||||
public WFOrder(Product prod,string catalogReference){
|
||||
date = DateTime.Now;
|
||||
catref=catalogReference;
|
||||
p = prod;
|
||||
}
|
||||
public override string ToString ()
|
||||
{
|
||||
return string.Format ("[Commande date={0} prodref={1}, cat={2}]",date,p.Reference,catref);
|
||||
}
|
||||
|
||||
#region IWFCommand implementation
|
||||
|
||||
public string CatalogReference {
|
||||
get {
|
||||
return catref;
|
||||
}
|
||||
}
|
||||
|
||||
public DateTime OrderDate {
|
||||
get {
|
||||
return date;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
13
yavscModel/WorkFlow/Writting.cs
Normal file
13
yavscModel/WorkFlow/Writting.cs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
using System;
|
||||
|
||||
namespace yavscModel.WorkFlow
|
||||
{
|
||||
public class Writting
|
||||
{
|
||||
public decimal UnitaryCost { get; set; }
|
||||
public int Count { get; set; }
|
||||
public string ProductReference { get; set; }
|
||||
public string Description { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue