* YavscModel.csproj:
* NewProjectModel.cs: * ITContentProvider.csproj: refactoring * WebApiConfig.cs: Web Api Config * IModule.cs: * RssFeeds.cs: * IRenderer.cs: * Blog.cs: * ITagHandler.cs: * ViewRenderer.cs: * Comment.cs: * IViewRenderer.cs: * People.cs: * SignIn.cs: * BlogEntry.cs: * AuthToken.cs: * BlogHelper.cs: * DataAccess.cs: * Estimate.cs: * BlogManager.cs: * Writting.cs: * AskForADate.cs: * RestoreQuery.cs: * Basket.cs: * BlogProvider.cs: * CalendarList.cs: * Commande.cs: * StatusChange.cs: * WebFileInfo.cs: * WorkFlowManager.cs: * Euro.cs: * Unit.cs: * Text.cs: * Profile.cs: * Note.cs: * Link.cs: * BlogEditEntryModel.cs: * FindBlogEntryFlags.cs: * NewProjectModel.cs: * CalendarListEntry.cs: * CalendarEntryList.cs: * IContentProvider.cs: * CommandStatus.cs: * Label.cs: * Price.cs: * BlogEntryCollection.cs: * Period.cs: * Scalar.cs: * BlogEditCommentModel.cs: * Option.cs: * NpgsqlContentProvider.cs: * Product.cs: * LoginModel.cs: * Service.cs: * Catalog.cs: * Currency.cs: * NewEstimateEvenArgs.cs: * CheckBox.cs: * SaleForm.cs: * FileSystemManager.cs: * FormInput.cs: * TextInput.cs: * NewRoleModel.cs: * FileInfoCollection.cs: * FilesInput.cs: * NewAdminModel.cs: * SelectItem.cs: * SelectInput.cs: * RadioButton.cs: * StockStatus.cs: * Provider.cs: * DirNotFoundException.cs: * FormElement.cs: * ProductImage.cs: * WebFileInfoCollection.cs: * CatalogHelper.cs: * CatalogManager.cs: * RegisterViewModel.cs: * InvalidDirNameException.cs: * PhysicalProduct.cs: * CatalogProvider.cs: * ProductCategory.cs: * OrderStatusChangedEventArgs.cs: * ProviderCollection.cs: * WorkflowConfiguration.cs: * BlogProviderConfigurationElement.cs: * BlogProvidersConfigurationSection.cs: * BlogProvidersConfigurationCollection.cs: * CatalogProviderConfigurationElement.cs: * CatalogProvidersConfigurationSection.cs: * CatalogProvidersConfigurationCollection.cs: xml doc * SalesCatalog.csproj: * XmlCatalogProvider.cs: Maps the catalog using System.Web * BasketController.cs: * FrontOfficeController.cs: a Basket controller * Global.asax.cs: Session in Web Api * App.master: WebApi bas url as Javascript var 'apiBaseUrl' * Index.aspx: !!not sure of this change. * Web.csproj: compiles now includes WebApiConfig.cs * style.css: link background color * FileSystemController.cs: a file system controller
This commit is contained in:
parent
017a6fde23
commit
b505ad90e7
100 changed files with 2520 additions and 212 deletions
|
|
@ -4,18 +4,33 @@ using System.ComponentModel;
|
|||
|
||||
namespace Yavsc.Model.RolesAndMembers
|
||||
{
|
||||
/// <summary>
|
||||
/// Login model.
|
||||
/// </summary>
|
||||
public class LoginModel
|
||||
{
|
||||
[DisplayName("Nom d'utilisateur")]
|
||||
[Required(ErrorMessage = "S'il vous plait, entrez un nom d'utilisateur ([a-z]|[A-Z]|[-_.~])+")]
|
||||
[RegularExpression("([a-z]|[A-Z]|[-_.~])+")]
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the user.
|
||||
/// </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]|[-_.~])+"),
|
||||
RegularExpression("([a-z]|[A-Z]|[-_.~])+")]
|
||||
public string UserName { get; set; }
|
||||
|
||||
[DisplayName("Mot de passe")]
|
||||
[Required(ErrorMessage = "S'il vous plait, entez un mot de passe")]
|
||||
[RegularExpression("([a-z]|[A-Z]|[-_.~#{}`'\\^])+")]
|
||||
/// <summary>
|
||||
/// Gets or sets the password.
|
||||
/// </summary>
|
||||
/// <value>The password.</value>
|
||||
[DisplayName("Mot de passe"),
|
||||
Required(ErrorMessage = "S'il vous plait, entez un mot de passe"),
|
||||
RegularExpression("([a-z]|[A-Z]|[-_.~#{}`'\\^])+")]
|
||||
public string Password { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this <see cref="Yavsc.Model.RolesAndMembers.LoginModel"/> remember me.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if remember me; otherwise, <c>false</c>.</value>
|
||||
[Display(Name = "Remember_me",ResourceType=typeof(LocalizedText))]
|
||||
public bool RememberMe { get; set; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,10 +3,17 @@ using System.ComponentModel.DataAnnotations;
|
|||
|
||||
namespace Yavsc.Model.RolesAndMembers
|
||||
{
|
||||
/// <summary>
|
||||
/// New admin model.
|
||||
/// </summary>
|
||||
public class NewAdminModel
|
||||
{
|
||||
[Required(ErrorMessage = "S'il vous plait, entrez un nom d'utilisateur")]
|
||||
[Display(Name = "Nom du nouvel administrateur", Description="Nom de l'utilisateur à enregistrer comme administrateur")]
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the user about to become Admin.
|
||||
/// </summary>
|
||||
/// <value>The name of the user.</value>
|
||||
[Required(ErrorMessage = "S'il vous plait, entrez un nom d'utilisateur"),
|
||||
Display(Name = "Nom du nouvel administrateur", Description="Nom de l'utilisateur à enregistrer comme administrateur")]
|
||||
public string UserName { get; set ; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,8 +4,15 @@ using System.ComponentModel;
|
|||
|
||||
namespace Yavsc.Model.RolesAndMembers
|
||||
{
|
||||
/// <summary>
|
||||
/// New role model.
|
||||
/// </summary>
|
||||
public class NewRoleModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the role.
|
||||
/// </summary>
|
||||
/// <value>The name of the role.</value>
|
||||
[Required]
|
||||
[StringLength(255)]
|
||||
[DisplayName("Nom du rôle")]
|
||||
|
|
|
|||
|
|
@ -7,82 +7,167 @@ using System.Web;
|
|||
|
||||
namespace Yavsc.Model.RolesAndMembers
|
||||
{
|
||||
/// <summary>
|
||||
/// Profile.
|
||||
/// </summary>
|
||||
public class Profile
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
[DisplayName ("Nom complet")]
|
||||
[StringLength (1024)]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the avatar.
|
||||
/// </summary>
|
||||
/// <value>The avatar.</value>
|
||||
[DisplayName("Avatar")]
|
||||
public string avatar { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the address.
|
||||
/// </summary>
|
||||
/// <value>The address.</value>
|
||||
[DisplayName ("Adresse")]
|
||||
[StringLength (2047)]
|
||||
public string Address { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the state of the city and.
|
||||
/// </summary>
|
||||
/// <value>The state of the city and.</value>
|
||||
[DisplayName ("Ville")]
|
||||
[StringLength (255)]
|
||||
public string CityAndState { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the zip code.
|
||||
/// </summary>
|
||||
/// <value>The zip code.</value>
|
||||
[DisplayName ("Code Postal")]
|
||||
[StringLength (9)]
|
||||
public string ZipCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the country.
|
||||
/// </summary>
|
||||
/// <value>The country.</value>
|
||||
[DisplayName ("Pays")]
|
||||
[StringLength (99)]
|
||||
public string Country { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the web site.
|
||||
/// </summary>
|
||||
/// <value>The web site.</value>
|
||||
[DisplayName ("Site Web")]
|
||||
[StringLength (255)]
|
||||
public string WebSite { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this <see cref="Yavsc.Model.RolesAndMembers.Profile"/> blog visible.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if blog visible; otherwise, <c>false</c>.</value>
|
||||
[DisplayName ("Blog visible")]
|
||||
public bool BlogVisible { get; set; }
|
||||
|
||||
private string blogTitle;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the blog title.
|
||||
/// </summary>
|
||||
/// <value>The blog title.</value>
|
||||
[DisplayName ("Titre du blog")]
|
||||
[StringLength (255)]
|
||||
public string BlogTitle { get { return blogTitle==null? Name+"'s blog":blogTitle; } set { blogTitle = value; } }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the phone number.
|
||||
/// </summary>
|
||||
/// <value>The phone.</value>
|
||||
[DisplayName ("Téléphone fixe")]
|
||||
[StringLength (15)]
|
||||
public string Phone { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the mobile.
|
||||
/// </summary>
|
||||
/// <value>The mobile.</value>
|
||||
[DisplayName ("Portable")]
|
||||
[StringLength (15)]
|
||||
public string Mobile { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the email.
|
||||
/// </summary>
|
||||
/// <value>The email.</value>
|
||||
[DisplayName ("E-mail")]
|
||||
[StringLength (1024)]
|
||||
public string Email { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the BI.
|
||||
/// </summary>
|
||||
/// <value>The BI.</value>
|
||||
[DisplayName ("Code BIC")]
|
||||
[StringLength (15)]
|
||||
public string BIC { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the IBA.
|
||||
/// </summary>
|
||||
/// <value>The IBA.</value>
|
||||
[DisplayName ("Code IBAN")]
|
||||
[StringLength (33)]
|
||||
public string IBAN { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the bank code.
|
||||
/// </summary>
|
||||
/// <value>The bank code.</value>
|
||||
[DisplayName ("Code Banque")]
|
||||
[StringLength (5)]
|
||||
public string BankCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the wicket code.
|
||||
/// </summary>
|
||||
/// <value>The wicket code.</value>
|
||||
[DisplayName ("Code Guichet")]
|
||||
[StringLength (5)]
|
||||
public string WicketCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the account number.
|
||||
/// </summary>
|
||||
/// <value>The account number.</value>
|
||||
[DisplayName ("Numéro de compte")]
|
||||
[StringLength (15)]
|
||||
public string AccountNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the banked key.
|
||||
/// </summary>
|
||||
/// <value>The banked key.</value>
|
||||
[DisplayName ("Clé RIB")]
|
||||
public int BankedKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the google calendar.
|
||||
/// </summary>
|
||||
/// <value>The google calendar.</value>
|
||||
[Display(Name="Google_calendar",ResourceType=typeof(LocalizedText))]
|
||||
public string GoogleCalendar { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether this instance has bank account.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance has bank account; otherwise, <c>false</c>.</value>
|
||||
public bool HasBankAccount { get {
|
||||
return IsBillable
|
||||
&& !string.IsNullOrWhiteSpace (BankCode)
|
||||
|
|
@ -92,6 +177,10 @@ namespace Yavsc.Model.RolesAndMembers
|
|||
&& !string.IsNullOrWhiteSpace (AccountNumber)
|
||||
&& BankedKey != 0; } }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether this instance is billable.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance is billable; otherwise, <c>false</c>.</value>
|
||||
public bool IsBillable {
|
||||
get {
|
||||
return !string.IsNullOrWhiteSpace (Name)
|
||||
|
|
@ -108,8 +197,16 @@ namespace Yavsc.Model.RolesAndMembers
|
|||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this <see cref="Yavsc.Model.RolesAndMembers.Profile"/> remember me.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if remember me; otherwise, <c>false</c>.</value>
|
||||
public bool RememberMe { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Yavsc.Model.RolesAndMembers.Profile"/> class.
|
||||
/// </summary>
|
||||
/// <param name="profile">Profile.</param>
|
||||
public Profile (ProfileBase profile)
|
||||
{
|
||||
object b = profile.GetPropertyValue ("BlogVisible");
|
||||
|
|
|
|||
|
|
@ -4,19 +4,38 @@ using System.ComponentModel.DataAnnotations;
|
|||
|
||||
namespace Yavsc.Model.RolesAndMembers
|
||||
{
|
||||
/// <summary>
|
||||
/// Register view model.
|
||||
/// </summary>
|
||||
public class RegisterViewModel
|
||||
{
|
||||
/// <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")]
|
||||
public string UserName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the password.
|
||||
/// </summary>
|
||||
/// <value>The password.</value>
|
||||
[DisplayName("Mot de passe")]
|
||||
[Required(ErrorMessage = "S'il vous plait, entez un mot de passe")]
|
||||
public string Password { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the confirm password.
|
||||
/// </summary>
|
||||
/// <value>The confirm password.</value>
|
||||
[DisplayName("Confirmation du mot de passe")]
|
||||
public string ConfirmPassword { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the email.
|
||||
/// </summary>
|
||||
/// <value>The email.</value>
|
||||
[DisplayName("Adresse e-mail")]
|
||||
[Required(ErrorMessage = "S'il vous plait, entrez un e-mail valide")]
|
||||
public string Email { get; set; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue