- a module for IT services business
- Mvc-like action binding in the WF web api ... ? * Yavsc.sln: * Web.csproj: * MvcActionValueBinder.cs: * yavscModel.csproj: * WFOrder.cs: * IWFOrder.cs: * BasketImpact.cs: * ProjectInfo.cs: * IWFModule.cs: * IWFCommand.cs: * WorkFlowController.cs: * NewProjectModel.cs: * IContentProvider.cs: * ITCPNpgsqlProvider.cs: * WorkFlowProvider.csproj: * ITContentProvider.csproj: * AssemblyInfo.cs: * OrderStatusChangedEventArgs.cs: * NpgsqlContentProvider.cs:
This commit is contained in:
parent
04804b89a9
commit
fa93ce7fee
19 changed files with 412 additions and 122 deletions
21
web/Controllers/BasketImpact.cs
Normal file
21
web/Controllers/BasketImpact.cs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
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;
|
||||
using System.Web.Http.ModelBinding;
|
||||
|
||||
namespace Yavsc.ApiControllers
|
||||
{
|
||||
|
||||
public class BasketImpact
|
||||
{
|
||||
public string ProductRef { get; set; }
|
||||
public int count { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -6,9 +6,11 @@ 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]
|
||||
|
|
@ -17,7 +19,13 @@ namespace Yavsc.ApiControllers
|
|||
return new { test="Hello World" };
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public object Order (BasketImpact bi)
|
||||
{
|
||||
return new { c="lmk,", message="Panier impacté", impactRef=bi.ProductRef, count=bi.count};
|
||||
}
|
||||
|
||||
/*
|
||||
public object Details(int id)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
|
|
@ -27,6 +35,7 @@ namespace Yavsc.ApiControllers
|
|||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public object Edit(int id)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
|
|
@ -46,6 +55,6 @@ namespace Yavsc.ApiControllers
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue