* Web.csproj:
* T.cs: * IModule.cs: * App.master: * IProvider.cs: * Error.aspx: * AOEMail.aspx: * Login.aspx: * Index.aspx: * Admin.aspx: * yavscModel.csproj: * WFManager.cs: * Index.aspx: * AddRole.aspx: * Profile.aspx: * Edit.aspx: * Register.aspx: * Index.aspx: * RoleList.aspx: * UserList.aspx: * Validate.aspx: * RemovePost.aspx: * Index.aspx: * BasketImpact.cs: * Brand.aspx: * Delete.aspx: * Create.aspx: * Backups.aspx: * HomeController.cs: * BlogManager.cs: * Restore.aspx: * Details.aspx: * TitleNotFound.aspx: * Product.aspx: * AdminController.cs: * Command.aspx: * Service.aspx: * BlogProvider.cs: * NewProject.aspx: * Catalog.aspx: * Restored.aspx: * BasketController.cs: * AccountController.cs: * WorkFlowController.cs: * BlogsApiController.cs: * ChangePassword.aspx: * RemoveRoleQuery.aspx: * CreateBackup.aspx: * IContentProvider.cs: * BackOfficeController.cs: * FrontOfficeController.cs: * NpgsqlBlogProvider.cs: * NpgsqlContentProvider.cs: * RegistrationPending.aspx: * ProductCategory.aspx: * FrontOfficeApiController.cs: * ChangePasswordSuccess.aspx: * ReferenceNotFound.aspx: * BackupCreated.aspx Fixes many HTTP 500 Refactoring on the go
This commit is contained in:
parent
301dbdcb6d
commit
685c03b37e
59 changed files with 384 additions and 392 deletions
|
|
@ -14,6 +14,16 @@ namespace Yavsc.ApiControllers
|
|||
[HttpControllerConfiguration(ActionValueBinder=typeof(Basic.MvcActionValueBinder))]
|
||||
public class WorkFlowController : ApiController
|
||||
{
|
||||
string adminRoleName="Admin";
|
||||
|
||||
protected override void Initialize (HttpControllerContext controllerContext)
|
||||
{
|
||||
base.Initialize (controllerContext);
|
||||
if (!Roles.RoleExists (adminRoleName)) {
|
||||
Roles.CreateRole (adminRoleName);
|
||||
}
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
[Authorize]
|
||||
public long CreateEstimate (string title)
|
||||
|
|
@ -21,6 +31,7 @@ namespace Yavsc.ApiControllers
|
|||
return WFManager.CreateEstimate (
|
||||
Membership.GetUser().UserName,title);
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
[Authorize]
|
||||
public void DropWritting(long wrid)
|
||||
|
|
@ -49,11 +60,7 @@ namespace Yavsc.ApiControllers
|
|||
return new { test=string.Format("Hello {0}!",username) };
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public object Order (BasketImpact bi)
|
||||
{
|
||||
return new { c="lmk,", message="Panier impacté", impactRef=bi.ProductRef, count=bi.count};
|
||||
}
|
||||
|
||||
|
||||
[HttpGet]
|
||||
[Authorize]
|
||||
|
|
@ -63,18 +70,7 @@ namespace Yavsc.ApiControllers
|
|||
return WFManager.Write(estid, desc, ucost, count, productid);
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
[HttpGet]
|
||||
/// <summary>
|
||||
/// Gets the estimate.
|
||||
/// </summary>
|
||||
/// <returns>The estimate.</returns>
|
||||
/// <param name="estid">Estid.</param>
|
||||
public Estimate GetEstimate (long estid)
|
||||
{
|
||||
Estimate est = WFManager.ContentProvider.GetEstimate (estid);
|
||||
return est;
|
||||
}
|
||||
|
||||
/*
|
||||
public object Details(int id)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue