Files
yavsc/web/Controllers/WorkFlowController.cs
Paul Schneider bba917dcc0 * style.css:
* Web.csproj:
* Web.config:
* Catalog.xml:
* Global.asax.cs:
* TestBinding.cs:
* IProvider.cs:
* yavscModel.csproj:
* WFManager.cs:
* BasketController.cs:
* WorkFlowController.cs:
* ITCPNpgsqlProvider.cs:
* IContentProvider.cs:
* WorkFlowProvider.csproj:
* NpgsqlContentProvider.cs:
* Provider.cs:
* ITContentProvider.csproj:
* FrontOfficeApiController.cs:
* ProviderCollection.cs:
* WorkflowConfiguration.cs:
* BlogProvidersConfigurationSection.cs: 

* IITContent.cs: Estimate creation
2014-09-18 13:58:43 +02:00

71 lines
1.5 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
using WorkFlowProvider;
using yavscModel.WorkFlow;
using System.Web.Http.Controllers;
namespace Yavsc.ApiControllers
{
[HttpControllerConfiguration(ActionValueBinder=typeof(Basic.MvcActionValueBinder))]
public class WorkFlowController : ApiController
{
[HttpGet]
[Authorize]
public object Index()
{
return new { test="Hello World" };
}
[HttpGet]
public object Order (BasketImpact bi)
{
return new { c="lmk,", message="Panier impacté", impactRef=bi.ProductRef, count=bi.count};
}
[HttpGet]
[Authorize]
public long Write (long estid, string desc, decimal ucost, int count, long productid=0) {
// TODO ensure estid owner matches the current one
return WFManager.Write(estid, desc, ucost, count, productid);
}
/*
public object Details(int id)
{
throw new NotImplementedException ();
}
public object Create()
{
throw new NotImplementedException ();
}
public object Edit(int id)
{
throw new NotImplementedException ();
}
public object Delete(int id)
{
throw new NotImplementedException ();
}
IContentProvider contentProvider = null;
IContentProvider ContentProvider {
get {
if (contentProvider == null )
contentProvider = WFManager.GetContentProviderFWC ();
return contentProvider;
}
}
*/
}
}