Documentation et fiche préstataire
Une nouvelle page de doc : la page des fonctionalités, [Features.md](Features.md), au format Markdown. * p8-av4.jpg: * p8-av4.l.jpg: * p8-av4.xs.jpg: p8-av4 * Performer.ascx: Implémente la fiche préstataire, avec son éventuel lien vers le blog * ITContentProvider.csproj: ... * NpgsqlBlogProvider.cs: implémente le compteur de billet en base de données * Presta.csproj: * TestAPI.csproj: * YavscClient.csproj: * fortune.csproj: * WebControls.csproj: * SalesCatalog.csproj: * NpgsqlMRPProviders.csproj: * NpgsqlBlogProvider.csproj: * NpgsqlContentProvider.csproj: ... * README.md: mise à jour des priorités * Yavsc.sln: ajout du fichier "Features.md" à la solution * BlogProvider.cs: doc xml * BlogManager.cs: implémente un accès au compteur de billet
This commit is contained in:
parent
dbcbf8b318
commit
e8bf2dd8fa
32 changed files with 156 additions and 38 deletions
|
|
@ -1,3 +1,10 @@
|
|||
2015-11-30 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NpgsqlBlogProvider.cs: implémente le compteur de billet en
|
||||
base de données
|
||||
|
||||
* NpgsqlBlogProvider.csproj: ...
|
||||
|
||||
2015-11-28 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NpgsqlBlogProvider.cs: xml doc
|
||||
|
|
|
|||
|
|
@ -15,11 +15,36 @@ namespace Npgsql.Web.Blog
|
|||
/// </summary>
|
||||
public class NpgsqlBlogProvider : BlogProvider
|
||||
{
|
||||
|
||||
|
||||
string applicationName;
|
||||
string connectionString;
|
||||
|
||||
#region implemented abstract members of BlogProvider
|
||||
|
||||
public override long GetPublicPostCount (string bloggerName)
|
||||
{
|
||||
long result = -1;
|
||||
using (NpgsqlConnection cnx = new NpgsqlConnection (connectionString))
|
||||
using (NpgsqlCommand cmd = cnx.CreateCommand ()) {
|
||||
cmd.CommandText = @"
|
||||
Select count(*)
|
||||
FROM blog b
|
||||
LEFT OUTER JOIN blog_access a ON a.post_id = b._id
|
||||
WHERE a.post_id IS NULL
|
||||
AND b.visible = TRUE
|
||||
AND b.username = :bname
|
||||
AND b.applicationname = :app
|
||||
|
||||
";
|
||||
cmd.Parameters.AddWithValue ("bname", bloggerName);
|
||||
cmd.Parameters.AddWithValue ("app", applicationName);
|
||||
cnx.Open ();
|
||||
result = (long) cmd.ExecuteScalar ();
|
||||
cnx.Close ();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates the post.
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@
|
|||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<DocumentationFile>bin\Debug\NpgsqlBlogProvider.xml</DocumentationFile>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>none</DebugType>
|
||||
|
|
@ -30,13 +29,11 @@
|
|||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Lua|AnyCPU' ">
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Lua</OutputPath>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'TotemPre|AnyCPU' ">
|
||||
<Optimize>false</Optimize>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue