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
vnext
Paul Schneider 10 years ago
parent 0755dd62b3
commit 8e2c21a3db
20 changed files with 457 additions and 261 deletions

@ -50,7 +50,7 @@ clean:
rm -rf $(DESTDIR)
rsync-all: rsync_local rsync_test rsync_preprod rsync_prod
allrsync: rsync_local rsync_test rsync_preprod rsync_prod
sourcepkg:
git archive --format=tar --prefix=yavsc-$(CONFIG)/ $(CONFIG) | bzip2 > yavsc-$(CONFIG).tar.bz2
@ -67,5 +67,4 @@ htmldoc: xmldoc
docdeploy-prod: htmldoc
rsync -ravu web/htmldoc root@$(PRODHOSTDIR)
.PHONY: rsync-local

@ -89,30 +89,10 @@ namespace Yavsc.ApiControllers
[AcceptVerbs ("GET")]
public HttpResponseMessage EstimateToTex (long id)
{
string texest = null;
try {
texest = estimateToTex (id);
} catch (TemplateException ex) {
return new HttpResponseMessage (HttpStatusCode.OK) { Content =
new ObjectContent (typeof(string),
ex.Message, new ErrorHtmlFormatter (HttpStatusCode.NotAcceptable,
LocalizedText.DocTemplateException
))
};
} catch (Exception ex) {
return new HttpResponseMessage (HttpStatusCode.OK) { Content =
new ObjectContent (typeof(string),
ex.Message, new ErrorHtmlFormatter (HttpStatusCode.InternalServerError,
LocalizedText.DocTemplateException))
};
}
string texest = estimateToTex (id);
if (texest == null)
return new HttpResponseMessage (HttpStatusCode.OK) { Content =
new ObjectContent (typeof(string), "Not an estimation id:" + id,
new ErrorHtmlFormatter (HttpStatusCode.NotFound,
LocalizedText.Estimate_not_found))
};
throw new InvalidOperationException (
"Not an estimate");
return new HttpResponseMessage () {
Content = new ObjectContent (typeof(string),
texest,
@ -146,11 +126,11 @@ namespace Yavsc.ApiControllers
/// <returns>The to pdf.</returns>
/// <param name="estimid">Estimid.</param>
[AcceptVerbs("GET")]
public HttpResponseMessage EstimateToPdf (long estimid)
public HttpResponseMessage EstimateToPdf (long id)
{
string texest = null;
try {
texest = estimateToTex (estimid);
texest = estimateToTex (id);
} catch (TemplateException ex) {
return new HttpResponseMessage (HttpStatusCode.OK) { Content =
new ObjectContent (typeof(string),
@ -167,7 +147,7 @@ namespace Yavsc.ApiControllers
}
if (texest == null)
return new HttpResponseMessage (HttpStatusCode.OK) { Content =
new ObjectContent (typeof(string), "Not an estimation id:" + estimid,
new ObjectContent (typeof(string), "Not an estimation id:" + id,
new ErrorHtmlFormatter (HttpStatusCode.NotFound,
LocalizedText.Estimate_not_found))
};
@ -193,7 +173,7 @@ namespace Yavsc.ApiControllers
/// <param name="model">Model.</param>
[Authorize()]
[ValidateAjaxAttribute]
public HttpResponseMessage Register ([FromBody] RegisterModel model)
public HttpResponseMessage Register ([FromBody] RegisterClientModel model)
{
if (ModelState.IsValid) {
if (model.IsApprouved)
@ -225,6 +205,14 @@ namespace Yavsc.ApiControllers
case MembershipCreateStatus.Success:
if (!model.IsApprouved)
Yavsc.Helpers.YavscHelpers.SendActivationEmail (user);
ProfileBase prtu = ProfileBase.Create (model.UserName);
prtu.SetPropertyValue("Name",model.Name);
prtu.SetPropertyValue("Address",model.Address);
prtu.SetPropertyValue("CityAndState",model.CityAndState);
prtu.SetPropertyValue("Mobile",model.Mobile);
prtu.SetPropertyValue("Phone",model.Phone);
prtu.SetPropertyValue("ZipCode",model.ZipCode);
break;
default:
break;

@ -7,11 +7,10 @@ using System.Web.Security;
using Yavsc;
using Yavsc.Model.WorkFlow;
using System.Web.Http;
using System.Web.Http.Controllers;
using System.Web.Http.ModelBinding;
using Yavsc.Model.RolesAndMembers;
using Yavsc.Helpers;
using Yavsc.Model;
using System.Web.Http.Controllers;
namespace Yavsc.ApiControllers
{
@ -135,18 +134,6 @@ namespace Yavsc.ApiControllers
return new { test=string.Format("Hello {0}!",username) };
}
private HttpResponseMessage CreateModelStateErrorResponse () {
// strip exceptions
Dictionary<string,string[]> errs = new Dictionary<string, string[]> ();
foreach (KeyValuePair<string,ModelState> st
in ModelState.Where (x => x.Value.Errors.Count > 0))
errs.Add(st.Key, st.Value.Errors.Select(x=>x.ErrorMessage).ToArray());
return Request.CreateResponse(System.Net.HttpStatusCode.BadRequest,
errs);
}
/// <summary>
/// Updates the writting.
/// </summary>

@ -3,8 +3,8 @@ using System.Web;
using System.Text;
using System.Web.Mvc;
using System.Web.Routing;
using System.Web.Mvc.Html;
using Yavsc.Model.FrontOffice;
using System.Web.Mvc.Html;
namespace Yavsc.CatExts
{

@ -5,13 +5,12 @@ using System.Linq;
using System.Net.Mail;
using System.Web;
using System.Web.Configuration;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Profile;
using System.Web.Security;
using Yavsc;
using Yavsc.Model.RolesAndMembers;
using Yavsc.Helpers;
using System.Web.Mvc;
namespace Yavsc.Controllers
{
@ -34,6 +33,7 @@ namespace Yavsc.Controllers
get { return avatarDir; }
set { avatarDir = value; }
}
/// <summary>
/// Index this instance.
/// </summary>
@ -68,6 +68,7 @@ namespace Yavsc.Controllers
// If we got this far, something failed, redisplay form
return View (model);
}
/// <summary>
/// Register the specified model and returnUrl.
/// </summary>
@ -122,6 +123,7 @@ namespace Yavsc.Controllers
}
return View (model);
}
/// <summary>
/// Changes the password success.
/// </summary>
@ -142,6 +144,7 @@ namespace Yavsc.Controllers
{
return View ();
}
/// <summary>
/// Unregister the specified confirmed.
/// </summary>
@ -211,70 +214,75 @@ namespace Yavsc.Controllers
ViewData ["UserName"] = logdu;
if (user == null)
user = logdu;
Profile model= new Profile (ProfileBase.Create (user));
Profile model = new Profile (ProfileBase.Create (user));
model.RememberMe = FormsAuthentication.GetAuthCookie (user, true) == null;
return View (model);
}
/// <summary>
/// Profile the specified model and AvatarFile.
/// Profile the specified user, model and AvatarFile.
/// </summary>
/// <param name="user">User.</param>
/// <param name="model">Model.</param>
/// <param name="AvatarFile">Avatar file.</param>
[Authorize]
[HttpPost]
// ASSERT("Membership.GetUser ().UserName is made of simple characters, no slash nor backslash"
public ActionResult Profile (string username, Profile model, HttpPostedFileBase AvatarFile)
public ActionResult Profile (string user, Profile model, HttpPostedFileBase AvatarFile)
{
// ASSERT("Membership.GetUser ().UserName is made of simple characters, no slash nor backslash"
string logdu = Membership.GetUser ().UserName;
ViewData ["UserName"] = logdu;
if (username != logdu)
bool editsMyProfile = (user == logdu);
if (!editsMyProfile)
if (!Roles.IsUserInRole ("Admin"))
if (!Roles.IsUserInRole ("FrontOffice"))
throw new UnauthorizedAccessException ("Your are not authorized to modify this profile");
ProfileBase prtoup = ProfileBase.Create (username);
if (AvatarFile != null) {
if (AvatarFile != null) {
// if said valid, move as avatar file
// else invalidate the model
if (AvatarFile.ContentType == "image/png") {
string avdir = Server.MapPath (AvatarDir);
string avpath = Path.Combine (avdir, username + ".png");
string avpath = Path.Combine (avdir, user + ".png");
AvatarFile.SaveAs (avpath);
model.avatar = Request.Url.Scheme+ "://"+ Request.Url.Authority + AvatarDir.Substring (1)+ "/" + username + ".png";
} else
model.avatar = Request.Url.Scheme + "://" + Request.Url.Authority + AvatarDir.Substring (1) + "/" + user + ".png";
} else
ModelState.AddModelError ("Avatar",
string.Format ("Image type {0} is not supported (suported formats : {1})",
AvatarFile.ContentType, "image/png"));
}
/* Sync the property in the Profile model to display :
/* Sync the property in the Profile model to display :
* string cAvat = HttpContext.Profile.GetPropertyValue ("avatar") as string;
if (cAvat != null) if (model.avatar == null) model.avatar = cAvat;
*/
if (ModelState.IsValid) {
if (model.avatar != null)
prtoup.SetPropertyValue ("avatar", model.avatar);
prtoup.SetPropertyValue ("Address", model.Address);
prtoup.SetPropertyValue ("BlogTitle", model.BlogTitle);
prtoup.SetPropertyValue ("BlogVisible", model.BlogVisible);
prtoup.SetPropertyValue ("CityAndState", model.CityAndState);
prtoup.SetPropertyValue ("ZipCode", model.ZipCode);
prtoup.SetPropertyValue ("Country", model.Country);
prtoup.SetPropertyValue ("WebSite", model.WebSite);
prtoup.SetPropertyValue ("Name", model.Name);
prtoup.SetPropertyValue ("Phone", model.Phone);
prtoup.SetPropertyValue ("Mobile", model.Mobile);
prtoup.SetPropertyValue ("BankCode", model.BankCode);
prtoup.SetPropertyValue ("WicketCode", model.WicketCode);
prtoup.SetPropertyValue ("AccountNumber", model.AccountNumber);
prtoup.SetPropertyValue ("BankedKey", model.BankedKey);
prtoup.SetPropertyValue ("BIC", model.BIC);
prtoup.SetPropertyValue ("IBAN", model.IBAN);
prtoup.Save ();
FormsAuthentication.SetAuthCookie (username, model.RememberMe);
ViewData ["Message"] = "Profile enregistré, cookie modifié.";
ProfileBase prf = ProfileBase .Create (model.UserName);
prf.SetPropertyValue ("BlogVisible", model.BlogVisible);
prf.SetPropertyValue ("BlogTitle", model.BlogTitle);
prf.SetPropertyValue ("avatar", model.avatar);
prf.SetPropertyValue ("Address", model.Address);
prf.SetPropertyValue ("CityAndState", model.CityAndState);
prf.SetPropertyValue ("Country", model.Country);
prf.SetPropertyValue ("ZipCode", model.ZipCode);
prf.SetPropertyValue ("WebSite", model.WebSite);
prf.SetPropertyValue ("Name", model.Name);
prf.SetPropertyValue ("Phone", model.Phone);
prf.SetPropertyValue ("Mobile", model.Mobile);
prf.SetPropertyValue ("BankCode", model.BankCode);
prf.SetPropertyValue ("IBAN", model.IBAN);
prf.SetPropertyValue ("BIC", model.BIC);
prf.SetPropertyValue ("WicketCode", model.WicketCode);
prf.SetPropertyValue ("AccountNumber", model.AccountNumber);
prf.SetPropertyValue ("BankedKey", model.BankedKey);
prf.SetPropertyValue ("gcalid", model.GoogleCalendar);
prf.Save ();
// only do the following if this profile belongs to current user
if (editsMyProfile)
FormsAuthentication.SetAuthCookie (user, model.RememberMe);
ViewData ["Message"] = "Profile enregistré"+((editsMyProfile)?", cookie modifié.":"");
}
return View (model);
}
@ -290,7 +298,6 @@ namespace Yavsc.Controllers
return Redirect (returnUrl);
}
/// <summary>
/// Validate the specified id and key.
/// </summary>

@ -7,8 +7,6 @@ using System.Net.Mime;
using System.Runtime.Serialization.Formatters.Binary;
using System.Web;
using System.Web.Configuration;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Profile;
using System.Web.Security;
using CodeKicker.BBCode;
@ -19,6 +17,7 @@ using Yavsc.Model.Blogs;
using Yavsc.ApiControllers;
using Yavsc.Model.RolesAndMembers;
using System.Net;
using System.Web.Mvc;
namespace Yavsc.Controllers
{

@ -11,7 +11,6 @@ using System.Web;
using System.Web.Mvc;
using System.Web.Profile;
using System.Web.Security;
using Mono.Security.Protocol.Tls;
using Newtonsoft.Json;
using Yavsc.Model;
using Yavsc.Model.Google;

@ -5,16 +5,15 @@ using System.Linq;
using System.Net.Mail;
using System.Web;
using System.Web.Configuration;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Reflection;
using System.Resources;
using Yavsc.Model;
using Npgsql.Web;
using ITContentProvider;
using Npgsql.Web.Blog;
using Yavsc.Helpers;
using Yavsc;
using System.Web.Mvc;
using ITContentProvider;
namespace Yavsc.Controllers
{

@ -0,0 +1,138 @@
//
// EstimToPdfFormatter.cs
//
// Author:
// Paul Schneider <paulschneider@free.fr>
//
// Copyright (c) 2014 Paul Schneider
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#if MicrosoftAspNetMvc
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Web;
using System.Web.Profile;
using Yavsc.Model.RolesAndMembers;
using Yavsc.Model.WorkFlow;
using System.Net.Http.Formatting;
using System.Net.Http.Headers;
namespace Yavsc.Formatters
{
/// <summary>
/// Estim to pdf formatter.
/// </summary>
public class EstimToPdfFormatter: BufferedMediaTypeFormatter
{
/// <summary>
/// Initializes a new instance of the <see cref="Yavsc.Formatters.EstimToPdfFormatter"/> class.
/// </summary>
public EstimToPdfFormatter ()
{
SupportedMediaTypes.Add(new MediaTypeHeaderValue("text/pdf"));
}
/// <summary>
/// Determines whether this instance can read type the specified type.
/// </summary>
/// <returns><c>true</c> if this instance can read type the specified type; otherwise, <c>false</c>.</returns>
/// <param name="type">Type.</param>
public override bool CanReadType(Type type)
{
return false;
}
/// <summary>
/// Determines whether this instance can write type the specified type.
/// </summary>
/// <returns><c>true</c> if this instance can write type the specified type; otherwise, <c>false</c>.</returns>
/// <param name="type">Type.</param>
public override bool CanWriteType(System.Type type)
{
if (type == typeof(Estimate))
{
return true;
}
else
{
Type enumerableType = typeof(IEnumerable<Estimate>);
return enumerableType.IsAssignableFrom(type);
}
}
public override void WriteToStream (Type type, object value, Stream writeStream, System.Net.Http.HttpContent content)
{
// TODO create a type containing generation parameters, including a template path, and generate from them
Yavsc.templates.Estim tmpe = new Yavsc.templates.Estim();
tmpe.Session = new Dictionary<string,object>();
Estimate e = value as Estimate;
tmpe.Session.Add ("estim", e);
Profile prpro = new Profile (ProfileBase.Create (e.Responsible));
var pbc = ProfileBase.Create (e.Client);
Profile prcli = new Profile (pbc);
if (!prpro.HasBankAccount || !prcli.IsBillable)
throw new Exception("account number for provider, or client not billable.");
tmpe.Session.Add ("from", prpro);
tmpe.Session.Add ("to", prcli);
tmpe.Init ();
string contentStr = tmpe.TransformText ();
string name = string.Format ("tmpestimtex-{0}", e.Id);
string fullname = Path.Combine (
HttpRuntime.CodegenDir, name);
FileInfo fi = new FileInfo(fullname + ".tex");
FileInfo fo = new FileInfo(fullname + ".pdf");
using (StreamWriter sw = new StreamWriter (fi.FullName))
{
sw.Write (contentStr);
}
using (Process p = new Process ()) {
p.StartInfo.WorkingDirectory = HttpRuntime.CodegenDir;
p.StartInfo = new ProcessStartInfo ();
p.StartInfo.UseShellExecute = false;
p.StartInfo.FileName = "/usr/bin/texi2pdf";
p.StartInfo.Arguments =
string.Format ("--batch --build-dir={2} -o {0} {1}",
fo.FullName,
fi.FullName,HttpRuntime.CodegenDir);
p.Start ();
p.WaitForExit ();
if (p.ExitCode != 0)
throw new Exception ("Pdf generation failed with exit code:" + p.ExitCode);
}
using (StreamReader sr = new StreamReader (fo.FullName)) {
byte[] buffer = File.ReadAllBytes (fo.FullName);
writeStream.Write(buffer,0,buffer.Length);
}
fi.Delete();
fo.Delete();
}
}
}
#endif

@ -4,12 +4,14 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
using Yavsc.Formatters;
using Yavsc.Model.FrontOffice;
using System.Web.Http;
using System.Web.SessionState;
using System.Web.Mvc;
using System.Web.Http;
using System.Web.WebPages.Scope;
using System.Reflection;
namespace Yavsc
{
@ -86,5 +88,14 @@ namespace Yavsc
return HttpContext.Current.Request.AppRelativeCurrentExecutionFilePath.StartsWith(WebApiConfig.UrlPrefixRelative);
}
protected void Application_BeginRequest()
{
var ob = typeof(
AspNetRequestScopeStorageProvider).Assembly.GetType(
"System.Web.WebPages.WebPageHttpModule").GetProperty
("AppStartExecuteCompleted",
BindingFlags.NonPublic | BindingFlags.Static);
ob.SetValue(null, true, null);
}
}
}

@ -48,7 +48,7 @@ ViewState["orgtitle"] = T.GetString(Page.Title);
</a>
<span class="hidcom">S'authentifier avec son compte Google+</span>
<% } else { %>
<%= Html.ActionLink(HttpContext.Current.User.Identity.Name, "Profile", "Account", null, new { @class="actionlink" }) %>
<%= Html.ActionLink(HttpContext.Current.User.Identity.Name, "Profile", "Account", new { user= HttpContext.Current.User.Identity.Name}, new { @class="actionlink" }) %>
<span class="hidcom"> &Eacute;dition de votre profile </span>
@ <%= Html.ActionLink( YavscHelpers.SiteName, "Index", "Home" ,null, new { @class="actionlink" }) %>
<span class="hidcom"> Page d'accueil </span>

@ -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));
}
}
}

@ -12,8 +12,9 @@ table.layout TR TD { max-width:40%; }
<%= Html.ValidationSummary() %>
<% using(Html.BeginForm("Profile", "Account", FormMethod.Post, new { enctype = "multipart/form-data" })) %>
<% { %>
<%= Html.Hidden("UserName",ViewData["ProfileUserName"]) %>
<input type="hidden" name="username" value="<%=ViewData["ProfileUserName"]%>">
<fieldset><legend>Informations publiques</legend>
<table class="layout">

@ -355,7 +355,7 @@ function addRow(){
});
</script>
<a class="actionlink" href="<%=Url.Content(Yavsc.WebApiConfig.UrlPrefixRelative)%>/FrontOffice/EstimateToTex?estimid=<%=Model.Id%>"><%= LocalizedText.Tex_version %></a>
<a class="actionlink" href="<%=Url.Content(Yavsc.WebApiConfig.UrlPrefixRelative)%>/FrontOffice/EstimateToPdf?estimid=<%=Model.Id%>"><%= LocalizedText.Pdf_version %></a>
<a class="actionlink" href="<%=Url.Content(Yavsc.WebApiConfig.UrlPrefixRelative)%>/FrontOffice/EstimateToTex?id=<%=Model.Id%>"><%= LocalizedText.Tex_version %></a>
<a class="actionlink" href="<%=Url.Content(Yavsc.WebApiConfig.UrlPrefixRelative)%>/FrontOffice/EstimateToPdf?id=<%=Model.Id%>"><%= LocalizedText.Pdf_version %></a>
</aside>
</asp:Content>

@ -29,13 +29,13 @@ http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx
</sectionGroup>
</configSections>
<system.webServer>
<defaultDocument>
<files>
<clear />
<add value="Index" />
</files>
</defaultDocument>
</system.webServer>
<defaultDocument>
<files>
<clear />
<add value="Index" />
</files>
</defaultDocument>
</system.webServer>
<system.web>
<!--
Set compilation debug="true" to insert debugging
@ -45,38 +45,23 @@ http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx
-->
<compilation defaultLanguage="C#" debug="false">
<assemblies>
<add assembly="Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add assembly="System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add assembly="Npgsql, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7" />
<add assembly="System.Configuration.Install, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add assembly="System.Web.DynamicData, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add assembly="System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add assembly="System.ComponentModel.DataAnnotations, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add assembly="System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add assembly="System.Web.ApplicationServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add assembly="System.IdentityModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add assembly="Mono.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
<add assembly="Npgsql, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7" />
<add assembly="System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add assembly="Mono.Posix, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
<add assembly="System.ServiceModel.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add assembly="System.ServiceModel.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add assembly="System.Configuration.Install, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add assembly="Microsoft.Build.Tasks.v12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add assembly="Microsoft.Build.Utilities.v12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add assembly="Microsoft.Build, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add assembly="System.Net, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add assembly="System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add assembly="System.Net.Http.WebRequest, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add assembly="System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add assembly="System.Web.WebPages.Deployment, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add assembly="System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add assembly="System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add assembly="System.Net.Http.Formatting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add assembly="System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add assembly="System.Web.ApplicationServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add assembly="System.Web.Http.WebHost, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add assembly="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add assembly="System.Web.WebPages, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add assembly="System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add assembly="System.Web.WebPages, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add assembly="System.Net.Http.Formatting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add assembly="System.Net.Http.WebRequest, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</assemblies>
</compilation>
<customErrors mode="RemoteOnly">
@ -285,7 +270,7 @@ http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx
<add key="Name" value="Psc" />
<!-- do not point "/Home/index" with the value for the "StartPage",
it would result in a redirection infinite loop -->
<!-- <add key="StartPage" value="/Blog" /> -->
<!-- <add key="StartPage" value="/Blog" /> -->
<add key="DefaultAvatar" value="/images/noavatar.png;image/png" />
<add key="RegistrationMessage" value="/RegistrationMail.txt" />
<add key="ClientValidationEnabled" value="true" />

