Un bouton "Demander un devis"
* INominative.cs: Interface d'un objet destiné à un préstataire spécifié, par une propriété `PerformerName` * NominativeSimpleBookingQuery.cs: implémente l'interface INominative * packages.config: * packages.config: * packages.config: * ITContentProvider.csproj: * NpgsqlBlogProvider.csproj: * NpgsqlContentProvider.csproj: mise à niveau Npgsql * NpgsqlContentProvider.cs: stocke la classe de commande * AccountController.cs: implémente la methode de login de l'API * BasketController.cs: implémente la methode de recupération du panier * AccountController.cs: enléve un commaentaire obsolète * YavscHelpers.cs: * FrontOfficeController.cs: refabrication de l'ajout au panier * yavsc.user.js: enlève un message de debuggage js * Performer.ascx: formattage * Performers.aspx: implémente le bouton de demande de reservation * Yavsc.csproj: validate unobtrusive * packages.config: référence M$ Owin * UserFileSystemManager.cs: Fixe: Ne pas créer un dossier de destination si on a aucun fichier à recevoir. * Commande.cs: * Ajoute le nom du client dans l'objet commande * Factorise le positionnement des paramêtres * La commande est une instance du type spécifié à la commande, dans son paramêtre `type` * SimpleBookingQuery.cs: refabrication * LocalizedText.resx: * LocalizedText.fr.resx: traducations * UserNameBase.cs: implemente l'interface `IUserName` * IContentProvider.cs: doc xml * YavscModel.csproj: reference le nouveau code source * Web.config: retour à une version d'équère * IUserName.cs: Définit l'interface d'un objet associé à un utilisateur.
This commit is contained in:
parent
1cb3a692ef
commit
2a1301d93c
34 changed files with 409 additions and 77 deletions
|
|
@ -1,3 +1,10 @@
|
|||
2015-12-23 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NpgsqlContentProvider.cs: stocke la classe de commande
|
||||
|
||||
* packages.config:
|
||||
* NpgsqlContentProvider.csproj: mise à niveau Npgsql
|
||||
|
||||
2015-12-15 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NpgsqlContentProvider.cs: bug fix
|
||||
|
|
|
|||
|
|
@ -178,12 +178,15 @@ namespace Yavsc
|
|||
using (NpgsqlConnection cnx = CreateConnection ()) {
|
||||
using (NpgsqlCommand cmd = cnx.CreateCommand ()) {
|
||||
cmd.CommandText =
|
||||
"insert into commandes (prdref,creation,params,clientname,applicationname) values (@pref,@creat,@prms,@cli,@app) returning id";
|
||||
cmd.Parameters.AddWithValue ("@pref", com.ProductRef);
|
||||
cmd.Parameters.AddWithValue ("@creat", com.CreationDate);
|
||||
cmd.Parameters.AddWithValue ("@prms", JsonConvert.SerializeObject (com.Parameters));
|
||||
cmd.Parameters.AddWithValue ("@cli", Membership.GetUser ().UserName);
|
||||
cmd.Parameters.AddWithValue ("@app", ApplicationName);
|
||||
"insert into commandes (prdref,creation,params,class,clientname,applicationname) values (:pref,:creat,:prms,:cls,:cli,:app) returning id";
|
||||
cmd.Parameters.AddWithValue ("pref", com.ProductRef);
|
||||
cmd.Parameters.AddWithValue ("creat", com.CreationDate);
|
||||
cmd.Parameters.AddWithValue ("prms", NpgsqlTypes.NpgsqlDbType.Jsonb,
|
||||
JsonConvert.SerializeObject(
|
||||
com.Parameters));
|
||||
cmd.Parameters.AddWithValue ("cls", com.GetType().FullName);
|
||||
cmd.Parameters.AddWithValue ("cli", com.ClientName);
|
||||
cmd.Parameters.AddWithValue ("app", ApplicationName);
|
||||
cnx.Open ();
|
||||
com.Id = id = (long)cmd.ExecuteScalar ();
|
||||
}
|
||||
|
|
@ -209,7 +212,7 @@ namespace Yavsc
|
|||
using (NpgsqlConnection cnx = CreateConnection ()) {
|
||||
using (NpgsqlCommand cmd = cnx.CreateCommand ()) {
|
||||
cmd.CommandText =
|
||||
"select id,creation,prdref,params,class from commandes where @user = clientname and applicationname = @app";
|
||||
"select id,creation,prdref,params::TEXT,class from commandes where @user = clientname and applicationname = @app";
|
||||
cmd.Parameters.AddWithValue ("@user", username);
|
||||
cmd.Parameters.AddWithValue ("@app", this.ApplicationName);
|
||||
cnx.Open ();
|
||||
|
|
@ -220,10 +223,10 @@ namespace Yavsc
|
|||
ycmd.Id = rdr.GetInt64 (0);
|
||||
ycmd.CreationDate = rdr.GetDateTime (1);
|
||||
ycmd.ProductRef = rdr.GetString (2);
|
||||
|
||||
object prms = JsonConvert.DeserializeObject<Dictionary<string,string>> (rdr.GetString (3));
|
||||
ycmd.Parameters = prms as Dictionary<string,string>;
|
||||
|
||||
ycmd.ClientName = username;
|
||||
var prms = rdr.GetString (3);
|
||||
var obj = JsonConvert.DeserializeObject<Dictionary<string,string>> (prms);
|
||||
ycmd.SetParameters(obj as Dictionary<string,string>);
|
||||
cmds.Add (ycmd);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@
|
|||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Npgsql">
|
||||
<HintPath>..\packages\Npgsql.3.0.3\lib\net45\Npgsql.dll</HintPath>
|
||||
<HintPath>..\packages\Npgsql.3.0.4\lib\net45\Npgsql.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Npgsql" version="3.0.3" targetFramework="net45" />
|
||||
<package id="Npgsql" version="3.0.4" targetFramework="net45" />
|
||||
</packages>
|
||||
Loading…
Add table
Add a link
Reference in a new issue