Merge from booking branch

This commit is contained in:
Paul Schneider 2015-11-17 22:22:59 +01:00
commit 9a2652739b
266 changed files with 12833 additions and 2337 deletions

View file

@ -33,7 +33,7 @@ namespace Yavsc.Model.Blogs
/// <summary>
/// Base post.
/// </summary>
public class BasePost {
public class BasePost: IRating {
/// <summary>
/// The identifier.
/// </summary>
@ -140,5 +140,25 @@ namespace Yavsc.Model.Blogs
/// </summary>
/// <value><c>true</c> if visible; otherwise, <c>false</c>.</value>
public bool Visible { get; set ; }
/// <summary>
/// Gets or sets the rate.
/// </summary>
/// <value>The rate.</value>
public int Rate { get; set; }
/// <summary>
/// Gets or sets the circles allowed to read this ticket.
/// An empty collection specifies a public post.
/// </summary>
/// <value>The circles.</value>
[Display(Name="Cercles autorisés")]
public long[] AllowedCircles { get; set; }
/// <summary>
/// Gets or sets the tags.
/// </summary>
/// <value>The tags.</value>
public string [] Tags { get; set ; }
}
}

View file

@ -37,6 +37,21 @@ namespace Yavsc.Model.Blogs
/// The intro.
/// </summary>
public string Intro;
public bool Truncated;
public BasePostInfo (BlogEntry be)
{
Title = be.Title;
Id = be.Id;
Posted = be.Posted;
Modified = be.Modified;
Intro = MarkdownHelper.MarkdownIntro (be.Content, out Truncated);
Photo = be.Photo;
Tags = be.Tags;
AllowedCircles = be.AllowedCircles;
Visible = be.Visible;
Rate = be.Rate;
}
}
}

View file

@ -11,22 +11,7 @@ namespace Yavsc.Model.Blogs
/// Blog entry.
/// </summary>
public class BlogEntry : BasePost {
/// <summary>
/// Gets or sets the circles allowed to read this ticket.
/// An empty collection specifies a public post.
/// </summary>
/// <value>The circles.</value>
[Display(Name="Cercles autorisés")]
public long[] AllowedCircles { get; set; }
/// <summary>
/// Gets or sets the tags.
/// </summary>
/// <value>The tags.</value>
public string [] Tags { get; set ; }
string content;
/// <summary>
@ -34,7 +19,6 @@ namespace Yavsc.Model.Blogs
/// </summary>
/// <value>The content.</value>
[DisplayName("Corps du billet")]
[Required(ErrorMessage = "S'il vous plait, saisissez un texte.")]
public string Content {
get {
return content;

View file

@ -84,19 +84,10 @@ namespace Yavsc.Model.Blogs
/// </summary>
public IEnumerable<IGrouping<string,BasePostInfo>> GroupByTitle ()
{
bool truncated;
return from be in this
orderby be.Posted descending
group
new BasePostInfo { Author = be.Author, Id = be.Id,
Posted = be.Posted, Modified = be.Modified,
Intro = MarkdownHelper.MarkdownIntro (be.Content, out truncated),
Visible = be.Visible,
Photo = be.Photo
}
by be.Title
into titlegroup
select titlegroup;
group new BasePostInfo(be) by be.Title
into titlegroup select titlegroup;
}
/// <summary>
@ -105,19 +96,10 @@ namespace Yavsc.Model.Blogs
/// <returns>The by user.</returns>
public IEnumerable<IGrouping<string,BasePostInfo>> GroupByUser ()
{
bool truncated;
return from be in this
orderby be.Posted descending
group
new BasePostInfo {
Title = be.Title,
Id = be.Id,
Posted = be.Posted,
Modified = be.Modified,
Intro = MarkdownHelper.MarkdownIntro (be.Content, out truncated),
Photo = be.Photo,
Visible = be.Visible
}
new BasePostInfo (be)
by be.Author
into usergroup
select usergroup;

View file

@ -1,35 +0,0 @@
using System;
using System.Configuration;
using System.Reflection;
using System.Collections.Specialized;
namespace Yavsc.Model.Blogs
{
/// <summary>
/// Blog helper.
/// </summary>
public static class BlogHelper
{
/// <summary>
/// Gets the provider.
/// </summary>
/// <returns>The provider.</returns>
public static BlogProvider GetProvider ()
{
DataProviderConfigurationSection config = ConfigurationManager.GetSection ("system.web/blog") as DataProviderConfigurationSection;
if (config == null)
throw new ConfigurationErrorsException("The configuration bloc for the blog provider was not found");
ProviderSettings celt =
config.Providers[config.DefaultProvider];
if (config == null)
throw new ConfigurationErrorsException("The default blog provider was not found");
ConstructorInfo ci = Type.GetType (celt.Type).GetConstructor (Type.EmptyTypes);
BlogProvider bp = ci.Invoke (Type.EmptyTypes) as BlogProvider;
bp.Initialize (celt.Name, celt.Parameters);
return bp;
}
}
}

View file

@ -12,11 +12,21 @@ using System.Collections.Generic;
namespace Yavsc.Model.Blogs
{
/// <summary>
/// Blog manager.
/// </summary>
public static class BlogManager
public static class BlogManager
{
static BlogProvider provider = null;
static BlogProvider Provider {
get {
if (provider == null)
provider = ManagerHelper.GetDefaultProvider<BlogProvider>
("system.web/blog");
return provider;
}
}
/// <summary>
/// Removes the comment.
/// </summary>
@ -39,20 +49,6 @@ namespace Yavsc.Model.Blogs
Provider.Comment (from, postid, content);
}
static BlogProvider provider;
/// <summary>
/// Gets the provider.
/// </summary>
/// <value>The provider.</value>
public static BlogProvider Provider {
get {
if (provider == null)
provider = BlogHelper.GetProvider ();
return provider;
}
}
/// <summary>
/// Gets the post.
/// </summary>
@ -99,7 +95,10 @@ namespace Yavsc.Model.Blogs
{
Provider.UpdatePost (postid, title, content, visible, cids);
}
public static void UpdatePost (BlogEntry be)
{
Provider.UpdatePost (be);
}
/// <summary>
/// Updates the post photo.
/// </summary>
@ -152,9 +151,22 @@ namespace Yavsc.Model.Blogs
}
Provider.RemoveTitle (username, title);
}
public static TagInfo GetTagInfo(string tagname)
/// <summary>
/// Gets the tag info.
/// </summary>
/// <returns>The tag info.</returns>
/// <param name="tagname">Tagname.</param>
/// <param name="pageIndex">Page index.</param>
/// <param name="pageSize">Page size.</param>
public static TagInfo GetTagInfo(string tagname, int pageIndex=0, int pageSize=50)
{
return Provider.GetTagInfo (tagname);
var res = new TagInfo (tagname);
int recordCount = 0;
var posts = Provider.FindPost (null,tagname,FindBlogEntryFlags.MatchTag,pageIndex,pageSize,out recordCount);
res.Titles = posts.GroupByTitle ().ToArray();
res.Name = tagname;
// out int recordCount ,
return res;
}
/// <summary>
/// Lasts the posts.
@ -192,9 +204,9 @@ namespace Yavsc.Model.Blogs
}
public static void Note (long postid, int note)
public static void Rate (long postid, int rate)
{
Provider.Note (postid, note);
Provider.Rate (postid, rate);
}
/// <summary>

View file

@ -19,12 +19,6 @@ namespace Yavsc.Model.Blogs
/// <param name="postid">Postid.</param>
public abstract BlogEntry GetPost (long postid);
/// <summary>
/// Gets the tag info.
/// </summary>
/// <returns>The tag info.</returns>
/// <param name="tagname">Tagname.</param>
public abstract TagInfo GetTagInfo (string tagname);
/// <summary>
/// Gets the post collection from a given user and at a given title.
@ -50,8 +44,8 @@ namespace Yavsc.Model.Blogs
/// Note the specified postid and note.
/// </summary>
/// <param name="postid">Postid.</param>
/// <param name="note">Note.</param>
public abstract void Note (long postid, int note);
/// <param name="rate">rate.</param>
public abstract void Rate (long postid, int rate);
/// <summary>
@ -65,6 +59,13 @@ namespace Yavsc.Model.Blogs
/// <param name="allowedCircles">Allowed circles.</param>
public abstract void UpdatePost (long postid, string title, string content, bool visible, long[] allowedCircles);
/// <summary>
/// Updates the post.
/// </summary>
/// <param name="be">Be.</param>
public abstract void UpdatePost ( BlogEntry be );
/// <summary>
/// Finds a post.
/// </summary>

View file

@ -20,13 +20,14 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
using System;
using System.Collections.Generic;
using System.Linq;
namespace Yavsc.Model.Blogs
{
/// <summary>
/// Tag info.
/// </summary>
public abstract class TagInfo
public class TagInfo
{
string name;
/// <summary>
@ -54,7 +55,7 @@ namespace Yavsc.Model.Blogs
/// Gets the titles.
/// </summary>
/// <value>The titles.</value>
public abstract IEnumerable<BasePostInfo> Titles { get; }
public IEnumerable<IGrouping<string,BasePostInfo>> Titles { get; set; }
}
}

View file

@ -1,86 +0,0 @@
//
// AskForADate.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/>.
using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
namespace Yavsc.Model.Calendar
{
/// <summary>
/// Ask for A date.
/// </summary>
public class BookQuery
{
/// <summary>
/// Gets or sets the prefered date.
/// </summary>
/// <value>The prefered date.</value>
[DataType(DataType.Date)]
[DisplayFormat(DataFormatString = "{0:yyyy/MM/dd}", ApplyFormatInEditMode = true)]
[Display(ResourceType=typeof(LocalizedText),Name="StartDate")]
public DateTime StartDate { get; set; }
/// <summary>
/// Gets or sets the minimum time.
/// </summary>
/// <value>The minimum time.</value>
[RegularExpression("\\d\\d:\\d\\d")]
[Display(ResourceType=typeof(LocalizedText),Name="StartHour")]
[Required(ErrorMessage= "S'il vous plait, saisissez une heure de début d'intervention")]
public string StartHour { get; set; }
/// <summary>
/// Gets or sets the max date.
/// </summary>
/// <value>The max date.</value>
[Display(Name="EndDate",ResourceType=typeof(LocalizedText))]
[DataType(DataType.Date)]
[DisplayFormat(DataFormatString = "{0:yyyy/MM/dd}", ApplyFormatInEditMode = true)]
public DateTime EndDate { get; set; }
/// <summary>
/// Gets or sets the minimal duration.
/// </summary>
/// <value>The duration.</value>
[RegularExpression("\\d\\d:\\d\\d")]
[Required(ErrorMessage= "S'il vous plait, saisissez une heure de fin d'intervention")]
[Display(Name="EndHour",ResourceType=typeof(LocalizedText))]
public string EndHour { get; set; }
/// <summary>
/// Gets or sets the person.
/// </summary>
/// <value>The name of the user.</value>
[Display(Name="Person",ResourceType=typeof(LocalizedText))]
public string Person { get; set; }
/// <summary>
/// Gets or sets the role.
/// </summary>
/// <value>The role.</value>
[Required(ErrorMessage= "S'il vous plait, saisissez le type d'intervention souhaité")]
[Display(Name="Role",ResourceType=typeof(LocalizedText))]
public string Role { get; set; }
}
}

View file

@ -25,8 +25,22 @@ using System.Collections.Generic;
namespace Yavsc.Model.Calendar
{
/// <summary>
/// I calendar manager.
/// </summary>
public interface ICalendarManager {
IFreeDateSet GetFreeDates(string username, BookQuery req);
/// <summary>
/// Gets the free dates.
/// </summary>
/// <returns>The free dates.</returns>
/// <param name="username">Username.</param>
/// <param name="req">Req.</param>
IFreeDateSet GetFreeDates(string username, BookingQuery req);
/// <summary>
/// Book the specified username and ev.
/// </summary>
/// <param name="username">Username.</param>
/// <param name="ev">Ev.</param>
bool Book(string username, YaEvent ev);
}
}

View file

@ -26,6 +26,9 @@ using Yavsc.Model;
namespace Yavsc.Model.Calendar
{
/// <summary>
/// Base event.
/// </summary>
public class BaseEvent
{
/// <summary>

View file

@ -1,235 +1,139 @@
2015-11-04 Paul Schneider <paul@pschneider.fr>
2015-11-17 Paul Schneider <paul@pschneider.fr>
* LocalizedText.resx:
* LocalizedText.fr.resx:
* LocalizedText.Designer.cs:
* LocalizedText.fr.Designer.cs: texts relatives to message or
notification sending
* PerformerProfile.cs: implements a performer profile
2015-11-04 Paul Schneider <paul@pschneider.fr>
* SkillManager.cs:
* SkillProvider.cs: Makes the method rendering skills return a
PerformerProfile object
* BlogManager.cs:
* BlogProvider.cs:
* YavscModel.csproj: replaces the UserSkillProfile with the
PerformerProfile class
2015-11-03 Paul Schneider <paul@pschneider.fr>
* UserSkillProfile.cs: obsolete
* LocalizedText.resx:
* LocalizedText.fr.resx:
* LocalizedText.Designer.cs:
* LocalizedText.fr.Designer.cs: I understood ...
2015-11-17 Paul Schneider <paul@pschneider.fr>
* Notification.cs: a new click action name.
2015-11-01 Paul Schneider <paul@pschneider.fr>
* IRating.cs:
* IComment.cs:
* IIdentified.cs:
* IAuthorized.cs:
* BasePost.cs:
* SkillProvider.cs: refactorization
* Skill.cs:
* YavscModel.csproj:
* PostInfoByUser.cs:
* PostInfoByTitle.cs:
* BlogEntryCollection.cs: refactoring
* UserSkill.cs:
* SkillManager.cs:
* UserSkillRating.cs:
* UserSkillProfile.cs:
* UserSkillReference.cs:
* UserSkillDeclaration.cs: implements the skill data model
2015-11-01 Paul Schneider <paul@pschneider.fr>
* ProfileEdition.cs: Fixes the username modification
* LocalizedText.resx:
* LocalizedText.fr.resx:
* LocalizedText.Designer.cs:
* LocalizedText.fr.Designer.cs: WIP booking
* ChangePasswordModel.cs:
* RegisterClientModel.cs: A regexp for user name
* LoginModel.cs: A regexp for user name and password
* Profile.cs: A regexp for user name, and profile usage fixes
* UserManager.cs: Checks for username availability before
trying to modify it
* YavscModel.csproj: `ProfileEdition` class addition
* ChangeLog: useless here
* BookQuery.cs: Start, end hour and role are required
* OtherWebException.cs: useless
2015-10-31 Paul Schneider <paul@pschneider.fr>
* LocalizedText.resx:
* OtherWebException.cs:
* BookQuery.cs:
* LocalizedText.fr.resx:
* LocalizedText.Designer.cs:
* LocalizedText.fr.Designer.cs:
2015-10-30 Paul Schneider <paul@pschneider.fr>
* LocalizedText.resx:
* LocalizedText.fr.resx:
* BookQuery.cs:
* LocalizedText.Designer.cs:
* Link.cs:
* Note.cs:
* Euro.cs:
* Text.cs:
* Unit.cs:
* LocalizedText.fr.Designer.cs:
* Brand.cs:
* Label.cs:
* Scalar.cs:
* Period.cs:
* Option.cs:
* Product.cs:
* Catalog.cs:
* Service.cs:
* SaleForm.cs:
* Currency.cs:
* CheckBox.cs:
* FormInput.cs:
* TextInput.cs:
* SelectItem.cs:
* FilesInput.cs:
* RadioButton.cs:
* StockStatus.cs:
* SelectInput.cs:
* FormElement.cs:
* ProductImage.cs:
* CatalogHelper.cs:
* CatalogManager.cs:
* CatalogProvider.cs:
* PhysicalProduct.cs:
* ProductCategory.cs:
* CatalogProviderConfigurationElement.cs:
* CatalogProvidersConfigurationSection.cs:
* CatalogProvidersConfigurationCollection.cs:
* WorkFlowManager.cs:
* IContentProvider.cs:
* Price.cs:
* PriceOnItemCount.cs: refactoring: a dedicated name space for
the catalog
2015-10-29 Paul Schneider <paul@pschneider.fr>
* YavscModel.csproj:
* Commande.cs:
* WebFileSystemManager.cs: Refactoring the name of the files
manager class
2015-10-28 Paul Schneider <paul@pschneider.fr>
* ICalendarManager.cs: WIP booking TODO a calendar provider
* UserSkillComment.cs: defines an user's skill comment
* GDate.cs:
* YaEvent.cs:
* IFreeDateSet.cs: WIP booking
* LocalizedText.resx:
* LocalizedText.fr.resx:
* LocalizedText.Designer.cs:
* LocalizedText.fr.Designer.cs: implements the message "uses
cookies"
* YavscModel.csproj: refactoring
* Notification.cs: The Yavsc otification will start as a
Google one ...
many properties are not yet used, but all seems usefull.
2015-10-27 Paul Schneider <paul@pschneider.fr>
* YavscModel.csproj:
* LocalizedText.resx:
* FreeDate.cs:
* BookQuery.cs:
* LocalizedText.fr.resx:
* LocalizedText.Designer.cs:
* LocalizedText.fr.Designer.cs:
2015-10-23 Paul Schneider <paul@pschneider.fr>
* LocalizedText.resx:
* LocalizedText.fr.resx:
* LocalizedText.Designer.cs:
* LocalizedText.fr.Designer.cs: Existant DB message
2015-10-22 Paul Schneider <paul@pschneider.fr>
* LocalizedText.resx:
* LocalizedText.fr.resx:
* LocalizedText.Designer.cs:
* LocalizedText.fr.Designer.cs: Localizes a "bill removal"
2015-10-19 Paul Schneider <paul@pschneider.fr>
* YavscModel.csproj:
* MarkdownHelper.cs:
2015-10-17 Paul Schneider <paul@pschneider.fr>
* BlogManager.cs:
2015-10-17 Paul Schneider <paul@pschneider.fr>
* TagInfo.cs:
* YavscModel.csproj:
* BasePost.cs:
* LocalizedText.resx:
* LocalizedText.fr.resx:
* BlogProvider.cs:
* BasePostInfo.cs:
* PostInfoByUser.cs:
* PostInfoByTitle.cs:
* CircleBase.cs:
* Profile.cs:
* CalendarListEntry.cs:
* CalendarEventList.cs:
* UserRole.cs:
* ICalendarManager.cs:
* ProfileEdition.cs:
* LostPasswordModel.cs:
* RegisterClientModel.cs: xmldoc
* LocalizedText.fr.resx: skills
* Manager.cs: throws an exception when implementation for the
provider was not found
* IDataProvider.cs: xml doc
2015-11-14 Paul Schneider <paul@pschneider.fr>
* IRated.cs:
* BlogHelper.cs:
* ICalendarManager.cs:
* Manager.cs:
* BookingQuery.cs: refactoring
* Manager.cs:
* YavscModel.csproj:
* SkillRating.cs:
* SkillManager.cs:
* SkillRating.cs:
* SkillProvider.cs:
* SkillManager.cs:
* SkillProvider.cs:
* SkillDeclaration.cs:
* SkillDeclaration.cs: VIP skills
* BasePost.cs: One may rate a bill
* BlogProvider.cs: The blogs provider takes BlogEntry objects
at Update time
* LocalizedText.resx:
* LocalizedText.fr.resx:
* LocalizedText.Designer.cs:
* LocalizedText.fr.Designer.cs:
* BlogEntryCollection.cs:
* LocalizedText.fr.Designer.cs: WIP skills
2015-10-17 Paul Schneider <paul@pschneider.fr>
* Profile.cs: prettifies the code, as long as the profile
providers does'nt return any more DBNull values
* PostTag.cs:
* BlogManager.cs: Uses the static ManagerHelper class to get
the configuration
2015-11-11 Paul Schneider <paul@pschneider.fr>
* BasePost.cs: all BasePost contains a rate
* BasePostInfo.cs: due to base implementation
* BlogEntry.cs: code formatting
* BlogManager.cs: Fixes the taginfo object delivering
* BlogProvider.cs: refactoring
* LocalizedText.resx:
* LocalizedText.fr.resx:
* LocalizedText.Designer.cs:
* LocalizedText.fr.Designer.cs: localizes UserInRole
* LoginModel.cs: enables spaces in the legacy login names
* Profile.cs: gives users the theme choice
2015-11-08 Paul Schneider <paul@pschneider.fr>
* LoginModel.cs:
* UserNameBase.cs: enables legacy login with spaces in the
user name
* ProfileEdition.cs: xml doc
2015-11-06 Paul Schneider <paul@pschneider.fr>
* ChangeLog:
* TagInfo.cs:
* BasePost.cs:
* YavscModel.csproj:
* BlogEntry.cs:
* LocalizedText.resx:
* Automate.cs:
* LocalizedText.fr.resx:
* LocalizedText.Designer.cs:
* BlogEntryCollection.cs:
* LocalizedText.fr.Designer.cs:
2015-10-13 Paul Schneider <paul@pschneider.fr>
* BasePost.cs: refactoring:
allows the "PostActions" user control to use a common base
object as post reference
* YavscModel.csproj:
* BlogEntry.cs:
* BlogEntryCollection.cs: refactoring
* BlogManager.cs: Makes the blog manager expose of the new
`UnTag` method
* BlogProvider.cs: introduces a method to `untag`
* FindBlogEntryFlags.cs: Find post entry by tag
* LocalizedText.resx:
* LocalizedText.Designer.cs: new translations: - "Tag"
- "Edit"
* LocalizedText.fr.resx:
* LocalizedText.fr.Designer.cs: nouvelles traductions: - "Tag"
- "Edit"
* Profile.cs: a nicer stack trace at buggy usage
2015-10-10 Paul Schneider <paul@pschneider.fr>
* YavscModel.csproj:
* BlogManager.cs:
* UTBlogEntryCollection.cs:
* UUTBlogEntryCollection.cs:
* FileSystemManager.cs:
* BlogProvider.cs:
* BookQuery.cs:
* BasePostInfo.cs:
* LocalizedText.fr.resx:
* IFreeDateSet.cs:
* LocalizedText.Designer.cs:
* Notification.cs:
* LocalizedText.fr.Designer.cs:
* ICalendarManager.cs:
* BlogEntryCollection.cs:
* ProfileEdition.cs:
* WebFileSystemManager.cs:

View file

@ -22,8 +22,14 @@ using System;
namespace Yavsc.Model.Circles
{
/// <summary>
/// Circle base.
/// </summary>
public class CircleBase
{
/// <summary>
/// Initializes a new instance of the <see cref="Yavsc.Model.Circles.CircleBase"/> class.
/// </summary>
public CircleBase ()
{
}

View file

@ -23,13 +23,22 @@ using System;
namespace Yavsc.Model.Google
{
/// <summary>
/// Calendar event list.
/// </summary>
public class CalendarEventList
{
/// <summary>
/// The next page token.
/// </summary>
public string nextPageToken;
/// <summary>
/// The next sync token.
/// </summary>
public string nextSyncToken;
/// <summary>
/// The items.
/// </summary>
public Resource [] items ;
}
}

View file

@ -115,7 +115,9 @@ namespace Yavsc.Model.Google
*/
}
/// <summary>
/// Reminder.
/// </summary>
public class Reminder {
/// <summary>
/// Gets or sets the method.

View file

@ -23,9 +23,21 @@ using System;
namespace Yavsc.Model.Google
{
/// <summary>
/// G date.
/// </summary>
public class GDate {
/// <summary>
/// The date.
/// </summary>
public DateTime date;
/// <summary>
/// The datetime.
/// </summary>
public DateTime datetime;
/// <summary>
/// The time zone.
/// </summary>
public string timeZone;
}

View file

@ -244,6 +244,12 @@ namespace Yavsc.Model {
}
}
public static string Skills {
get {
return ResourceManager.GetString("Skills", resourceCulture);
}
}
public static string Title {
get {
return ResourceManager.GetString("Title", resourceCulture);
@ -286,6 +292,12 @@ namespace Yavsc.Model {
}
}
public static string PhotoUpdated {
get {
return ResourceManager.GetString("PhotoUpdated", resourceCulture);
}
}
public static string Register {
get {
return ResourceManager.GetString("Register", resourceCulture);
@ -364,6 +376,12 @@ namespace Yavsc.Model {
}
}
public static string was_added_to_the_role {
get {
return ResourceManager.GetString("was_added_to_the_role", resourceCulture);
}
}
public static string Offline {
get {
return ResourceManager.GetString("Offline", resourceCulture);
@ -406,9 +424,9 @@ namespace Yavsc.Model {
}
}
public static string View_source {
public static string Skill {
get {
return ResourceManager.GetString("View_source", resourceCulture);
return ResourceManager.GetString("Skill", resourceCulture);
}
}
@ -436,6 +454,12 @@ namespace Yavsc.Model {
}
}
public static string View_source {
get {
return ResourceManager.GetString("View_source", resourceCulture);
}
}
public static string EndDate {
get {
return ResourceManager.GetString("EndDate", resourceCulture);
@ -472,9 +496,9 @@ namespace Yavsc.Model {
}
}
public static string was_added_to_the_role {
public static string BillUpdated {
get {
return ResourceManager.GetString("was_added_to_the_role", resourceCulture);
return ResourceManager.GetString("BillUpdated", resourceCulture);
}
}
@ -532,6 +556,12 @@ namespace Yavsc.Model {
}
}
public static string BillCreated {
get {
return ResourceManager.GetString("BillCreated", resourceCulture);
}
}
public static string StartDate {
get {
return ResourceManager.GetString("StartDate", resourceCulture);
@ -544,6 +574,12 @@ namespace Yavsc.Model {
}
}
public static string UsersInRole {
get {
return ResourceManager.GetString("UsersInRole", resourceCulture);
}
}
public static string DB {
get {
return ResourceManager.GetString("DB", resourceCulture);

View file

@ -100,12 +100,6 @@ namespace Yavsc.Model {
}
}
public static string Not_Approuved {
get {
return ResourceManager.GetString("Not Approuved", resourceCulture);
}
}
public static string UserNotInThisRole {
get {
return ResourceManager.GetString("UserNotInThisRole", resourceCulture);
@ -172,6 +166,12 @@ namespace Yavsc.Model {
}
}
public static string Remember_me {
get {
return ResourceManager.GetString("Remember_me", resourceCulture);
}
}
public static string access_denied {
get {
return ResourceManager.GetString("access_denied", resourceCulture);
@ -238,6 +238,12 @@ namespace Yavsc.Model {
}
}
public static string Skills {
get {
return ResourceManager.GetString("Skills", resourceCulture);
}
}
public static string Title {
get {
return ResourceManager.GetString("Title", resourceCulture);
@ -352,6 +358,12 @@ namespace Yavsc.Model {
}
}
public static string was_added_to_the_role {
get {
return ResourceManager.GetString("was_added_to_the_role", resourceCulture);
}
}
public static string Offline {
get {
return ResourceManager.GetString("Offline", resourceCulture);
@ -394,9 +406,9 @@ namespace Yavsc.Model {
}
}
public static string View_source {
public static string Skill {
get {
return ResourceManager.GetString("View_source", resourceCulture);
return ResourceManager.GetString("Skill", resourceCulture);
}
}
@ -424,6 +436,12 @@ namespace Yavsc.Model {
}
}
public static string View_source {
get {
return ResourceManager.GetString("View_source", resourceCulture);
}
}
public static string EndDate {
get {
return ResourceManager.GetString("EndDate", resourceCulture);
@ -442,9 +460,9 @@ namespace Yavsc.Model {
}
}
public static string Remember_me {
public static string Not_Approuved {
get {
return ResourceManager.GetString("Remember_me", resourceCulture);
return ResourceManager.GetString("Not Approuved", resourceCulture);
}
}
@ -460,9 +478,9 @@ namespace Yavsc.Model {
}
}
public static string was_added_to_the_role {
public static string BillUpdated {
get {
return ResourceManager.GetString("was_added_to_the_role", resourceCulture);
return ResourceManager.GetString("BillUpdated", resourceCulture);
}
}
@ -520,6 +538,12 @@ namespace Yavsc.Model {
}
}
public static string BillCreated {
get {
return ResourceManager.GetString("BillCreated", resourceCulture);
}
}
public static string StartDate {
get {
return ResourceManager.GetString("StartDate", resourceCulture);
@ -532,6 +556,12 @@ namespace Yavsc.Model {
}
}
public static string UsersInRole {
get {
return ResourceManager.GetString("UsersInRole", resourceCulture);
}
}
public static string DB {
get {
return ResourceManager.GetString("DB", resourceCulture);

View file

@ -19,6 +19,8 @@
lui présentant votre demande. Vous devriez être contacté très rapidement.</value></data>
<data name="Bill_edition"><value>Édition d'un billet</value></data>
<data name="Bill_removal"><value>Suppression d'un billet</value></data>
<data name="BillCreated"><value>Billet créé</value></data>
<data name="BillUpdated"><value>Billet mis à jour</value></data>
<data name="Consultant"><value>Consultant</value></data>
<data name="Count"><value>Nombre</value></data>
<data name="Ciffer"><value>Chiffre</value></data>
@ -79,6 +81,8 @@
<data name="Remember_me"><value>Se souvenir du mot de passe</value></data>
<data name="Remove"><value>Supprimer</value></data>
<data name="role_created"><value>Rôle créé</value></data>
<data name="Skill"><value>Compétence</value></data>
<data name="Skills"><value>Compétences</value></data>
<data name="StartDate"><value>Date de début</value></data>
<data name="StartDateAfterEndDate"><value>La date de fin doit être postérieure à la date de début.</value></data>
<data name="StartHour"><value>Heure de début</value></data>
@ -90,10 +94,11 @@
<data name="Unitary_cost"><value>Coût unitaire</value></data>
<data name="User_List"><value>Liste des utilisateurs</value><comment></comment></data>
<data name="User_name"><value>Nom d'utilisateur</value></data>
<data name="UsersInRole">Liste des utilisateurs assumant le rôle "{0}"</data>
<data name="UserNotInThisRole"><value>Le rôle demandé n'est pas assumé par ce préstataire</value></data>
<data name="View_source"><value>Voir le texte source du billet</value></data>
<data name="was_added_to_the_role"><value>a été ajouté au rôle</value></data>
<data name="was_added_to_the_empty_role"><value>Il n'y avait pas 'utilisateur dans le rôle '{1}'. Vous ({0}) avez été ajouté au rôle '{1}'.</value></data>
<data name="was_added_to_the_empty_role"><value>Il n'y avait pas d'utilisateur dans le rôle "{1}". Vous ({0}) avez été ajouté au rôle "{1}".</value></data>
<data name="Welcome"><value>Bienvenue</value><comment></comment></data>
<data name="XHasBeenNotified"><value>{0} à été notifié de votre demande, vous devriez être contacté rapidement</value></data>
<data name="Xshouldbeavailable"><value>Au vu de son calendrier,

View file

@ -12,12 +12,16 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="additionally"><value>additionally</value></data>
<data name="access_denied"><value>Access denied</value></data>
<data name="AnIMessageHasbeenSent"><value>An instant message has been sent to {0},
showing to him your query. You should be contacted very soon.</value></data>
<data name="Bill_edition"><value>Bill edition</value></data>
<data name="Bill_removal"><value>Bill removal</value></data>
<data name="BillCreated"><value>Bill created</value></data>
<data name="BillUpdated"><value>Bill updated</value></data>
<data name="PhotoUpdated"><value>Photo updated</value></data>
<data name="Create"><value>Create</value></data>
<data name="Count"><value>Count</value></data>
<data name="Ciffer"><value>Ciffer</value></data>
@ -81,6 +85,8 @@
<data name="Remove"><value>Remove</value></data>
<data name="Role"><value>Role</value></data>
<data name="role_created"><value>role created</value></data>
<data name="Skill"><value>Skill</value></data>
<data name="Skills"><value>Skills</value></data>
<data name="StartDate"><value>Start date</value></data>
<data name="Submit"><value>Submit</value></data>
<data name="StartHour"><value>Start hour</value></data>
@ -93,10 +99,11 @@
<data name="Unitary_cost"><value>Unitary_cost</value></data>
<data name="User_List"><value>User List</value><comment></comment></data>
<data name="User_name"><value>User name</value></data>
<data name="UsersInRole">List of users assuming the role "{0}"</data>
<data name="UserNotInThisRole"><value>This user is not in this role</value></data>
<data name="View_source"><value>View source</value></data>
<data name="was_added_to_the_role"><value>was added to the role</value></data>
<data name="was_added_to_the_empty_role"><value>There was no user in the '{1}' role. You ({0}) was just added as firt user in the '{1}' role.</value></data>
<data name="was_added_to_the_empty_role"><value>There was no user in the "{1}" role. You ({0}) was just added as firt user in the "{1}" role.</value></data>
<data name="Welcome"><value>Welcome</value><comment></comment></data>
<data name="XHasBeenNotified"><value>{0} has been notified of your query, you should be fast contacted</value></data>
<data name="Xshouldbeavailable"><value>regarding his calendar,

View file

@ -14,8 +14,8 @@ namespace Yavsc.Model.RolesAndMembers
/// </summary>
/// <value>The name of the user.</value>
[DisplayName("Nom d'utilisateur"),
Required(ErrorMessage = "S'il vous plait, entrez un nom d'utilisateur ([a-z]|[A-Z]|[-_.~]|[0-9])+"),
RegularExpression("([a-z]|[A-Z]|[0-9])+")]
Required(ErrorMessage = "S'il vous plait, entrez un nom d'utilisateur ([a-z]|[A-Z]|[-_.~]|[0-9]|\\s)+"),
RegularExpression("([a-z]|[A-Z]|[0-9]|\\s)+")]
public string UserName { get; set; }
/// <summary>

View file

@ -22,9 +22,20 @@ using System;
namespace Yavsc.Model.RolesAndMembers
{
/// <summary>
/// Lost password model.
/// </summary>
public class LostPasswordModel
{
/// <summary>
/// Gets or sets the name of the user.
/// </summary>
/// <value>The name of the user.</value>
public string UserName { get; set; }
/// <summary>
/// Gets or sets the email.
/// </summary>
/// <value>The email.</value>
public string Email { get; set; }
}
}

View file

@ -36,6 +36,13 @@ namespace Yavsc.Model.RolesAndMembers
[StringLength (2047)]
public string Address { get; set; }
/// <summary>
/// Gets or sets the user interface theme.
/// </summary>
/// <value>The user interface theme.</value>
[DisplayName ("Thème")]
[StringLength (2047)]
public string UITheme { get; set; }
/// <summary>
/// Gets or sets the state of the city and.
/// </summary>
@ -241,64 +248,27 @@ namespace Yavsc.Model.RolesAndMembers
/// <param name="profile">Profile.</param>
public Profile (ProfileBase profile)
{
if (profile == null)
throw new Exception ("No profile");
object b = profile.GetPropertyValue ("BlogVisible");
BlogVisible = (b == null) ? true : (b is DBNull)? true : (bool)b;
object s = profile.GetPropertyValue ("BlogTitle");
BlogTitle = (s is DBNull) ? null : (string)s;
s = profile.GetPropertyValue ("Avatar");
avatar = (s is DBNull) ? null : (string)s;
s = profile.GetPropertyValue ("Address");
Address = (s is DBNull) ? null : (string)s;
s = profile.GetPropertyValue ("CityAndState");
CityAndState = (s is DBNull) ? null : (string)s;
s = profile.GetPropertyValue ("Country");
Country = (s is DBNull) ? null : (string)s;
s = profile.GetPropertyValue ("ZipCode");
ZipCode = (s is DBNull) ? null : (string)s;
s = profile.GetPropertyValue ("WebSite");
WebSite = (s is DBNull) ? null : (string)s;
s = profile.GetPropertyValue ("Name");
Name = (s is DBNull) ? null : (string)s;
s = profile.GetPropertyValue ("Phone");
Phone = (s is DBNull) ? null : (string)s;
s = profile.GetPropertyValue ("Mobile");
Mobile = (s is DBNull) ? null : (string)s;
if (profile == null) throw new Exception ("No profile");
userName = profile.UserName;
s = profile.GetPropertyValue ("BankCode");
BankCode = (s is DBNull) ? null : (string)s;
s = profile.GetPropertyValue ("IBAN");
IBAN = (s is DBNull) ? null : (string)s;
s = profile.GetPropertyValue ("BIC");
BIC = (s is DBNull) ? null : (string)s;
s = profile.GetPropertyValue ("WicketCode");
WicketCode = (s is DBNull) ? null : (string)s;
s = profile.GetPropertyValue ("AccountNumber");
AccountNumber = (s is DBNull) ? null : (string)s;
object o = profile.GetPropertyValue ("BankedKey");
BankedKey = (int)0;
s = profile.GetPropertyValue ("gcalid");
GoogleCalendar = (s is DBNull)? null : (string) s;
UITheme = (string) profile.GetPropertyValue ("UITheme");
BlogVisible = (bool) profile.GetPropertyValue ("BlogVisible");
BlogTitle = (string) profile.GetPropertyValue ("BlogTitle");
avatar = (string) profile.GetPropertyValue ("Avatar");
Address = (string) profile.GetPropertyValue ("Address");
CityAndState = (string) profile.GetPropertyValue ("CityAndState");
Country = (string) profile.GetPropertyValue ("Country");
ZipCode = (string) profile.GetPropertyValue ("ZipCode");
WebSite = (string) profile.GetPropertyValue ("WebSite");
Name = (string) profile.GetPropertyValue ("Name");
Phone = (string) profile.GetPropertyValue ("Phone");
Mobile = (string) profile.GetPropertyValue ("Mobile");
BankCode = (string)profile.GetPropertyValue ("BankCode");
IBAN = (string)profile.GetPropertyValue ("IBAN");
BIC = (string)profile.GetPropertyValue ("BIC");
WicketCode = (string) profile.GetPropertyValue ("WicketCode");
AccountNumber = (string) profile.GetPropertyValue ("AccountNumber");
BankedKey = (int) profile.GetPropertyValue ("BankedKey");;
GoogleCalendar = (string) profile.GetPropertyValue ("gcalid");
}
}
}

View file

@ -25,8 +25,14 @@ using System.Web.Profile;
namespace Yavsc.Model.RolesAndMembers
{
/// <summary>
/// Profile edition.
/// </summary>
public class ProfileEdition : Profile
{
/// <summary>
/// Initializes a new instance of the <see cref="Yavsc.Model.RolesAndMembers.ProfileEdition"/> class.
/// </summary>
public ProfileEdition()
{}
@ -36,6 +42,10 @@ namespace Yavsc.Model.RolesAndMembers
NewUserName = UserName;
}
/// <summary>
/// Gets or sets the new name of the user.
/// </summary>
/// <value>The new name of the user.</value>
[Localizable(true), Required(ErrorMessage = "S'il vous plait, entrez un nom d'utilisateur valide")
,Display(ResourceType=typeof(LocalizedText),Name="User_name"),
RegularExpression("([a-z]|[A-Z]|[\\s-_.~]|[0-9])+")

View file

@ -69,8 +69,16 @@ namespace Yavsc.Model.RolesAndMembers
[DisplayName("Téléphone mobile")]
public string Mobile { get; set; }
/// <summary>
/// Gets or sets the question.
/// </summary>
/// <value>The question.</value>
public string Question { get; set; }
/// <summary>
/// Gets or sets the answer.
/// </summary>
/// <value>The answer.</value>
public string Answer { get; set; }
}
}

View file

@ -25,19 +25,11 @@ using System.ComponentModel.DataAnnotations;
namespace Yavsc.Model.RolesAndMembers
{
/// <summary>
/// Register view model.
/// </summary>
public class RegisterModel
public class RegisterModel: UserNameBase
{
/// <summary>
/// Gets or sets the name of the user.
/// </summary>
/// <value>The name of the user.</value>
[Localizable(true), Required(ErrorMessage = "S'il vous plait, entrez un nom d'utilisateur")
,Display(ResourceType=typeof(LocalizedText),Name="User_name")]
public string UserName { get; set; }
/// <summary>
/// Gets or sets the password.

View file

@ -4,9 +4,20 @@ using Yavsc.Model.FrontOffice;
namespace Yavsc.Model.WorkFlow
{
/// <summary>
/// I data provider.
/// </summary>
public interface IDataProvider<T>
{
/// <summary>
/// Get the specified id.
/// </summary>
/// <param name="id">Identifier.</param>
T Get (long id);
/// <summary>
/// Update the specified data.
/// </summary>
/// <param name="data">Data.</param>
void Update (T data);
}

View file

@ -62,7 +62,6 @@
<Compile Include="Blogs\BlogManager.cs" />
<Compile Include="Blogs\BlogProvider.cs" />
<Compile Include="WorkFlow\WorkFlowManager.cs" />
<Compile Include="Blogs\BlogHelper.cs" />
<Compile Include="WorkFlow\NewEstimateEvenArgs.cs" />
<Compile Include="LocalizedText.fr.Designer.cs">
<DependentUpon>LocalizedText.fr.resx</DependentUpon>
@ -172,12 +171,29 @@
<Compile Include="Blogs\BasePostInfo.cs" />
<Compile Include="Blogs\TagInfo.cs" />
<Compile Include="Blogs\MarkdownHelper.cs" />
<Compile Include="Calendar\BookQuery.cs" />
<Compile Include="Calendar\IFreeDateSet.cs" />
<Compile Include="Calendar\ICalendarManager.cs" />
<Compile Include="Messaging\Notification.cs" />
<Compile Include="FileSystem\WebFileSystemManager.cs" />
<Compile Include="RolesAndMembers\ProfileEdition.cs" />
<Compile Include="RolesAndMembers\UserRole.cs" />
<Compile Include="RolesAndMembers\UserNameBase.cs" />
<Compile Include="Calendar\BookingQuery.cs" />
<Compile Include="Skill\SkillRating.cs" />
<Compile Include="Skill\SkillProvider.cs" />
<Compile Include="Skill\SkillManager.cs" />
<Compile Include="Manager.cs" />
<Compile Include="Skill\Skill.cs" />
<Compile Include="Skill\UserSkill.cs" />
<Compile Include="Skill\UserSkillComment.cs" />
<Compile Include="Skill\UserSkillDeclaration.cs" />
<Compile Include="Skill\UserSkillRating.cs" />
<Compile Include="Skill\UserSkillReference.cs" />
<Compile Include="IComment.cs" />
<Compile Include="IIdentified.cs" />
<Compile Include="IRating.cs" />
<Compile Include="IAuthorized.cs" />
<Compile Include="Skill\PerformerProfile.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
@ -193,6 +209,7 @@
<Folder Include="Circles\" />
<Folder Include="RolesAndMembers\" />
<Folder Include="Messaging\" />
<Folder Include="Skill\" />
</ItemGroup>
<ProjectExtensions>
<MonoDevelop>