* Web.config:
* Web.csproj: * Web.config: * Blog.cs: * Index.aspx: * BBCodeHelper.cs: * Comment.cs: * yavscModel.csproj: * BlogEntry.cs: * UserPost.aspx: * UserPosts.aspx: * Estimate.cs: * RemovePost.aspx: * TitleNotFound.aspx: * BlogProvider.cs: * AccountController.cs: * BlogsApiController.cs: * WorkFlowController.cs: * BlogEditEntryModel.cs: * FindBlogEntryFlags.cs: * BlogEntryCollection.cs: * Comment.cs: * BlogEditCommentModel.cs: * NpgsqlBlogProvider.cs: * NpgsqlContentProvider.cs: * BlogEntry.cs: * NpgsqlBlogProvider.csproj: * NpgsqlMembershipProvider.cs: * FindBlogEntryFlags.cs: * BlogEntryCollection.cs: * BlogHelper.cs: refactoring: moving code from NpgsqlBlogProvider to yavscModel.Blogs * BlogManager.cs: NpgsqlBlogProvider/BlogHelper.cs * BlogsController.cs: a successfull confirmed removal * Blog.cs: refactoring
This commit is contained in:
parent
bba917dcc0
commit
9fc7f82531
29 changed files with 213 additions and 114 deletions
26
yavscModel/Blogs/Blog.cs
Normal file
26
yavscModel/Blogs/Blog.cs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
using System;
|
||||
using System.Configuration;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace yavscModel.Blogs
|
||||
{
|
||||
public class Blog
|
||||
{
|
||||
string title;
|
||||
|
||||
[StringLength(512)]
|
||||
[Required]
|
||||
[DisplayName("Titre")]
|
||||
public string Title {
|
||||
get {
|
||||
return title;
|
||||
}
|
||||
set {
|
||||
title = value;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,9 +1,8 @@
|
|||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Npgsql.Web.Blog.DataModel;
|
||||
|
||||
namespace yavscModel
|
||||
namespace yavscModel.Blogs
|
||||
{
|
||||
public class BlogEditCommentModel:Comment
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Npgsql.Web.Blog.DataModel;
|
||||
|
||||
namespace yavscModel
|
||||
namespace yavscModel.Blogs
|
||||
{
|
||||
public class BlogEditEntryModel:BlogEntry
|
||||
{
|
||||
|
|
|
|||
88
yavscModel/Blogs/BlogEntry.cs
Normal file
88
yavscModel/Blogs/BlogEntry.cs
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
using System;
|
||||
using System.Configuration;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace yavscModel.Blogs
|
||||
{
|
||||
public class BlogEntry {
|
||||
long id;
|
||||
[DisplayName("Identifiant numérique de billet")]
|
||||
public long Id {
|
||||
get {
|
||||
return id;
|
||||
}
|
||||
set {
|
||||
id = value;
|
||||
}
|
||||
}
|
||||
|
||||
string title;
|
||||
|
||||
[DisplayName("Titre du billet")]
|
||||
[StringLength(512)]
|
||||
[RegularExpression("^[^:%&?]*$",ErrorMessage = "Les caratères suivants sont invalides pour un titre: :%&?")]
|
||||
[Required(ErrorMessage = "S'il vous plait, saisissez un titre")]
|
||||
public string Title {
|
||||
get {
|
||||
return title;
|
||||
}
|
||||
set {
|
||||
title = value;
|
||||
}
|
||||
}
|
||||
|
||||
string content;
|
||||
|
||||
[DisplayName("Corps du billet")]
|
||||
[Required(ErrorMessage = "S'il vous plait, saisissez un texte.")]
|
||||
public string Content {
|
||||
get {
|
||||
return content;
|
||||
}
|
||||
set {
|
||||
content = value;
|
||||
}
|
||||
}
|
||||
|
||||
string userName;
|
||||
|
||||
[StringLength(255)]
|
||||
[DisplayName("Nom de l'auteur")]
|
||||
public string UserName {
|
||||
get {
|
||||
return userName;
|
||||
}
|
||||
set {
|
||||
userName = value;
|
||||
}
|
||||
}
|
||||
|
||||
public DateTime posted;
|
||||
|
||||
[DisplayName("Date de creation")]
|
||||
public DateTime Posted {
|
||||
get {
|
||||
return posted;
|
||||
}
|
||||
set {
|
||||
posted = value;
|
||||
}
|
||||
}
|
||||
|
||||
public DateTime modified;
|
||||
|
||||
[DisplayName("Date de modification")]
|
||||
public DateTime Modified {
|
||||
get {
|
||||
return modified;
|
||||
}
|
||||
set {
|
||||
modified = value;
|
||||
}
|
||||
}
|
||||
public bool Visible { get; set ; }
|
||||
public string [] Tags { get; set ; }
|
||||
}
|
||||
|
||||
}
|
||||
12
yavscModel/Blogs/BlogEntryCollection.cs
Normal file
12
yavscModel/Blogs/BlogEntryCollection.cs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
using System;
|
||||
using System.Configuration;
|
||||
using System.Collections.Generic;
|
||||
using yavscModel.Blogs;
|
||||
|
||||
namespace yavscModel.Blogs
|
||||
{
|
||||
public class BlogEntryCollection : List<BlogEntry>
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
76
yavscModel/Blogs/Comment.cs
Normal file
76
yavscModel/Blogs/Comment.cs
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
using System;
|
||||
using System.Configuration;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace yavscModel.Blogs
|
||||
{
|
||||
public class Comment
|
||||
{
|
||||
long id;
|
||||
[DisplayName("Identifiant numérique de commentaire")]
|
||||
public long Id {
|
||||
get {
|
||||
return id;
|
||||
}
|
||||
set {
|
||||
id = value;
|
||||
}
|
||||
}
|
||||
long postid;
|
||||
[DisplayName("Identifiant numérique du billet commenté")]
|
||||
public long PostId {
|
||||
get {
|
||||
return postid;
|
||||
}
|
||||
set {
|
||||
postid = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets or sets the author of this comment.
|
||||
/// </summary>
|
||||
/// <value>From.</value>
|
||||
public string From { get; set; }
|
||||
|
||||
string content;
|
||||
[DisplayName("Contenu")]
|
||||
[Required(ErrorMessage = "S'il vous plait, saisissez un contenu")]
|
||||
public string CommentText {
|
||||
get {
|
||||
return content;
|
||||
}
|
||||
set {
|
||||
content = value;
|
||||
}
|
||||
}
|
||||
|
||||
public DateTime posted;
|
||||
|
||||
[DisplayName("Date de creation")]
|
||||
public DateTime Posted {
|
||||
get {
|
||||
return posted;
|
||||
}
|
||||
set {
|
||||
posted = value;
|
||||
}
|
||||
}
|
||||
|
||||
public DateTime modified;
|
||||
|
||||
[DisplayName("Date de modification")]
|
||||
public DateTime Modified {
|
||||
get {
|
||||
return modified;
|
||||
}
|
||||
set {
|
||||
modified = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool Visible { get; set ; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
15
yavscModel/Blogs/FindBlogEntryFlags.cs
Normal file
15
yavscModel/Blogs/FindBlogEntryFlags.cs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
using System;
|
||||
using System.Configuration;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace yavscModel.Blogs
|
||||
{
|
||||
|
||||
public enum FindBlogEntryFlags : byte {
|
||||
MatchTitle = 1,
|
||||
MatchContent = 2,
|
||||
MatchUserName = 4,
|
||||
MatchInvisible = 8
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -7,7 +7,9 @@ namespace yavscModel.WorkFlow
|
|||
public Estimate ()
|
||||
{
|
||||
}
|
||||
public string Description { get; set; }
|
||||
public string Title { get; set; }
|
||||
public string Owner { get; set; }
|
||||
|
||||
public decimal Ciffer {
|
||||
get {
|
||||
decimal total = 0;
|
||||
|
|
|
|||
|
|
@ -58,6 +58,11 @@
|
|||
<Compile Include="WorkFlow\IWFOrder.cs" />
|
||||
<Compile Include="WorkFlow\OrderStatusChangedEventArgs.cs" />
|
||||
<Compile Include="IProvider.cs" />
|
||||
<Compile Include="Blogs\BlogEntry.cs" />
|
||||
<Compile Include="Blogs\Blog.cs" />
|
||||
<Compile Include="Blogs\BlogEntryCollection.cs" />
|
||||
<Compile Include="Blogs\Comment.cs" />
|
||||
<Compile Include="Blogs\FindBlogEntryFlags.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
|
|
@ -68,10 +73,6 @@
|
|||
<Folder Include="FileSystem\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\NpgsqlBlogProvider\NpgsqlBlogProvider.csproj">
|
||||
<Project>{C6E9E91B-97D3-48D9-8AA7-05356929E162}</Project>
|
||||
<Name>NpgsqlBlogProvider</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\SalesCatalog\SalesCatalog.csproj">
|
||||
<Project>{90BF2234-7252-4CD5-B2A4-17501B19279B}</Project>
|
||||
<Name>SalesCatalog</Name>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue