* LocalizedText.fr.resx: internationalisation de la saisie de

l'estimation

* LocalizedText.resx: 

* FrontOfficeApiController.cs: renamed the Tex generation method

* FrontOfficeController.cs: fixed the Estimate creation

* WorkFlowController.cs: return model validation errors when updating
  a writting.

* TexFormatter.cs: Simple mime-type content declaration

* Global.asax.cs:
* T4TemplateEstimate.cs: cleanning

* BBCodeHelper.cs: BBCodes: docpage summary gone into a new aside
  element

* App.master: thanks links are now contained in a div element

* style.css: clearer

* Estimate.aspx: Fixed the creation/edition/removal processes

* Estim.tt: added the column "Count" to the writtings table.

* RegisterViewModel.cs: internationalization

* Writting.cs: stronger model

* Estim.tex: cleaning
This commit is contained in:
Paul Schneider 2014-10-31 11:41:28 +01:00
commit 312585d4f0
16 changed files with 130 additions and 244 deletions

View file

@ -38,14 +38,17 @@ namespace Yavsc.ApiControllers
{
WorkFlowManager.DropWritting (wrid);
}
class Error {}
[Authorize]
[AcceptVerbs("POST")]
public void UpdateWritting([FromBody] Writting wr)
public object UpdateWritting([FromBody] Writting model)
{
if (!ModelState.IsValid)
throw new Exception ("Modèle invalide");
WorkFlowManager.UpdateWritting (wr);
if (!ModelState.IsValid) {
return ModelState.Where ( k => k.Value.Errors.Count>0) ;
}
WorkFlowManager.UpdateWritting (model);
return null;
}
[HttpGet]
@ -67,8 +70,12 @@ namespace Yavsc.ApiControllers
[AcceptVerbs("POST")]
[Authorize]
public long Write ([FromUri] long estid, [FromBody] Writting wr) {
// TODO ensure estid owner matches the current one
/// <summary>
/// Adds the specified imputation to the given estimation by estimation id.
/// </summary>
/// <param name="estid">Estimation identifier</param>
/// <param name="wr">Imputation to add</param>
public long Write ([FromUri] long estid, Writting wr) {
return WorkFlowManager.Write(estid, wr.Description,
wr.UnitaryCost, wr.Count, wr.ProductReference);
}