recupération de mot de passe + prise de commande

* ResetPassword.txt: Un message pour le mot de passe oublié

* style.css: fixe un 404

* UpdatePassword.aspx: Implémente le formulaire de mise à jour du mot
  de passe,
accessible depuis l'e-mail.

* Contact.aspx: implémente la page de contact préstataire

* UpdatePassword.cs: modèle de la modification de mot de passe au
jeton de securité (qui est encore un fake en l'état)

* CommandRegistration.cs: un enregistrement de commande

* NominativeCommandRegistration.cs: un enregistrement de commande
  nominative

* .gitignore: ignore ma config LuaDebug

* NpgsqlMembershipProvider.cs: ne pas crasher à la lecture en base de
  la question de
recupération du mot de passe quand elle est nulle.

* BasketController.cs: renvoie l'objet décrivant la prise de commande

* Global.asax.cs: ignorer les routes vers App_Data et App_Code

* instdbws.sql: passage du type json à jsonb pour les paramètres de la
  commande

* RegistrationMail.txt: un piti message à l'enregistrement

* AccountController.cs: Envoi du message du mot de passe oublié,
methode de changemnet du mot de passe.

* AdminController.cs: xmldoc + refabrication helper Notify

* HomeController.cs:
* BlogsController.cs:
* GoogleController.cs: refabrication helper Notify

* FrontOfficeController.cs: Refabrication: Utilisation du nouvel
  enregistrement de commande.
+ refabrication helper Notify

* YavscHelpers.cs: implémente la methode d'envoi du message de mot de
  passe oublié
+ refabrication helper Notify

* App.master: Corrige la notification Html

* AppAdmin.master: Le lien vers la page de contact était associé
à tort à la classe css "thanks"

* yavsc.js: message plus parlant en cas de requête Ajax mal formée.

* Login.aspx: Implémente le lien vers le formulaire de recupération du
  mot de passe

* UserPost.aspx: .

* Booking.aspx: format du code

* Performer.ascx: l'e-mail préstataire ne sera jamais fourni par
  l'application,
aussi, on parlera de "prendre contact", d'échanger ... mais pas de
  donner l'adresse e-mail.
L'information "son email" n'est donc pas disponible meme à
  l'utilisateur autorisé.
La prise de contact, ou autre fux de comunication le sont.

* Performers.aspx: affiche la notification à l'envoi de la demande de
  devis

* Product.aspx:
* Service.aspx: les periodes du catalogue et du calendrier sont
  fondue.

* Contact.aspx: traduction en français

* Web.config:
  * la procédure de recupération du mot de passe est
    activée
  * l'e-message envoyé est construit à partir d'un modèle, un fichier
    texte trouvé dans /App_Data, et indiqué à l'application
    par le paramêtre applicatif "LostPasswordMessage"

* Yavsc.csproj: reference les nouveaux fichiers

* Product.cs: utilise la période du calendrier

* Commande.cs: renvoie un objet à la prise de commande, indiquant
  l'identifiant de commande, et les messages envoyés
  en cas de commande nominative.

* GoogleHelpers.cs: icone à la notification mobile

* LocalizedText.resx:
* LocalizedText.fr.resx:
* LocalizedText.Designer.cs:
* LocalizedText.fr.Designer.cs: traductions

* UserNameBase.cs: fixe la dé-sérialisation

* WorkFlowManager.cs: refabrication de la prise de commande

* YavscModel.csproj: nouveaux objets du modèle

* OtherWebException.aspx: page obsolete

* Period.cs: fondre la période: celle du catalogue disparait, au
  profit de celle du calendrier.
This commit is contained in:
Paul Schneider 2015-12-30 14:43:39 +01:00
commit a14e63d26f
49 changed files with 793 additions and 218 deletions

View file

@ -1,3 +1,36 @@
2015-12-30 Paul Schneider <paul@pschneider.fr>
* UpdatePassword.cs: modèle de la modification de mot de passe
au
jeton de securité (qui est encore un fake en l'état)
* CommandRegistration.cs: un enregistrement de commande
* NominativeCommandRegistration.cs: un enregistrement de
commande nominative
* Product.cs: utilise la période du calendrier
* Commande.cs: renvoie un objet à la prise de commande,
indiquant l'identifiant de commande, et les messages envoyés
en cas de commande nominative.
* GoogleHelpers.cs: icone à la notification mobile
* LocalizedText.resx:
* LocalizedText.fr.resx:
* LocalizedText.Designer.cs:
* LocalizedText.fr.Designer.cs: traductions
* UserNameBase.cs: fixe la dé-sérialisation
* WorkFlowManager.cs: refabrication de la prise de commande
* YavscModel.csproj: nouveaux objets du modèle
* Period.cs: fondre la période: celle du catalogue disparait,
au profit de celle du calendrier.
2015-12-24 Paul Schneider <paul@pschneider.fr>
* NominativeEventPub.cs: implémentation du nom de préstataire

View file

@ -1,29 +0,0 @@
using System;
namespace Yavsc.Model.FrontOffice.Catalog
{
/// <summary>
/// Period.
/// </summary>
public class Period
{
/// <summary>
/// Initializes a new instance of the <see cref="Yavsc.Model.FrontOffice.Period"/> class.
/// </summary>
public Period ()
{
}
/// <summary>
/// Gets or sets the start date.
/// </summary>
/// <value>The start date.</value>
public DateTime StartDate { get; set; }
/// <summary>
/// Gets or sets the end date.
/// </summary>
/// <value>The end date.</value>
public DateTime EndDate { get; set; }
}
}

View file

@ -1,5 +1,6 @@
using System;
using System.ComponentModel.DataAnnotations;
using Yavsc.Model.Calendar;
namespace Yavsc.Model.FrontOffice.Catalog
{

View file

@ -7,6 +7,7 @@ using System.Web;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using Yavsc.Model.WorkFlow;
namespace Yavsc.Model.FrontOffice
{
@ -62,6 +63,11 @@ namespace Yavsc.Model.FrontOffice
public Command()
{
}
/// <summary>
/// Sets the parameters.
/// </summary>
/// <param name="collection">Collection.</param>
public void SetParameters(Dictionary<string,string> collection)
{
Parameters.Clear ();
@ -88,7 +94,7 @@ namespace Yavsc.Model.FrontOffice
/// </summary>
/// <param name="collection">Collection.</param>
/// <param name="files">Files.</param>
private void FromPost(Dictionary<string,string> collection, NameObjectCollectionBase files)
private CommandRegistration FromPost(Dictionary<string,string> collection, NameObjectCollectionBase files)
{
// string catref=collection["catref"]; // Catalog Url from which formdata has been built
ProductRef = collection ["productref"];
@ -104,13 +110,16 @@ namespace Yavsc.Model.FrontOffice
Status = CommandStatus.Inserted;
// stores the parameters:
SetParameters(collection);
WorkFlowManager.RegisterCommand (this); // gives a value to this.Id
var registration = WorkFlowManager.RegisterCommand (this); // gives a value to this.Id
UserFileSystemManager.Put(Path.Combine("commandes",Id.ToString ()),files);
return registration;
}
/// <summary>
/// Creates a command using the specified collection
/// as command parameters, handles the files upload.
/// as command parameters, handles the files upload,
/// ans register the command in db, positionning the
/// command id.
///
/// Required values in the command parameters :
///
@ -118,21 +127,27 @@ namespace Yavsc.Model.FrontOffice
/// * type: the command concrete class name.
///
/// </summary>
/// <returns>The command.</returns>
/// <param name="collection">Collection.</param>
/// <param name="files">Files.</param>
public static Command CreateCommand (Dictionary<string,string> collection, NameObjectCollectionBase files)
/// <param name="cmdreg">Cmdreg.</param>
public static Command CreateCommand (
Dictionary<string,string> collection,
NameObjectCollectionBase files,
out CommandRegistration cmdreg)
{
string type = collection ["type"];
if (type == null)
throw new InvalidOperationException (
"A command type cannot be blank");
var cmd = CreateCommand (type);
cmd.FromPost (collection, files);
cmdreg = cmd.FromPost (collection, files);
return cmd;
}
/// <summary>
/// Creates the command.
/// Creates the command, for deserialisation,
/// do not register it in database.
/// </summary>
/// <returns>The command.</returns>
/// <param name="className">Class name.</param>
@ -152,6 +167,11 @@ namespace Yavsc.Model.FrontOffice
var cmd = ci.Invoke (new object[]{ });
return cmd as Command;
}
/// <summary>
/// Gets the command textual description.
/// </summary>
/// <returns>The description.</returns>
public abstract string GetDescription ();
}
}

View file

@ -153,7 +153,7 @@ namespace Yavsc.Model.Google.Api
if (regid == null)
throw new NotImplementedException ("Notification via e-mail");
var msg = new MessageWithPayload<YaEvent> () {
notification = new Notification() { title = evpub.Title, body = evpub.Description, icon = "event" },
notification = new Notification() { title = evpub.Title, body = evpub.Description, icon = "icon" },
data = evpub, registration_ids = new string[] { regid } };
return r.Invoke (msg);
}

View file

@ -46,6 +46,12 @@ namespace Yavsc.Model {
}
}
public static string Private_circle {
get {
return ResourceManager.GetString("Private_circle", resourceCulture);
}
}
public static string Comment {
get {
return ResourceManager.GetString("Comment", resourceCulture);
@ -106,9 +112,9 @@ namespace Yavsc.Model {
}
}
public static string Welcome {
public static string User_name {
get {
return ResourceManager.GetString("Welcome", resourceCulture);
return ResourceManager.GetString("User_name", resourceCulture);
}
}
@ -124,6 +130,12 @@ namespace Yavsc.Model {
}
}
public static string YourNeed {
get {
return ResourceManager.GetString("YourNeed", resourceCulture);
}
}
public static string ExistantDB {
get {
return ResourceManager.GetString("ExistantDB", resourceCulture);
@ -202,12 +214,30 @@ namespace Yavsc.Model {
}
}
public static string email {
get {
return ResourceManager.GetString("email", resourceCulture);
}
}
public static string EndDate {
get {
return ResourceManager.GetString("EndDate", resourceCulture);
}
}
public static string body {
get {
return ResourceManager.GetString("body", resourceCulture);
}
}
public static string ResetPassword {
get {
return ResourceManager.GetString("ResetPassword", resourceCulture);
}
}
public static string DoSpecifyCircles {
get {
return ResourceManager.GetString("DoSpecifyCircles", resourceCulture);
@ -292,6 +322,12 @@ namespace Yavsc.Model {
}
}
public static string YouNeedToBeAuthenticatedIOToContact {
get {
return ResourceManager.GetString("YouNeedToBeAuthenticatedIOToContact", resourceCulture);
}
}
public static string Unitary_cost {
get {
return ResourceManager.GetString("Unitary_cost", resourceCulture);
@ -412,9 +448,15 @@ namespace Yavsc.Model {
}
}
public static string YourNeed {
public static string Description {
get {
return ResourceManager.GetString("YourNeed", resourceCulture);
return ResourceManager.GetString("Description", resourceCulture);
}
}
public static string was_added_to_the_role {
get {
return ResourceManager.GetString("was_added_to_the_role", resourceCulture);
}
}
@ -436,9 +478,15 @@ namespace Yavsc.Model {
}
}
public static string Private_circle {
public static string ContactThisPerformer {
get {
return ResourceManager.GetString("Private_circle", resourceCulture);
return ResourceManager.GetString("ContactThisPerformer", resourceCulture);
}
}
public static string OnlyAuthorizedMayContact {
get {
return ResourceManager.GetString("OnlyAuthorizedMayContact", resourceCulture);
}
}
@ -520,12 +568,6 @@ namespace Yavsc.Model {
}
}
public static string User_name {
get {
return ResourceManager.GetString("User_name", resourceCulture);
}
}
public static string Item_added_to_basket {
get {
return ResourceManager.GetString("Item_added_to_basket", resourceCulture);
@ -538,6 +580,12 @@ namespace Yavsc.Model {
}
}
public static string Welcome {
get {
return ResourceManager.GetString("Welcome", resourceCulture);
}
}
public static string YourEstimates {
get {
return ResourceManager.GetString("YourEstimates", resourceCulture);
@ -580,9 +628,9 @@ namespace Yavsc.Model {
}
}
public static string YourMEACode {
public static string PhotoUpdated {
get {
return ResourceManager.GetString("YourMEACode", resourceCulture);
return ResourceManager.GetString("PhotoUpdated", resourceCulture);
}
}
@ -706,18 +754,6 @@ namespace Yavsc.Model {
}
}
public static string PhotoUpdated {
get {
return ResourceManager.GetString("PhotoUpdated", resourceCulture);
}
}
public static string Description {
get {
return ResourceManager.GetString("Description", resourceCulture);
}
}
public static string from {
get {
return ResourceManager.GetString("from", resourceCulture);
@ -814,9 +850,9 @@ namespace Yavsc.Model {
}
}
public static string was_added_to_the_role {
public static string reason {
get {
return ResourceManager.GetString("was_added_to_the_role", resourceCulture);
return ResourceManager.GetString("reason", resourceCulture);
}
}
@ -826,6 +862,12 @@ namespace Yavsc.Model {
}
}
public static string YourMEACode {
get {
return ResourceManager.GetString("YourMEACode", resourceCulture);
}
}
public static string ReadMore {
get {
return ResourceManager.GetString("ReadMore", resourceCulture);
@ -898,6 +940,12 @@ namespace Yavsc.Model {
}
}
public static string NewPasswordMessageSent {
get {
return ResourceManager.GetString("NewPasswordMessageSent", resourceCulture);
}
}
public static string SiteSkills {
get {
return ResourceManager.GetString("SiteSkills", resourceCulture);

View file

@ -118,6 +118,12 @@ namespace Yavsc.Model {
}
}
public static string YourNeed {
get {
return ResourceManager.GetString("YourNeed", resourceCulture);
}
}
public static string ExistantDB {
get {
return ResourceManager.GetString("ExistantDB", resourceCulture);
@ -196,12 +202,30 @@ namespace Yavsc.Model {
}
}
public static string email {
get {
return ResourceManager.GetString("email", resourceCulture);
}
}
public static string EndDate {
get {
return ResourceManager.GetString("EndDate", resourceCulture);
}
}
public static string body {
get {
return ResourceManager.GetString("body", resourceCulture);
}
}
public static string ResetPassword {
get {
return ResourceManager.GetString("ResetPassword", resourceCulture);
}
}
public static string DoSpecifyCircles {
get {
return ResourceManager.GetString("DoSpecifyCircles", resourceCulture);
@ -292,6 +316,12 @@ namespace Yavsc.Model {
}
}
public static string YouNeedToBeAuthenticatedIOToContact {
get {
return ResourceManager.GetString("YouNeedToBeAuthenticatedIOToContact", resourceCulture);
}
}
public static string Unitary_cost {
get {
return ResourceManager.GetString("Unitary_cost", resourceCulture);
@ -406,9 +436,15 @@ namespace Yavsc.Model {
}
}
public static string YourNeed {
public static string Description {
get {
return ResourceManager.GetString("YourNeed", resourceCulture);
return ResourceManager.GetString("Description", resourceCulture);
}
}
public static string was_added_to_the_role {
get {
return ResourceManager.GetString("was_added_to_the_role", resourceCulture);
}
}
@ -436,6 +472,18 @@ namespace Yavsc.Model {
}
}
public static string ContactThisPerformer {
get {
return ResourceManager.GetString("ContactThisPerformer", resourceCulture);
}
}
public static string OnlyAuthorizedMayContact {
get {
return ResourceManager.GetString("OnlyAuthorizedMayContact", resourceCulture);
}
}
public static string AnIMessageHasbeenSent {
get {
return ResourceManager.GetString("AnIMessageHasbeenSent", resourceCulture);
@ -574,9 +622,9 @@ namespace Yavsc.Model {
}
}
public static string YourMEACode {
public static string PhotoUpdated {
get {
return ResourceManager.GetString("YourMEACode", resourceCulture);
return ResourceManager.GetString("PhotoUpdated", resourceCulture);
}
}
@ -694,18 +742,6 @@ namespace Yavsc.Model {
}
}
public static string PhotoUpdated {
get {
return ResourceManager.GetString("PhotoUpdated", resourceCulture);
}
}
public static string Description {
get {
return ResourceManager.GetString("Description", resourceCulture);
}
}
public static string from {
get {
return ResourceManager.GetString("from", resourceCulture);
@ -808,9 +844,15 @@ namespace Yavsc.Model {
}
}
public static string was_added_to_the_role {
public static string reason {
get {
return ResourceManager.GetString("was_added_to_the_role", resourceCulture);
return ResourceManager.GetString("reason", resourceCulture);
}
}
public static string YourMEACode {
get {
return ResourceManager.GetString("YourMEACode", resourceCulture);
}
}
@ -886,6 +928,12 @@ namespace Yavsc.Model {
}
}
public static string NewPasswordMessageSent {
get {
return ResourceManager.GetString("NewPasswordMessageSent", resourceCulture);
}
}
public static string SiteSkills {
get {
return ResourceManager.GetString("SiteSkills", resourceCulture);

View file

@ -24,12 +24,13 @@
<data name="available"><value>disponible</value></data>
<data name="AuthenticatedOnly"><value>Seuls les utilisateurs authentifiés peuvent accèder à cette information.</value></data>
<data name="Basket"><value>Panier</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="BillAccessControl"><value>Contrôle d'accès au Billet</value></data>
<data name="BillCreated"><value>Billet créé</value></data>
<data name="BillSourceCode"><value>Code source du billet</value></data>
<data name="BillUpdated"><value>Billet mis à jour</value></data>
<data name="Bill_edition"><value>Édition d'un article</value></data>
<data name="Bill_removal"><value>Suppression d'un article</value></data>
<data name="BillAccessControl"><value>Contrôle d'accès à l'article</value></data>
<data name="BillCreated"><value>Article créé</value></data>
<data name="BillSourceCode"><value>Code source de l'article</value></data>
<data name="BillUpdated"><value>Article mis à jour</value></data>
<data name="body"><value>corps de texte</value></data>
<data name="BookingTitleArtiste"><value>Reserver les services d'un artiste</value></data>
<data name="BookingTitle6829C"><value>Reserver les services d'un éditeur de logiciel</value></data>
<data name="Catalog"><value>Catalogue</value></data>
@ -38,8 +39,9 @@
<data name="ChooseADateInTheFutur"><value>S'il vous plait, choisissez une date dans le futur</value></data>
<data name="Ciffer"><value>Chiffre</value></data>
<data name="Circles"><value>Cercles</value></data>
<data name="Consultant"><value>Consultant</value></data>
<data name="Comment"><value>Commentaire</value></data>
<data name="Consultant"><value>Consultant</value></data>
<data name="ContactThisPerformer"><value>Contactez ce préstataire</value></data>
<data name="Count"><value>Nombre</value></data>
<data name="Create"><value>Créer</value></data>
<data name="Date_search"><value>Demande de rendez-vous</value></data>
@ -58,6 +60,7 @@
<data name="EditRelatedSkills"><value>Editer les compétences associées</value></data>
<data name="EndDate"><value>Date de fin</value></data>
<data name="EndHour"><value>Heure de fin</value></data>
<data name="email"><value>e-mail</value></data>
<data name="entries"><value>entrées</value></data>
<data name="Estimate_not_found"><value>Devis non trouvé</value></data>
<data name="EventWebPage"><value>Page web de l'événement</value></data>
@ -67,7 +70,7 @@
<data name="Google_calendar"><value>Agenda Google</value></data>
<data name="Google_error"><value>Erreur Google : {0}</value></data>
<data name="Google_registration_id"><value>Identifiant d'enregistrement Google</value></data>
<data name="Hide_source"><value>Cacher le texte source du billet</value></data>
<data name="Hide_source"><value>Cacher le texte source de l'article</value></data>
<data name="Home"><value>Accueil</value></data>
<data name="Hide"><value>Cacher</value></data>
<data name="hidden"><value>caché</value></data>
@ -92,14 +95,17 @@
<data name="Needs"><value>Besoins</value></data>
<data name="Need"><value>Besoin</value></data>
<data name="New_Tag"><value>Nouveau Tag</value></data>
<data name="NewPasswordMessageSent"><value>Un e-mail vient de vous être envoyé, il contient le lien à suivre
pour pouvoir mettre à jour votre mot de passe.</value></data>
<data name="no_content"><value>pas de contenu</value></data>
<data name="NoSkillforthisactivity"><value>Aucune compétence n'a été enregistrée par aucun préstataire pour cette activité</value></data>
<data name="NoSkillforthisactivity"><value>Aucune compétence n'a été enregistrée par aucun préstataire pour cette activité.</value></data>
<data name="none"><value>aucun(e)</value></data>
<data name="Non_existent_user"><value>Non existent user</value></data>
<data name="Not Approuved"><value>Non approuvé</value></data>
<data name="No_calendar_for_this_user"><value>Le préstataire n'a pas de calendrier associé.</value></data>
<data name="Offline"><value>Hors ligne</value></data>
<data name="Online"><value>En ligne</value></data>
<data name="OnlyAuthorizedMayContact"><value>Seuls les utilisateurs authorisés peuvent contacter un préstataire par courrier.</value></data>
<data name="Pdf_version"><value>Version Pdf</value></data>
<data name="PerformanceDate"><value>Date de la prestation</value></data>
<data name="Performers"><value>Perstataires</value></data>
@ -112,6 +118,7 @@
<data name="Profile_edition"><value>Édition du profile</value></data>
<data name="Product_reference"><value>Référence produit</value></data>
<data name="ReadMore"><value>Lire la suite ...</value></data>
<data name="reason"><value>réson</value></data>
<data name="Role"><value>Rôle</value></data>
<data name="prestation"><value>prestation</value></data>
<data name="ProviderId"><value>Identifiant du fournisseur</value></data>
@ -119,12 +126,13 @@
<data name="Register"><value>Enregistez-vous</value></data>
<data name="Remember_me"><value>Se souvenir du mot de passe</value></data>
<data name="Remove"><value>Supprimer</value></data>
<data name="ResetPassword"><value>Ré-initialiser votre mot de passe</value></data>
<data name="role_created"><value>Rôle créé</value></data>
<data name="Search"><value>Chercher</value></data>
<data name="SiteSkills"><value>Talents/Compétences/Spécialités gérés sur ce site</value></data>
<data name="Skill"><value>Compétence</value></data>
<data name="Skills"><value>Talents/Compétences/Spécialités</value></data>
<data name="SomeoneAskingYouForAnEstimate"><value>{0} would want you to establish an estimate concerning {1}</value></data>
<data name="SomeoneAskingYouForAnEstimate"><value>{0} désirerait un devis concernant {1}</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>
@ -143,19 +151,21 @@
<data name="UsersInRole">Liste des utilisateurs assumant le rôle "{0}"</data>
<data name="UserSkills"><value>Talents/compétences/spécialités utilisateur</value></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="View_source"><value>Voir le texte source de l'article</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 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,
{0} devrait être disponible pour ce rendez-vous</value></data>
<data name="YouNeedToBeAuthenticatedIOToContact"><value>Vous devez vous authentifier pour pouvoir demander un devis
à un préstataire.</value></data>
<data name="younotadmin"><value>Vous n'êtes pas administrateur</value></data>
<data name="YourEstimates"><value>Vos Devis</value></data>
<data name="YourMEACode"><value>Votre activité</value></data>
<data name="YourNeed"><value>Votre besoin</value></data>
<data name="yourquerytransmitted"><value>Votre demande a été transmise</value></data>
<data name="YourSkills"><value>Vos talents, vos spécialités, le domaine de vos activités</value></data>
<data name="YourPosts"><value>Vos posts</value></data>
<data name="YourPosts"><value>Vos publications</value></data>
<data name="YourProfile"><value>Votre profile</value></data>
</root>

View file

@ -31,10 +31,12 @@
<data name="BillCreated"><value>Bill created</value></data>
<data name="BillSourceCode"><value>Bill source code</value></data>
<data name="BillUpdated"><value>Bill updated</value></data>
<data name="body"><value>body</value></data>
<data name="BookingTitleArtiste"><value>Book an artiste</value></data>
<data name="BookingTitle6829C"><value>Book a software editor</value></data>
<data name="Catalog"><value>Catalog</value></data>
<data name="Create"><value>Create</value></data>
<data name="ContactThisPerformer"><value>Contact this performer</value></data>
<data name="Count"><value>Count</value></data>
<data name="ChooseADescription"><value>Please, choose a description</value></data>
<data name="ChooseATitle"><value>Please, choose a title</value></data>
@ -61,6 +63,7 @@
<data name="EditRelatedSkills"><value>Edit related skills</value></data>
<data name="EndHour"><value>End hour</value></data>
<data name="EndDate"><value>End date</value></data>
<data name="email"><value>e-mail</value></data>
<data name="entries"><value>entries</value></data>
<data name="Estimate_not_found"><value>Estimate not found</value></data>
<data name="EventWebPage"><value>Event Web page</value></data>
@ -96,6 +99,8 @@
<data name="Needs"><value>Needs</value></data>
<data name="Need"><value>Need</value></data>
<data name="New_Tag"><value>New Tag</value></data>
<data name="NewPasswordMessageSent"><value>A message had been sent, containing a link to follow in order
to update your password.</value></data>
<data name="no_content"><value>no content</value></data>
<data name="NoSkillforthisactivity"><value>No skill was informed by any performer for this activity</value></data>
<data name="none"><value>none</value></data>
@ -103,6 +108,7 @@
<data name="Not_Approuved"><value>Not Approuved</value></data>
<data name="No_calendar_for_this_user"><value>No calendar was associated to this user.</value></data>
<data name="Online"><value>Online</value></data>
<data name="OnlyAuthorizedMayContact"><value>Only authorized users may contact a performer by mail.</value></data>
<data name="Offline"><value>Offline</value></data>
<data name="Pdf_version"><value>Pdf version</value></data>
<data name="PerformanceDate"><value>Performance Date</value></data>
@ -119,9 +125,11 @@
<data name="ProviderName"><value>Provider name</value></data>
<data name="Product_reference"><value>Product_reference</value></data>
<data name="ReadMore"><value>Read more ...</value></data>
<data name="reason"><value>reason</value></data>
<data name="Register"><value>Register</value></data>
<data name="Remember_me"><value>Remember me</value></data>
<data name="Remove"><value>Remove</value></data>
<data name="ResetPassword"><value>Reset your password</value></data>
<data name="Role"><value>Role</value></data>
<data name="role_created"><value>role created</value></data>
<data name="Search"><value>Search</value></data>
@ -155,6 +163,7 @@
<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,
{0} should be available for this booking</value></data>
<data name="YouNeedToBeAuthenticatedIOToContact"><value>You need to be authenticated in order to contact a performer</value></data>
<data name="younotadmin"><value>You're not administrator</value></data>
<data name="YourEstimates"><value>Your estimates</value></data>
<data name="YourMEACode"><value>Your activity</value></data>

View file

@ -0,0 +1,41 @@
//
// UpdatePassword.cs
//
// Author:
// Paul Schneider <paul@pschneider.fr>
//
// Copyright (c) 2015 GNU GPL
//
// 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;
namespace Yavsc.Model.RolesAndMembers
{
public class UpdatePassword: UserNameBase
{
public string UserKey {get; set; }
[DisplayName("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; }
}
}

View file

@ -47,7 +47,7 @@ namespace Yavsc.Model.RolesAndMembers
return UserName;
}
set {
throw new NotImplementedException ();
UserName = value;
}
}
#endregion

View file

@ -0,0 +1,46 @@
//
// CommandRegistration.cs
//
// Author:
// Paul Schneider <paul@pschneider.fr>
//
// Copyright (c) 2015 GNU GPL
//
// 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 Yavsc.Model.WorkFlow;
using System.Configuration;
using System.Collections.Specialized;
using Yavsc.Model.FrontOffice;
using System.Configuration.Provider;
using Yavsc.Model.FrontOffice.Catalog;
using System.Collections.Generic;
using Yavsc.Model.Skill;
using System.Linq;
using Yavsc.Model.Calendar;
using Yavsc.Model.Google.Api;
using System.Net.Mail;
using System.Web.Security;
using System.Web.Configuration;
using System.Net;
using System.IO;
namespace Yavsc.Model.WorkFlow
{
public class CommandRegistration {
public long CommandId {get; set; }
}
}

View file

@ -0,0 +1,48 @@
//
// NominativeCommandRegistration.cs
//
// Author:
// Paul Schneider <paul@pschneider.fr>
//
// Copyright (c) 2015 GNU GPL
//
// 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 Yavsc.Model.WorkFlow;
using System.Configuration;
using System.Collections.Specialized;
using Yavsc.Model.FrontOffice;
using System.Configuration.Provider;
using Yavsc.Model.FrontOffice.Catalog;
using System.Collections.Generic;
using Yavsc.Model.Skill;
using System.Linq;
using Yavsc.Model.Calendar;
using Yavsc.Model.Google.Api;
using System.Net.Mail;
using System.Web.Security;
using System.Web.Configuration;
using System.Net;
using System.IO;
namespace Yavsc.Model.WorkFlow
{
public class NominativeCommandRegistration : CommandRegistration {
public bool NotifiedOnMobile { get; set; }
public bool EmailSent { get; set; }
}
}

View file

@ -18,7 +18,8 @@ using System.IO;
namespace Yavsc.Model.WorkFlow
{
/// <summary>
/// Work flow manager.
/// It takes orders store them and raise some events for modules
@ -75,16 +76,20 @@ namespace Yavsc.Model.WorkFlow
/// <value>The catalog.</value>
public static Catalog Catalog { get; set; }
/// <summary>
/// Registers the command.
/// </summary>
/// <returns>The command.</returns>
/// <param name="com">COM.</param>
public static long RegisterCommand (Command com)
public static CommandRegistration RegisterCommand (Command com)
{
long cmdid = DefaultProvider.RegisterCommand (com);
string errorMsgGCM=null;
if (com.GetType ().GetInterface ("INominative") != null) {
var result = new NominativeCommandRegistration ();
result.CommandId = cmdid;
INominative cmdn = com as INominative;
NominativeEventPub ev = new NominativeEventPub ();
ev.PerformerName = cmdn.PerformerName;
@ -92,9 +97,13 @@ namespace Yavsc.Model.WorkFlow
ev.Description = desc;
// TODO send a location
try {
var gnresponse = GoogleHelpers.NotifyEvent (ev);
}
catch (WebException ex) {
if (gnresponse.failure > 0 || gnresponse.success <=0)
result.NotifiedOnMobile = false;
else result.NotifiedOnMobile = true;
} catch (WebException ex) {
using (var respstream = ex.Response.GetResponseStream ()) {
using (StreamReader rdr = new StreamReader (respstream)) {
@ -103,30 +112,32 @@ namespace Yavsc.Model.WorkFlow
}
respstream.Close ();
}
if (errorMsgGCM==null)
errorMsgGCM = "No response";
if (errorMsgGCM == null)
throw;
throw new Exception (errorMsgGCM);
throw new Exception (errorMsgGCM,ex);
}
string errorEMail = null;
try {
var pref = Membership.GetUser (cmdn.PerformerName);
using (System.Net.Mail.MailMessage msg =
new MailMessage (
WebConfigurationManager.AppSettings.Get ("OwnerEMail"),
pref.Email,
"[Demande de devis] " + com.ClientName,
desc)) {
using (System.Net.Mail.SmtpClient sc = new SmtpClient ()) {
sc.Send (msg);
var pref = Membership.GetUser (cmdn.PerformerName);
using (System.Net.Mail.MailMessage msg =
new MailMessage (
WebConfigurationManager.AppSettings.Get ("OwnerEMail"),
pref.Email,
"[Demande de devis] " + com.ClientName,
desc)) {
using (System.Net.Mail.SmtpClient sc = new SmtpClient ()) {
sc.Send (msg);
result.EmailSent = true;
}
}
}
}
catch (Exception ex) {
} catch (Exception ex) {
errorEMail = ex.Message;
result.EmailSent = false;
}
}
return cmdid;
return result;
} else
throw new NotImplementedException ();
}
/// <summary>

View file

@ -129,7 +129,6 @@
<Compile Include="FrontOffice\Catalog\Link.cs" />
<Compile Include="FrontOffice\Catalog\Note.cs" />
<Compile Include="FrontOffice\Catalog\Option.cs" />
<Compile Include="FrontOffice\Catalog\Period.cs" />
<Compile Include="FrontOffice\Catalog\PhysicalProduct.cs" />
<Compile Include="FrontOffice\Catalog\Product.cs" />
<Compile Include="FrontOffice\Catalog\ProductCategory.cs" />
@ -253,6 +252,9 @@
<Compile Include="RolesAndMembers\IUserName.cs" />
<Compile Include="Calendar\EventCirclesPub.cs" />
<Compile Include="Calendar\NominativeEventPub.cs" />
<Compile Include="WorkFlow\CommandRegistration.cs" />
<Compile Include="WorkFlow\NominativeCommandRegistration.cs" />
<Compile Include="RolesAndMembers\UpdatePassword.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>