Fixes the Profiles administration
* Web.config: * web.config: * Web.csproj: * Global.asax.cs: * ValidateAjaxAttribute.cs: * Profile.aspx: * HomeController.cs: * BlogsController.cs: * WebCatalogExtensions.cs: * GoogleController.cs: * AccountController.cs: * Profile.cs: * EstimToPdfFormatter.MSAN.cs: * Makefile: Removes obsolete target "rsync-all" Adds the new target "allrsync" * FrontOfficeApiController.cs: Makes the code smaller and a better output in case of exception generating the Pdf or Tex outputs * WorkFlowController.cs: makes code cleaner * App.master: Gives the Profile method call an id parameter * Estimate.aspx: Fixes the estimation id parameter name at querying the Pdf or Tex documents * Estim.cs: see Estim.tt * Estim.tt: Mo more exception at transforming null values from the contact section of the client profile
This commit is contained in:
parent
0755dd62b3
commit
8e2c21a3db
20 changed files with 457 additions and 261 deletions
|
|
@ -21,8 +21,8 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Web.Http.Filters;
|
||||
using System.Net.Http;
|
||||
using System.Web.Http.Filters;
|
||||
using System.Web.Http.ModelBinding;
|
||||
|
||||
namespace Yavsc
|
||||
|
|
@ -51,18 +51,16 @@ namespace Yavsc
|
|||
return errorModel;
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Raises the action executing event.
|
||||
/// </summary>
|
||||
/// <param name="actionContext">Action context.</param>
|
||||
public override void OnActionExecuting (System.Web.Http.Controllers.HttpActionContext actionContext)
|
||||
|
||||
public override void OnActionExecuted (HttpActionExecutedContext actionExecutedContext)
|
||||
{
|
||||
var modelState = actionContext.ModelState;
|
||||
var modelState = actionExecutedContext.ActionContext.ModelState;
|
||||
|
||||
if (!modelState.IsValid)
|
||||
{
|
||||
actionContext.Response =
|
||||
actionContext.Request.CreateResponse
|
||||
(HttpStatusCode.BadRequest,GetErrorModelObject(modelState));
|
||||
actionExecutedContext.Response =
|
||||
actionExecutedContext.Request.CreateResponse (System.Net.HttpStatusCode.BadRequest,
|
||||
ValidateAjaxAttribute.GetErrorModelObject (modelState));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue