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

@ -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.