@ -53,55 +53,40 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="System.Web.Routing" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Web.Abstractions" />
<Reference Include="System.Web.DynamicData" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Configuration" />
<Reference Include="System.Web.ApplicationServices" />
<Reference Include="System.IdentityModel" />
<Reference Include="Mono.Security" />
<Reference Include="Npgsql" />
<Reference Include="System.Data" />
<Reference Include="System.Security" />
<Reference Include="CodeKicker.BBCode">
<HintPath>lib\CodeKicker.BBCode.dll</HintPath>
</Reference>
<Reference Include="Mono.Posix" />
<Reference Include="System.ServiceModel.Web" />
<Reference Include="System.ServiceModel.Routing" />
<Reference Include="System.Configuration.Install" />
<Reference Include="System.Web.Services" />
<Reference Include="Microsoft.Build.Tasks.v12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="Microsoft.Build.Utilities.v12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="Microsoft.Build, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="System.Net" />
<Reference Include="log4net">
<HintPath>..\packages\log4net.2.0.3\lib\net40-full\log4net.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http" />
<Reference Include="System.Net.Http.WebRequest" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="Newtonsoft.Json">
<HintPath>..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System.Web" />
<Reference Include="System.Web.WebPages.Deployment" />
<Reference Include="System.Web.WebPages.Razor" />
<Reference Include="PayPalCoreSDK">
<HintPath>..\packages\PayPalCoreSDK.1.6.0\lib\net451\PayPalCoreSDK.dll</HintPath>
</Reference>
<Reference Include="System.Web.Http" />
<Reference Include="System.Net.Http.Formatting" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Abstractions" />
<Reference Include="System.Core" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Web.Routing" />
<Reference Include="System.Web.Services" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Xml" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Web.ApplicationServices" />
<Reference Include="System.Data" />
<Reference Include="System.Web.Http.WebHost" />
<Reference Include="Microsoft.Web.Infrastructure" />
<Reference Include="System.Web.WebPages" />
<Reference Include="System.Web.Http" />
<Reference Include="System.Web.Mvc" />
<Reference Include="System.Web.WebPages" />
<Reference Include="System.Net.Http.Formatting" />
<Reference Include="System.Net.Http.WebRequest" />
</ItemGroup>
<ItemGroup>
<Folder Include="Models\" />
@ -192,6 +177,7 @@
<Compile Include="ApiControllers\WorkFlowController.cs" />
<Compile Include="TemplateException.cs" />
<Compile Include="IValueProvider.cs" />
<Compile Include="Formatters\EstimToPdfFormatter.MSAN.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Views\Web.config" />
@ -680,6 +666,7 @@
<Content Include="Views\FrontOffice\Estimate.aspx" />
<Content Include="Theme\dark\croix.png" />
<Content Include="Views\Admin\RemoveRole..aspx" />
<Content Include="web.config" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
@ -721,10 +708,6 @@
<Project>{59E1DF7B-FFA0-4DEB-B5F3-76EBD98D5356}</Project>
<Name>WebControls</Name>
</ProjectReference>
<ProjectReference Include="..\ITContentProvider\ITContentProvider.csproj">
<Project>{9D7D892E-9B77-4713-892D-C26E1E944119}</Project>
<Name>ITContentProvider</Name>
</ProjectReference>
<ProjectReference Include="..\yavscModel\YavscModel.csproj">
<Project>{68F5B80A-616E-4C3C-91A0-828AA40000BD}</Project>
<Name>YavscModel</Name>
@ -733,6 +716,14 @@
<Project>{821FF72D-9F4B-4A2C-B95C-7B965291F119}</Project>
<Name>NpgsqlContentProvider</Name>
</ProjectReference>
<ProjectReference Include="..\ITContentProvider\ITContentProvider.csproj">
<Project>{9D7D892E-9B77-4713-892D-C26E1E944119}</Project>
<Name>ITContentProvider</Name>
</ProjectReference>
<ProjectReference Include="..\plugins\fortune\fortune.csproj">
<Project>{B5F49C21-7BB3-4DC0-AE65-F4ED0F6D15BD}</Project>
<Name>fortune</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="instdbws.sql" />

@ -115,447 +115,535 @@ namespace Yavsc.templates {
#line hidden
#line 86 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(this.ToStringHelper.ToStringWithCulture( to.Address ));
if (!string.IsNullOrWhiteSpace(to.Address)) {
#line default
#line hidden
#line 86 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write("\\\\\n ");
#line 87 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(" ");
#line default
#line hidden
#line 87 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(this.ToStringHelper.ToStringWithCulture( to.ZipCode ));
this.Write(this.ToStringHelper.ToStringWithCulture( to.Address ));
#line default
#line hidden
#line 87 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(" ");
this.Write("\\\\\n ");
#line default
#line hidden
#line 87 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 88 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
}
#line default
#line hidden
#line 89 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(" ");
#line default
#line hidden
#line 89 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
if (!string.IsNullOrWhiteSpace(to.ZipCode)) {
#line default
#line hidden
#line 90 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(" ");
#line default
#line hidden
#line 90 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(this.ToStringHelper.ToStringWithCulture( to.ZipCode ));
#line default
#line hidden
#line 90 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(" ");
#line default
#line hidden
#line 90 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
}
#line default
#line hidden
#line 91 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(" ");
#line default
#line hidden
#line 91 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
if (!string.IsNullOrWhiteSpace(to.ZipCode)) {
#line default
#line hidden
#line 92 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(" ");
#line default
#line hidden
#line 92 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(this.ToStringHelper.ToStringWithCulture( to.CityAndState ));
#line default
#line hidden
#line 87 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write("\\\\\n");
#line 92 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write("\\\\ ");
#line default
#line hidden
#line 88 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 92 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
}
#line default
#line hidden
#line 93 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(" \n");
#line default
#line hidden
#line 94 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
if (!string.IsNullOrWhiteSpace(to.Phone)) {
#line default
#line hidden
#line 89 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 95 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(" Téléphone fixe: ");
#line default
#line hidden
#line 89 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 95 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(this.ToStringHelper.ToStringWithCulture( to.Phone ));
#line default
#line hidden
#line 89 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 95 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write("\\\\\n");
#line default
#line hidden
#line 90 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 96 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
}
#line default
#line hidden
#line 91 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 97 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
if (!string.IsNullOrWhiteSpace(to.Mobile)) {
#line default
#line hidden
#line 92 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 98 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(" Mobile: ");
#line default
#line hidden
#line 92 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 98 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(this.ToStringHelper.ToStringWithCulture( to.Mobile ));
#line default
#line hidden
#line 92 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 98 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write("\\\\\n");
#line default
#line hidden
#line 93 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 99 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
}
#line default
#line hidden
#line 94 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 100 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(" ");
#line default
#line hidden
#line 100 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
if (!string.IsNullOrWhiteSpace(to.Email)) {
#line default
#line hidden
#line 101 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(" E-mail: ");
#line default
#line hidden
#line 94 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 101 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(this.ToStringHelper.ToStringWithCulture( to.Email ));
#line default
#line hidden
#line 94 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write("\n}\n\n% Liste des produits facturés : Désignation, prix\n\n ");
#line 101 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
}
#line default
#line hidden
#line 99 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 102 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write("}\n\n% Liste des produits facturés : Désignation, prix\n\n ");
#line default
#line hidden
#line 106 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
foreach (Writting wr in estim.Lines) {
#line default
#line hidden
#line 100 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 107 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write("\\AjouterService {");
#line default
#line hidden
#line 100 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 107 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(wr.Description));
#line default
#line hidden
#line 100 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 107 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(" ");
#line default
#line hidden
#line 100 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 107 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
if (!string.IsNullOrWhiteSpace(wr.ProductReference)) {
#line default
#line hidden
#line 101 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 108 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(" (");
#line default
#line hidden
#line 101 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 108 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(wr.ProductReference));
#line default
#line hidden
#line 101 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 108 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(")");
#line default
#line hidden
#line 101 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 108 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
}
#line default
#line hidden
#line 102 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 109 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write("} {");
#line default
#line hidden
#line 102 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 109 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(wr.Count));
#line default
#line hidden
#line 102 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 109 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write("} {");
#line default
#line hidden
#line 102 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 109 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(wr.UnitaryCost));
#line default
#line hidden
#line 102 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 109 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write("} \n ");
#line default
#line hidden
#line 103 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 110 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
}
#line default
#line hidden
#line 104 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 111 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write("\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n\n\\geometry{verbose,tmargin=4em,bmargin=8em,lmargin=6em,rmargin=6em}\n\\setlength{\\parindent}{0pt}\n\\setlength{\\parskip}{1ex plus 0.5ex minus 0.2ex}\n\n\\thispagestyle{fancy}\n\\pagestyle{fancy}\n\\setlength{\\parindent}{0pt}\n\n\\renewcommand{\\headrulewidth}{0pt}\n\\cfoot{\n ");
#line default
#line hidden
#line 117 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 124 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(from.Name));
#line default
#line hidden
#line 117 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 124 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(" - ");
#line default
#line hidden
#line 117 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 124 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(from.Address ));
#line default
#line hidden
#line 117 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 124 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(" - ");
#line default
#line hidden
#line 117 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 124 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(this.ToStringHelper.ToStringWithCulture( from.CityAndState ));
#line default
#line hidden
#line 117 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 124 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(" \\newline\n \\small{\n E-mail: ");
#line default
#line hidden
#line 119 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 126 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(this.ToStringHelper.ToStringWithCulture( from.Email ));
#line default
#line hidden
#line 119 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 126 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write("\n ");
#line default
#line hidden
#line 120 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 127 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
if (!string.IsNullOrWhiteSpace(from.Mobile)) {
#line default
#line hidden
#line 121 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 128 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(" - Téléphone mobile: ");
#line default
#line hidden
#line 121 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 128 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(this.ToStringHelper.ToStringWithCulture( from.Mobile ));
#line default
#line hidden
#line 121 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 128 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
}
#line default
#line hidden
#line 122 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 129 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(" ");
#line default
#line hidden
#line 122 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 129 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
if (!string.IsNullOrWhiteSpace(from.Phone)) {
#line default
#line hidden
#line 123 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 130 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(" - Téléphone fixe: ");
#line default
#line hidden
#line 123 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 130 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(this.ToStringHelper.ToStringWithCulture( from.Phone ));
#line default
#line hidden
#line 123 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 130 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
}
#line default
#line hidden
#line 124 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 131 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(" }\n}\n\n\\begin{document}\n\n% Logo de la société\n%\\includegraphics{logo.jpg}\n\n% Nom et adresse de la société\n");
#line default
#line hidden
#line 133 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 140 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(this.ToStringHelper.ToStringWithCulture( from.Name ));
#line default
#line hidden
#line 133 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 140 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write("\\\\\n");
#line default
#line hidden
#line 134 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 141 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(this.ToStringHelper.ToStringWithCulture( from.Address ));
#line default
#line hidden
#line 134 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 141 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write("\\\\\n");
#line default
#line hidden
#line 135 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 142 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(from.ZipCode ));
#line default
#line hidden
#line 135 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 142 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(" ");
#line default
#line hidden
#line 135 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 142 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(from.CityAndState));
#line default
#line hidden
#line 135 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 142 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write("\\\\\n\nFacture n°\\FactureNum\n\n\n{\\addtolength{\\leftskip}{10.5cm} %in ERT\n \\textbf{\\ClientNom} \\\\\n \\ClientAdresse \\\\\n\n} %in ERT\n\n\n\\hspace*{10.5cm}\n\\FactureLieu, le \\today\n\n~\\\\~\\\\\n\n\\textbf{Objet : \\FactureObjet \\\\}\n\n\\textnormal{\\FactureDescr}\n\n~\\\\\n\n\\begin{center}\n \\begin{tabular}{lrrr}\n \\textbf{Désignation ~~~~~~} & \\textbf{Prix unitaire} & \\textbf{Quantité} & \\textbf{Montant (EUR)} \\\\\n \\hline\n \\AfficheResultat{}\n \\end{tabular}\n\\end{center}\n\n\\begin{flushright}\n\\textit{Auto entreprise en franchise de TVA}\\\\\n\n\\end{flushright}\n~\\\\\n\n\\ifthenelse{\\equal{\\FactureAcquittee}{oui}}{\n Facture acquittée.\n}{\n\n À régler par chèque ou par virement bancaire :\n\n \\begin{center}\n \\begin{tabular}{|c c c c|}\n \\hline \\textbf{Code banque} & \\textbf{Code guichet} & \\textbf{N° de Compte} & \\textbf{Clé RIB} \\\\\n ");
#line default
#line hidden
#line 181 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 188 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(this.ToStringHelper.ToStringWithCulture( from.BankCode ));
#line default
#line hidden
#line 181 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 188 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(" & ");
#line default
#line hidden
#line 181 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 188 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(this.ToStringHelper.ToStringWithCulture( from.WicketCode ));
#line default
#line hidden
#line 181 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 188 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(" & ");
#line default
#line hidden
#line 181 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 188 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(from.AccountNumber ));
#line default
#line hidden
#line 181 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 188 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(" & ");
#line default
#line hidden
#line 181 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 188 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(from.BankedKey));
#line default
#line hidden
#line 181 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 188 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(" \\\\\n \\hline \\textbf{IBAN N°} & \\multicolumn{3}{|l|}{ ");
#line default
#line hidden
#line 182 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 189 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(this.ToStringHelper.ToStringWithCulture( from.IBAN ));
#line default
#line hidden
#line 182 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 189 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(" } \\\\\n \\hline \\textbf{Code BIC} & \\multicolumn{3}{|l|}{ ");
#line default
#line hidden
#line 183 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 190 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(this.ToStringHelper.ToStringWithCulture( from.BIC ));
#line default
#line hidden
#line 183 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
#line 190 "/home/paul/workspace/yavsc/web/templates/Estim.tt"
this.Write(" } \\\\\n \\hline\n \\end{tabular}\n \\end{center}\n}\n\\end{document}\n");
#line default
#line hidden
return this.GenerationEnvironment.ToString();
}
/// <summary>
/// Initialize this instance.
/// </summary>
public virtual void Initialize() {
if ((this.Errors.HasErrors == false)) {
bool _estimAcquired = false;
@ -749,10 +837,7 @@ namespace Yavsc.templates {
public class ToStringInstanceHelper {
private global::System.IFormatProvider formatProvider = global::System.Globalization.CultureInfo.InvariantCulture;
/// <summary>
/// Gets or sets the format provider.
/// </summary>
/// <value>The format provider.</value>
public global::System.IFormatProvider FormatProvider {
get {
return this.formatProvider;
@ -764,11 +849,7 @@ namespace Yavsc.templates {
this.formatProvider = value;
}
}
/// <summary>
/// Tos the string with culture.
/// </summary>
/// <returns>The string with culture.</returns>
/// <param name="objectToConvert">Object to convert.</param>
public string ToStringWithCulture(object objectToConvert) {
if ((objectToConvert == null)) {
throw new global::System.ArgumentNullException("objectToConvert");

@ -83,15 +83,19 @@
% Infos Client
\def\ClientNom{<#= to.Name #>} % Nom du client
\def\ClientAdresse{% % Adresse du client
<# if (!string.IsNullOrWhiteSpace(to.Address)) { #>
<#= to.Address #>\\
<#= to.ZipCode #> <#= to.CityAndState #>\\
<# } #> <# if (!string.IsNullOrWhiteSpace(to.ZipCode)) { #>
<#= to.ZipCode #> <# } #> <# if (!string.IsNullOrWhiteSpace(to.ZipCode)) { #>
<#= to.CityAndState #>\\ <# } #>
<# if (!string.IsNullOrWhiteSpace(to.Phone)) { #>
Téléphone fixe: <#= to.Phone #>\\
<# } #>
<# if (!string.IsNullOrWhiteSpace(to.Mobile)) { #>
Mobile: <#= to.Mobile #>\\
<# } #>
E-mail: <#= to.Email #>
<# if (!string.IsNullOrWhiteSpace(to.Email)) { #>
E-mail: <#= to.Email #><# } #>
}
% Liste des produits facturés : Désignation, prix

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
</configuration>

@ -4,6 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.Web.Profile;
using System.Web.Security;
using System.Web;
using System.Configuration;
namespace Yavsc.Model.RolesAndMembers
{
@ -13,6 +14,7 @@ namespace Yavsc.Model.RolesAndMembers
public class Profile
{
/// <summary>
/// Gets or sets the name.
/// </summary>
@ -210,6 +212,8 @@ namespace Yavsc.Model.RolesAndMembers
}
}
public string UserName { get ; set; }
public Profile () : base ()
{
}
@ -259,6 +263,8 @@ namespace Yavsc.Model.RolesAndMembers
s = profile.GetPropertyValue ("Mobile");
Mobile = (s is DBNull) ? null : (string)s;
UserName = profile.UserName;
MembershipUser u = Membership.GetUser (profile.UserName);
Email = u.Email;

Loading…