Implémente un formulaire simple
de réservation d'un préstataire * p8-av4.xxs.jpg: * p8-av4.xxs.png: inutile * NoLogin.master: * Entity.cs: * OAuth2.cs: * ApiClient.cs: * PeopleApi.cs: * MapTracks.cs: * SkillManager.cs: * Skills.aspx: * EntityQuery.cs: * CalendarApi.cs: * SimpleJsonPostMethod.cs: * GoogleHelpers.cs: * EventPub.aspx: * GoogleController.cs: * Notification.cs: * UserSkills.aspx: * BackOfficeController.cs: * BackOfficeController.cs: * Notification.cs: * MessageWithPayLoad.cs: * MessageWithPayloadResponse.cs: refabrication * IContentProvider.cs: * NpgsqlBlogProvider.cs: xml doc * NpgsqlContentProvider.cs: implemente un listing des prestataire du code APE en base. * NpgsqlSkillProvider.cs: implemente un listing des domaines de compétence du préstataire en base. * XmlCatalogProvider.cs: Le catalogue de vente implémente mainenant l'interface d'un fournisseur de donnée comme les autres. Il pourrait par exemple vouloir définir des activité et des compétences. Pour l'instant, il n'est pas activé par la configuration, et reste le fournisseur du catalogue legacy (voir </FrontOffice/Catalog> ). * FrontOfficeController.cs: format du code * Global.asax.cs: Une route customisée pour le Front Office : /do (genre, ici, ça bouge.) * activity.sql: implémente en base de donnée le modèle des activités et compétences, ajoute aussi deux activités : l'edition logicielle et "Artiste" * style.css: changement de mes images de fond ... tombées du camion de Xavier et onlinehome.us * p8-av4.s.jpg: changement de taille * AccountController.cs: Met le code MEA à "none" quand il est spécifié non disponible. * BlogsController.cs: fixe un bug de l'edition d'un billet * FrontOfficeController.cs: implemente le contrôle booking simple * HomeController.cs: ajoute l'assemblage du catalog dans le listing dédié * YavscAjaxHelper.cs: Implemente un outil de representation JSon des objets côté serveur * parallax.js: deux fois plus de mouvement autout de x dans le parallax * yavsc.rate.js: imlemente un callback JS pour le rating * Activities.aspx: Des labels au formulaire de déclaration des activités * Activity.ascx: un panneau activité descent * Booking.aspx: implemente l'UI web du booking simple. * EavyBooking.aspx: refabrication du booking lourd * Index.aspx: supprime le panneau du tag Accueil, affiche les activités en cours du site (avec au moins un préstataire valide pour cette activité) * Web.config: Implemente une cote utilisateur, par une nouvelle valeur de son profile (Rate). * Yavsc.csproj: refabrique du code API Google, qui part dans le model. * MarkdownDeep.dll: le tag <p> ne convenait pas, le remplacer par le tag <span> non plus. Maintenant ça devrait être correct, c'est un div, mais que en cas de tag englobant non défini. * BookingQuery.cs: Le booking lourd devient une commande basée sur des activités concernée par l'intervention * ChangeLog: nettoyage * CatalogProvider.cs: implemente l'interface d'un fournissseur de contenu * PerformerProfile.cs: implemente le profile prestataire * SimpleBookingQuery.cs: Les besoin sont exprimé sous forme d'un tableau de valeur du parametrage de la commande * LocalizedText.resx: * LocalizedText.fr.resx: * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: internationalisation * Profile.cs: implemente un accès à l'id d'enregistrement Google GCM * SkillEntity.cs: La compétence appartient à un domaine d'activité, on lui associe un et un seul code APE * SkillProvider.cs: Fait chercher les compétences à partir d'un code activité * WorkFlowManager.cs: implemente l'accès à la liste des préstataires de telle activité * YavscModel.csproj: refabrications * Skills.sql: vient de passer dans activity.Sql * T.cs: la traduction est faite plus simple à appeler (sans cast vers `string`).
This commit is contained in:
@ -1,3 +1,7 @@
|
||||
2015-11-28 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NpgsqlBlogProvider.cs: xml doc
|
||||
|
||||
2015-11-26 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NpgsqlBlogProvider.csproj: nouvelles configurations de
|
||||
|
@ -20,7 +20,10 @@ namespace Npgsql.Web.Blog
|
||||
string connectionString;
|
||||
|
||||
#region implemented abstract members of BlogProvider
|
||||
|
||||
/// <summary>
|
||||
/// Updates the post.
|
||||
/// </summary>
|
||||
/// <param name="be">Be.</param>
|
||||
public override void UpdatePost (BlogEntry be)
|
||||
{
|
||||
// TODO Tags and rate should not be ignored
|
||||
|
@ -1,3 +1,11 @@
|
||||
2015-11-28 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NpgsqlContentProvider.cs: implemente un listing des
|
||||
prestataire du code APE en base.
|
||||
|
||||
* NpgsqlSkillProvider.cs: implemente un listing des domaines
|
||||
de compétence du préstataire en base.
|
||||
|
||||
2015-11-26 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* NpgsqlContentProvider.csproj: nouvelles configurations de
|
||||
|
@ -21,6 +21,48 @@ namespace Yavsc
|
||||
/// </summary>
|
||||
public class NpgsqlContentProvider: ProviderBase, IContentProvider
|
||||
{
|
||||
/// <summary>
|
||||
/// Finds the performer.
|
||||
/// </summary>
|
||||
/// <returns>The performer.</returns>
|
||||
/// <param name="MEACode">MEA code.</param>
|
||||
public PerformerProfile[] FindPerformer (string MEACode)
|
||||
{
|
||||
var result = new List<PerformerProfile> ();
|
||||
|
||||
using (NpgsqlConnection cnx = CreateConnection ()) {
|
||||
cnx.Open ();
|
||||
|
||||
using (NpgsqlCommand cmd = cnx.CreateCommand ()) {
|
||||
cmd.CommandText = @"SELECT d.uniqueid, u.username, u.email, d.rate
|
||||
FROM profiledata d, profiles p, users u
|
||||
WHERE u.username = p.username
|
||||
AND u.applicationname = p.applicationname
|
||||
AND p.uniqueid = d.uniqueid
|
||||
AND u.isapproved = TRUE
|
||||
AND u.islockedout = FALSE
|
||||
AND d.meacode = :mea
|
||||
AND u.applicationname = :app
|
||||
ORDER BY u.username ";
|
||||
cmd.Parameters.AddWithValue ("mea", NpgsqlTypes.NpgsqlDbType.Varchar, MEACode);
|
||||
cmd.Parameters.AddWithValue ("app", NpgsqlTypes.NpgsqlDbType.Varchar, applicationName);
|
||||
|
||||
using (var rdr = cmd.ExecuteReader ()) {
|
||||
if (rdr.HasRows) {
|
||||
while (rdr.Read ()) {
|
||||
var profile = new PerformerProfile ();
|
||||
profile.Id = rdr.GetInt64 (0);
|
||||
profile.UserName = rdr.GetString (1);
|
||||
profile.EMail = rdr.GetString (2);
|
||||
result.Add (profile);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.ToArray ();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the activity.
|
||||
/// </summary>
|
||||
@ -32,7 +74,7 @@ namespace Yavsc
|
||||
using (NpgsqlConnection cnx = CreateConnection ()) {
|
||||
cnx.Open ();
|
||||
using (NpgsqlCommand cmd = cnx.CreateCommand ()) {
|
||||
cmd.CommandText = @"select meacode, title, cmnt, photo
|
||||
cmd.CommandText = @"select distinct meacode, title, cmnt, photo
|
||||
from activity where meacode = :code and applicationname = :app";
|
||||
cmd.Parameters.AddWithValue ("code", MEACode);
|
||||
cmd.Parameters.AddWithValue ("app", applicationName);
|
||||
|
@ -41,6 +41,7 @@ namespace WorkFlowProvider
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
string connectionString = null;
|
||||
string applicationName = null;
|
||||
|
||||
@ -59,6 +60,7 @@ namespace WorkFlowProvider
|
||||
}
|
||||
|
||||
#region implemented abstract members of SkillProvider
|
||||
|
||||
/// <summary>
|
||||
/// Gets the user skills.
|
||||
/// </summary>
|
||||
@ -83,7 +85,8 @@ namespace WorkFlowProvider
|
||||
cmd.Parameters.AddWithValue ("app", NpgsqlTypes.NpgsqlDbType.Varchar, applicationName);
|
||||
cmd.Prepare ();
|
||||
using (var rdr = cmd.ExecuteReader ()) {
|
||||
if (rdr.HasRows) while (rdr.Read ()) {
|
||||
if (rdr.HasRows)
|
||||
while (rdr.Read ()) {
|
||||
skills.Add (new UserSkill () {
|
||||
Id = rdr.GetInt64 (0),
|
||||
SkillId = rdr.GetInt64 (1),
|
||||
@ -97,10 +100,17 @@ namespace WorkFlowProvider
|
||||
}
|
||||
using (NpgsqlCommand cmd = cnx.CreateCommand ()) {
|
||||
cmd.CommandText =
|
||||
"select uniqueid from profiles where username = :user and applicationname = :app";
|
||||
"select p.uniqueid, d.rate from profiles p, profiledata d where " +
|
||||
" username = :user and applicationname = :app " +
|
||||
" and p.uniqueid = d.uniqueid ";
|
||||
cmd.Parameters.AddWithValue ("user", NpgsqlTypes.NpgsqlDbType.Varchar, username);
|
||||
cmd.Parameters.AddWithValue ("app", NpgsqlTypes.NpgsqlDbType.Varchar, applicationName);
|
||||
profile.Id = (long) cmd.ExecuteScalar ();
|
||||
|
||||
using (var rdr = cmd.ExecuteReader ()) {
|
||||
rdr.Read ();
|
||||
profile.Id = rdr.GetInt64 (0);
|
||||
profile.Rate = rdr.GetInt32 (1);
|
||||
}
|
||||
}
|
||||
cnx.Close ();
|
||||
}
|
||||
@ -118,10 +128,14 @@ namespace WorkFlowProvider
|
||||
cnx.Open ();
|
||||
if (skill.Id == 0) {
|
||||
using (NpgsqlCommand cmd = cnx.CreateCommand ()) {
|
||||
cmd.CommandText = "insert into skill (name,rate) values (:name,:rate) returning _id";
|
||||
cmd.CommandText = "insert into skill (name,meacode,rate,applicationname) " +
|
||||
" values (:name,:mea,:rate,:app) " +
|
||||
" returning _id ";
|
||||
cmd.Parameters.AddWithValue ("name", NpgsqlTypes.NpgsqlDbType.Varchar, skill.Name);
|
||||
cmd.Parameters.AddWithValue ("mea", NpgsqlTypes.NpgsqlDbType.Varchar, skill.MEACode);
|
||||
cmd.Parameters.AddWithValue ("rate",
|
||||
NpgsqlTypes.NpgsqlDbType.Integer, skill.Rate);
|
||||
cmd.Parameters.AddWithValue ("app", NpgsqlTypes.NpgsqlDbType.Varchar, applicationName);
|
||||
res = (long)cmd.ExecuteScalar ();
|
||||
}
|
||||
} else {
|
||||
@ -254,26 +268,41 @@ namespace WorkFlowProvider
|
||||
cnx.Close ();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Finds the skill identifier.
|
||||
/// Finds the skills.
|
||||
/// </summary>
|
||||
/// <returns>The skill identifier.</returns>
|
||||
/// <param name="pattern">Pattern.</param>
|
||||
public override SkillEntity[] FindSkill (string pattern)
|
||||
/// <param name="MEACode">MEA Code.</param>
|
||||
public override SkillEntity[] FindSkill (string pattern, string MEACode)
|
||||
{
|
||||
List<SkillEntity> skills = new List<SkillEntity> ();
|
||||
using (NpgsqlConnection cnx = new NpgsqlConnection (connectionString)) {
|
||||
cnx.Open ();
|
||||
using (NpgsqlCommand cmd = cnx.CreateCommand ()) {
|
||||
cmd.CommandText = "select _id, name, rate from skill where name like :name order by rate desc";
|
||||
|
||||
cmd.CommandText = "select _id, name, rate, meacode " +
|
||||
" from skill " +
|
||||
" where name like :name ";
|
||||
if (MEACode != null)
|
||||
cmd.CommandText +=
|
||||
" and meacode = :mea ";
|
||||
cmd.CommandText += " and applicationname = :app " +
|
||||
" order by rate desc";
|
||||
cmd.Parameters.AddWithValue ("name", NpgsqlTypes.NpgsqlDbType.Varchar, pattern);
|
||||
if (MEACode != null)
|
||||
cmd.Parameters.AddWithValue ("mea", NpgsqlTypes.NpgsqlDbType.Varchar, MEACode);
|
||||
cmd.Parameters.AddWithValue ("app", NpgsqlTypes.NpgsqlDbType.Varchar, applicationName);
|
||||
cmd.Prepare ();
|
||||
using (var rdr = cmd.ExecuteReader ()) {
|
||||
if (rdr.HasRows) while (rdr.Read ()) {
|
||||
if (rdr.HasRows)
|
||||
while (rdr.Read ()) {
|
||||
skills.Add (new SkillEntity () {
|
||||
Id = (long)rdr.GetInt64 (0),
|
||||
Name = (string)rdr.GetString (1),
|
||||
Rate = (int) rdr.GetInt32(2)
|
||||
Rate = (int)rdr.GetInt32 (2),
|
||||
MEACode = (string)rdr.GetString (3),
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -296,14 +325,24 @@ namespace WorkFlowProvider
|
||||
cnx.Open ();
|
||||
using (NpgsqlCommand cmd = cnx.CreateCommand ()) {
|
||||
|
||||
cmd.CommandText = " select username from userskills " +
|
||||
" where skillid = :sid " +
|
||||
" order by rate desc ";
|
||||
cmd.CommandText = " select u.username " +
|
||||
" from userskills s, profiledata p, profile q, users u " +
|
||||
" where s.username = u.username " +
|
||||
" and s.applicationname = u.applicationanme " +
|
||||
" and s.skillid = :sid " +
|
||||
" and u.username = q.username " +
|
||||
" and u.applicationname = q.applicationanme " +
|
||||
" and p.uniqueid = q.uniqueid " +
|
||||
" and u.applicationanme = :app " +
|
||||
" and u.islockedout = FALSE " +
|
||||
" and u.isapproved = TRUE " +
|
||||
" order by s.rate desc ";
|
||||
|
||||
|
||||
cmd.Parameters.AddWithValue ("sid", NpgsqlDbType.Bigint, 0);
|
||||
cmd.Prepare ();
|
||||
|
||||
foreach ( long sid in skillIds )
|
||||
{
|
||||
foreach (long sid in skillIds) {
|
||||
cmd.Parameters ["sid"].Value = sid;
|
||||
using (var rdr = cmd.ExecuteReader ()) {
|
||||
string uname = rdr.GetString (0);
|
||||
@ -311,6 +350,28 @@ namespace WorkFlowProvider
|
||||
res.Add (uname);
|
||||
}
|
||||
}
|
||||
// TODO implement a configuration parameter
|
||||
if (res.Count < 10) {
|
||||
cmd.CommandText = " select u.username " +
|
||||
" from skill s, profiledata p , profile q, users u " +
|
||||
" where u.username = q.username " +
|
||||
" and u.applicationname = q.applicationanme " +
|
||||
" and p.uniqueid = q.uniqueid " +
|
||||
" and p.meacode = s.meacode " +
|
||||
" and s._id = :sid " +
|
||||
" and u.applicationanme = :app " +
|
||||
" and u.islockedout = FALSE " +
|
||||
" and u.isapproved = TRUE" +
|
||||
" order by s.rate desc " ;
|
||||
foreach (long sid in skillIds) {
|
||||
cmd.Parameters ["sid"].Value = sid;
|
||||
using (var rdr = cmd.ExecuteReader ()) {
|
||||
string uname = rdr.GetString (0);
|
||||
if (!res.Contains (uname))
|
||||
res.Add (uname);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
cnx.Close ();
|
||||
}
|
||||
@ -339,7 +400,8 @@ namespace WorkFlowProvider
|
||||
/// Deletes the user skill.
|
||||
/// </summary>
|
||||
/// <param name="userSkillId">User skill identifier.</param>
|
||||
public override void DeleteUserSkill(long userSkillId) {
|
||||
public override void DeleteUserSkill (long userSkillId)
|
||||
{
|
||||
using (NpgsqlConnection cnx = new NpgsqlConnection (connectionString)) {
|
||||
cnx.Open ();
|
||||
using (NpgsqlCommand cmd = cnx.CreateCommand ()) {
|
||||
@ -351,6 +413,7 @@ namespace WorkFlowProvider
|
||||
cnx.Close ();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,15 @@
|
||||
2015-11-28 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* XmlCatalogProvider.cs: Le catalogue de vente implémente
|
||||
mainenant l'interface d'un fournisseur de donnée comme les
|
||||
autres.
|
||||
Il pourrait par exemple vouloir définir des activité et des
|
||||
compétences.
|
||||
Pour l'instant, il n'est pas activé par la configuration, et
|
||||
reste le fournisseur du catalogue legacy (voir
|
||||
</FrontOffice/Catalog> ).
|
||||
|
||||
|
||||
2015-11-26 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* SalesCatalog.csproj: nouvelles configurations de déploiement
|
||||
|
@ -15,8 +15,46 @@ namespace SalesCatalog.XmlImplementation
|
||||
/// </summary>
|
||||
public class XmlCatalogProvider: CatalogProvider
|
||||
{
|
||||
#region implemented abstract members of CatalogProvider
|
||||
|
||||
#region implemented abstract members of SalesCatalog.CatalogProvider
|
||||
/// <summary>
|
||||
/// Gets the activity.
|
||||
/// </summary>
|
||||
/// <returns>The activity.</returns>
|
||||
/// <param name="MEACode">MAE code.</param>
|
||||
public override Yavsc.Model.FrontOffice.Activity GetActivity (string MEACode)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
/// <summary>
|
||||
/// Registers the activity.
|
||||
/// </summary>
|
||||
/// <param name="activityName">Activity name.</param>
|
||||
/// <param name="meacode">Meacode.</param>
|
||||
/// <param name="comment">Comment.</param>
|
||||
public override void RegisterActivity (string activityName, string meacode, string comment)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
/// <summary>
|
||||
/// Finds the activity.
|
||||
/// </summary>
|
||||
/// <returns>The activity.</returns>
|
||||
/// <param name="pattern">Pattern.</param>
|
||||
/// <param name="exerted">If set to <c>true</c> exerted.</param>
|
||||
public override Yavsc.Model.FrontOffice.Activity[] FindActivity (string pattern, bool exerted)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
/// <summary>
|
||||
/// Finds the performer.
|
||||
/// </summary>
|
||||
/// <returns>The performer.</returns>
|
||||
/// <param name="MEACode">MEA code.</param>
|
||||
public override Yavsc.Model.FrontOffice.PerformerProfile[] FindPerformer (string MEACode)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets the catalog, loading it from
|
||||
/// the file system at a first call,
|
||||
|
@ -25,8 +25,9 @@ using Yavsc.Helpers;
|
||||
using Yavsc.Model.Circles;
|
||||
using System.Collections.Generic;
|
||||
using System.Web.Profile;
|
||||
using Yavsc.Helpers.Google;
|
||||
using System.Web.Security;
|
||||
using Yavsc.Model.Google.Api;
|
||||
using Yavsc.Model.Google.Api.Messaging;
|
||||
|
||||
namespace Yavsc.ApiControllers
|
||||
{
|
||||
|
@ -205,8 +205,6 @@ namespace Yavsc.ApiControllers
|
||||
public void RateSkill (SkillRating rate) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -40,6 +40,13 @@ namespace Yavsc
|
||||
routes.IgnoreRoute ("favicon.ico"); // favorite icon
|
||||
routes.IgnoreRoute ("favicon.png"); // favorite icon
|
||||
routes.IgnoreRoute ("robots.txt"); // for search engine robots
|
||||
|
||||
routes.MapRoute (
|
||||
"FrontOffice",
|
||||
"do/{action}/{MEACode}/{Id}",
|
||||
new { controller = "FrontOffice", action = "Index", MEACode = UrlParameter.Optional, Id = UrlParameter.Optional }
|
||||
);
|
||||
|
||||
routes.MapRoute (
|
||||
"Titles",
|
||||
"title/{title}",
|
||||
|
@ -1,68 +0,0 @@
|
||||
|
||||
-- Table: skill
|
||||
|
||||
-- DROP TABLE skill;
|
||||
|
||||
CREATE TABLE skill
|
||||
(
|
||||
_id bigserial NOT NULL,
|
||||
name character varying(2024) NOT NULL,
|
||||
rate integer NOT NULL DEFAULT 50,
|
||||
CONSTRAINT skill_pkey PRIMARY KEY (_id),
|
||||
CONSTRAINT skill_name_key UNIQUE (name)
|
||||
)
|
||||
WITH (
|
||||
OIDS=FALSE
|
||||
);
|
||||
|
||||
|
||||
-- Table: userskills
|
||||
|
||||
-- DROP TABLE userskills;
|
||||
|
||||
CREATE TABLE userskills
|
||||
(
|
||||
applicationname character varying(512) NOT NULL,
|
||||
username character varying(512) NOT NULL,
|
||||
comment character varying,
|
||||
skillid bigint NOT NULL, -- Skill identifier
|
||||
rate integer NOT NULL,
|
||||
_id bigserial NOT NULL, -- The id ...
|
||||
CONSTRAINT userskills_pkey PRIMARY KEY (applicationname, username, skillid),
|
||||
CONSTRAINT userskills_applicationname_fkey FOREIGN KEY (applicationname, username)
|
||||
REFERENCES users (applicationname, username) MATCH SIMPLE
|
||||
ON UPDATE CASCADE ON DELETE CASCADE,
|
||||
CONSTRAINT userskills_skillid_fkey FOREIGN KEY (skillid)
|
||||
REFERENCES skill (_id) MATCH SIMPLE
|
||||
ON UPDATE CASCADE ON DELETE CASCADE,
|
||||
CONSTRAINT userskills__id_key UNIQUE (_id)
|
||||
)
|
||||
WITH (
|
||||
OIDS=FALSE
|
||||
);
|
||||
COMMENT ON COLUMN userskills.skillid IS 'Skill identifier';
|
||||
COMMENT ON COLUMN userskills._id IS 'The id ...';
|
||||
|
||||
-- Table: satisfaction
|
||||
|
||||
-- DROP TABLE satisfaction;
|
||||
|
||||
CREATE TABLE satisfaction
|
||||
(
|
||||
_id bigserial NOT NULL,
|
||||
userskillid bigint, -- the user's skill reference
|
||||
rate integer, -- The satisfaction rating associated by a client to an user's skill
|
||||
comnt character varying(8192), -- The satisfaction textual comment associated by a client to an user's skill, it could be formatted ala Markdown
|
||||
CONSTRAINT satisfaction_pkey PRIMARY KEY (_id),
|
||||
CONSTRAINT satisfaction_userskillid_fkey FOREIGN KEY (userskillid)
|
||||
REFERENCES userskills (_id) MATCH SIMPLE
|
||||
ON UPDATE CASCADE ON DELETE CASCADE
|
||||
)
|
||||
WITH (
|
||||
OIDS=FALSE
|
||||
);
|
||||
COMMENT ON COLUMN satisfaction.userskillid IS 'the user''s skill reference';
|
||||
COMMENT ON COLUMN satisfaction.rate IS 'The satisfaction rating associated by a client to an user''s skill';
|
||||
COMMENT ON COLUMN satisfaction.comnt IS 'The satisfaction textual comment associated by a client to an user''s skill, it could be formatted ala Markdown';
|
||||
|
||||
|
@ -1,6 +1,9 @@
|
||||
-- Table: activity
|
||||
DROP TABLE satisfaction;
|
||||
DROP TABLE userskills;
|
||||
DROP TABLE skill;
|
||||
DROP TABLE activity;
|
||||
|
||||
|
||||
-- DROP TABLE activity;
|
||||
|
||||
CREATE TABLE activity
|
||||
(
|
||||
@ -8,7 +11,8 @@ CREATE TABLE activity
|
||||
applicationname character varying(255) NOT NULL,
|
||||
cmnt character varying, -- a long description for this activity
|
||||
meacode character varying(512) NOT NULL, -- Identifiant de l'activité, à terme, il faudrait ajouter un champ à cette id: le code pays....
|
||||
photo character varying(512) -- a photo url, as a front image for this activity
|
||||
photo character varying(512) NOT NULL DEFAULT 'none'::character varying, -- a photo url, as a front image for this activity
|
||||
CONSTRAINT activity_pkey PRIMARY KEY (meacode, applicationname)
|
||||
)
|
||||
WITH (
|
||||
OIDS=FALSE
|
||||
@ -27,3 +31,113 @@ Exemple: ''71.12B'' => "Ingénierie, études techniques"
|
||||
';
|
||||
COMMENT ON COLUMN activity.photo IS 'a photo url, as a front image for this activity';
|
||||
|
||||
|
||||
INSERT INTO activity(
|
||||
title, applicationname, cmnt, meacode, photo)
|
||||
VALUES (
|
||||
'Édition de logiciels applicatifs',
|
||||
'/',
|
||||
'Vente d''applications logicielles',
|
||||
'6829C',
|
||||
'http://www.janua.fr/wp-content/uploads/2014/02/born2code-xavier-niel-developpeurs-formation.jpg'
|
||||
);
|
||||
|
||||
INSERT INTO activity(
|
||||
title, applicationname, cmnt, meacode, photo)
|
||||
VALUES (
|
||||
'Artiste',
|
||||
'/',
|
||||
'Anime votre mariage, un anniversaire ou autre événnement.',
|
||||
'Artiste',
|
||||
'http://www.dancefair.tv/wp-content/uploads/2015/05/How-to-secure-DJ-gig.jpg'
|
||||
);
|
||||
|
||||
|
||||
-- Table: skill
|
||||
|
||||
-- DROP TABLE skill;
|
||||
|
||||
CREATE TABLE skill
|
||||
(
|
||||
_id bigserial NOT NULL,
|
||||
name character varying(2024) NOT NULL,
|
||||
rate integer NOT NULL DEFAULT 50,
|
||||
meacode character varying(256) NOT NULL,
|
||||
applicationname character varying(255),
|
||||
CONSTRAINT skill_pkey PRIMARY KEY (_id),
|
||||
CONSTRAINT skill_app FOREIGN KEY (applicationname, meacode)
|
||||
REFERENCES activity (applicationname, meacode) MATCH SIMPLE
|
||||
ON UPDATE CASCADE ON DELETE CASCADE,
|
||||
CONSTRAINT skill_name_meacode_applicationname_key UNIQUE (name, meacode, applicationname)
|
||||
)
|
||||
WITH (
|
||||
OIDS=FALSE
|
||||
);
|
||||
|
||||
-- Index: fki_skill_app
|
||||
|
||||
-- DROP INDEX fki_skill_app;
|
||||
|
||||
CREATE INDEX fki_skill_app
|
||||
ON skill
|
||||
USING btree
|
||||
(applicationname COLLATE pg_catalog."default", meacode COLLATE pg_catalog."default");
|
||||
|
||||
|
||||
|
||||
-- Table: userskills
|
||||
|
||||
-- DROP TABLE userskills;
|
||||
|
||||
CREATE TABLE userskills
|
||||
(
|
||||
applicationname character varying(512) NOT NULL,
|
||||
username character varying(512) NOT NULL,
|
||||
comment character varying,
|
||||
skillid bigint NOT NULL, -- Skill identifier
|
||||
rate integer NOT NULL,
|
||||
_id bigserial NOT NULL, -- The id ...
|
||||
CONSTRAINT userskills_pkey PRIMARY KEY (applicationname, username, skillid),
|
||||
CONSTRAINT userskills_applicationname_fkey FOREIGN KEY (applicationname, username)
|
||||
REFERENCES users (applicationname, username) MATCH SIMPLE
|
||||
ON UPDATE CASCADE ON DELETE CASCADE,
|
||||
CONSTRAINT userskills_skillid_fkey FOREIGN KEY (skillid)
|
||||
REFERENCES skill (_id) MATCH SIMPLE
|
||||
ON UPDATE CASCADE ON DELETE CASCADE,
|
||||
CONSTRAINT userskills__id_key UNIQUE (_id)
|
||||
)
|
||||
WITH (
|
||||
OIDS=FALSE
|
||||
);
|
||||
COMMENT ON COLUMN userskills.skillid IS 'Skill identifier';
|
||||
COMMENT ON COLUMN userskills._id IS 'The id ...';
|
||||
|
||||
-- Table: satisfaction
|
||||
|
||||
-- DROP TABLE satisfaction;
|
||||
|
||||
CREATE TABLE satisfaction
|
||||
(
|
||||
_id bigserial NOT NULL,
|
||||
userskillid bigint, -- the user's skill reference
|
||||
rate integer, -- The satisfaction rating associated by a client to an user's skill
|
||||
comnt character varying(8192), -- The satisfaction textual comment associated by a client to an user's skill, it could be formatted ala Markdown
|
||||
CONSTRAINT satisfaction_pkey PRIMARY KEY (_id),
|
||||
CONSTRAINT satisfaction_userskillid_fkey FOREIGN KEY (userskillid)
|
||||
REFERENCES userskills (_id) MATCH SIMPLE
|
||||
ON UPDATE CASCADE ON DELETE CASCADE
|
||||
)
|
||||
WITH (
|
||||
OIDS=FALSE
|
||||
);
|
||||
|
||||
COMMENT ON COLUMN satisfaction.userskillid IS 'the user''s skill reference';
|
||||
COMMENT ON COLUMN satisfaction.rate IS 'The satisfaction rating associated by a client to an user''s skill';
|
||||
COMMENT ON COLUMN satisfaction.comnt IS 'The satisfaction textual comment associated by a client to an user''s skill, it could be formatted ala Markdown';
|
||||
|
||||
ALTER TABLE satisfaction OWNER TO lua;
|
||||
ALTER TABLE userskills OWNER TO lua;
|
||||
ALTER TABLE skill OWNER TO lua;
|
||||
ALTER TABLE activity OWNER TO lua;
|
||||
|
||||
|
||||
|
@ -26,7 +26,7 @@ input, textarea, checkbox {
|
||||
}
|
||||
|
||||
header {
|
||||
background: url("/App_Themes/images/star-939235_1280.jpg") -3em -3em no-repeat fixed;
|
||||
background: url("http://s448140597.onlinehome.us/wp-content/uploads/2014/12/project-management1.jpg") -20em -20em repeat fixed;
|
||||
}
|
||||
|
||||
header h1, header a {
|
||||
@ -38,7 +38,7 @@ nav {
|
||||
}
|
||||
|
||||
main {
|
||||
background: url("/App_Themes/images/p8-av4.png") 50% 20em no-repeat fixed ;
|
||||
background: url("/App_Themes/images/p8-av4.l.jpg") 50% 50% no-repeat fixed ;
|
||||
}
|
||||
|
||||
footer {
|
||||
@ -138,7 +138,6 @@ input:hover, textarea:hover {
|
||||
header {
|
||||
padding-top:1em;
|
||||
padding-bottom:1em;
|
||||
background: url("/App_Themes/images/star-939235_1280.s.jpg") 0 0 no-repeat fixed;
|
||||
}
|
||||
|
||||
#avatar {
|
||||
@ -155,7 +154,7 @@ header h1, header a , .actionlink, .menuitem, a { padding:.5em;}
|
||||
main {
|
||||
margin: 1em;
|
||||
padding: 1em;
|
||||
background: url("/App_Themes/images/p8-av4.s.jpg") 50% 20em no-repeat fixed ;
|
||||
background: url("/App_Themes/images/p8-av4.jpg") 50% 50% no-repeat fixed ;
|
||||
}
|
||||
footer {
|
||||
background: url("/App_Themes/images/helix-nebula-1400x1400.s.jpg") 50% 90% repeat fixed ;
|
||||
@ -194,7 +193,6 @@ header h1, header a , .actionlink, .menuitem, a { padding:.5em;}
|
||||
header {
|
||||
padding-top:.5em;
|
||||
padding-bottom:.5em;
|
||||
background: url("/App_Themes/images/star-939235_1280.xxs.jpg") 0 0 no-repeat fixed;
|
||||
}
|
||||
|
||||
header h1, header a { padding:.2em;}
|
||||
@ -207,7 +205,7 @@ header h1, header a { padding:.2em;}
|
||||
main {
|
||||
margin: .5em;
|
||||
padding: .5em;
|
||||
background: url("/App_Themes/images/p8-av4.xxs.jpg") 50% 20em repeat fixed ;
|
||||
background: url("/App_Themes/images/p8-av4.s.jpg") 50% 50% no-repeat fixed ;
|
||||
}
|
||||
footer {
|
||||
background: url("/App_Themes/images/helix-nebula-1400x1400.xxs.jpg") 50% 10% repeat fixed ;
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 20 KiB |
Binary file not shown.
Before Width: | Height: | Size: 22 KiB |
Binary file not shown.
Before Width: | Height: | Size: 132 KiB |
@ -1,3 +1,91 @@
|
||||
2015-11-28 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* p8-av4.xxs.jpg:
|
||||
* p8-av4.xxs.png: inutile
|
||||
|
||||
* NoLogin.master:
|
||||
* Entity.cs:
|
||||
* OAuth2.cs:
|
||||
* ApiClient.cs:
|
||||
* PeopleApi.cs:
|
||||
* MapTracks.cs:
|
||||
* Skills.aspx:
|
||||
* CalendarApi.cs:
|
||||
* EntityQuery.cs:
|
||||
* GoogleHelpers.cs:
|
||||
* EventPub.aspx:
|
||||
* GoogleController.cs:
|
||||
* SimpleJsonPostMethod.cs:
|
||||
* UserSkills.aspx:
|
||||
* BackOfficeController.cs:
|
||||
* BackOfficeController.cs: refabrication
|
||||
|
||||
* FrontOfficeController.cs: format du code
|
||||
|
||||
* Global.asax.cs: Une route customisée pour le Front Office :
|
||||
/do (genre, ici, ça bouge.)
|
||||
|
||||
|
||||
* activity.sql: implémente en base de donnée le modèle des
|
||||
activités et compétences,
|
||||
ajoute aussi deux activités : l'edition logicielle et
|
||||
"Artiste"
|
||||
|
||||
|
||||
* style.css: changement de mes images de fond ... tombées du
|
||||
camion de Xavier et onlinehome.us
|
||||
|
||||
* p8-av4.s.jpg: changement de taille
|
||||
|
||||
* AccountController.cs: Met le code MEA à "none" quand il est
|
||||
spécifié non disponible.
|
||||
|
||||
* BlogsController.cs: fixe un bug de l'edition d'un billet
|
||||
|
||||
* FrontOfficeController.cs: implemente le contrôle booking
|
||||
simple
|
||||
|
||||
* HomeController.cs: ajoute l'assemblage du catalog dans le
|
||||
listing dédié
|
||||
|
||||
* YavscAjaxHelper.cs: Implemente un outil de representation
|
||||
JSon des objets côté serveur
|
||||
|
||||
* parallax.js: deux fois plus de mouvement autout de x dans le
|
||||
parallax
|
||||
|
||||
* yavsc.rate.js: imlemente un callback JS pour le rating
|
||||
|
||||
* Activities.aspx: Des labels au formulaire de déclaration des
|
||||
activités
|
||||
|
||||
* Activity.ascx: un panneau activité descent
|
||||
|
||||
* Booking.aspx: implemente l'UI web du booking simple.
|
||||
|
||||
* EavyBooking.aspx: refabrication du booking lourd
|
||||
|
||||
* Index.aspx: supprime le panneau du tag Accueil, affiche les
|
||||
activités en cours du site (avec au moins un préstataire
|
||||
valide pour cette activité)
|
||||
|
||||
* Web.config: Implemente une cote utilisateur, par une
|
||||
nouvelle valeur de son profile (Rate).
|
||||
|
||||
|
||||
* Yavsc.csproj: refabrique du code API Google, qui part dans
|
||||
le model.
|
||||
|
||||
* MarkdownDeep.dll: le tag <p> ne convenait pas, le remplacer
|
||||
par le tag <span> non plus.
|
||||
Maintenant ça devrait être correct, c'est un div, mais que en
|
||||
cas de tag englobant non défini.
|
||||
|
||||
* Skills.sql: vient de passer dans activity.Sql
|
||||
|
||||
* T.cs: la traduction est faite plus simple à appeler (sans
|
||||
cast vers `string`).
|
||||
|
||||
2015-11-26 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* Yavsc.csproj: nouvelles configurations de
|
||||
|
@ -262,7 +262,7 @@ namespace Yavsc.Controllers
|
||||
private void SetMEACodeViewData(Profile model) {
|
||||
var activities = WorkFlowManager.FindActivity ("%", false);
|
||||
var items = new List<SelectListItem> ();
|
||||
items.Add (new SelectListItem () { Selected = model.MEACode == null, Text = LocalizedText.DoNotPublishMyActivity, Value=null });
|
||||
items.Add (new SelectListItem () { Selected = model.MEACode == null, Text = LocalizedText.DoNotPublishMyActivity, Value="none" });
|
||||
foreach (var a in activities) {
|
||||
items.Add(new SelectListItem() { Selected = model.MEACode == a.Id,
|
||||
Text = string.Format("{1} : {0}",a.Title,a.Id),
|
||||
@ -271,7 +271,6 @@ namespace Yavsc.Controllers
|
||||
ViewData ["MEACode"] = items;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Profile the specified id, model and AvatarFile.
|
||||
/// </summary>
|
||||
|
@ -5,9 +5,9 @@ using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using Yavsc.Admin;
|
||||
using Yavsc.Model.Calendar;
|
||||
using Yavsc.Helpers.Google;
|
||||
using Yavsc.Model.Circles;
|
||||
using System.Web.Security;
|
||||
using Yavsc.Model.Google.Api;
|
||||
|
||||
|
||||
namespace Yavsc.Controllers
|
||||
|
@ -302,7 +302,7 @@ namespace Yavsc.Controllers
|
||||
Membership.GetUser ().UserName).Select (x => new SelectListItem {
|
||||
Value = x.Id.ToString(),
|
||||
Text = x.Title,
|
||||
Selected = model.AllowedCircles.Contains (x.Id)
|
||||
Selected = (model.AllowedCircles==null)? false : model.AllowedCircles.Contains (x.Id)
|
||||
});
|
||||
return View ("Edit", model);
|
||||
}
|
||||
|
@ -17,6 +17,10 @@ using System.Configuration;
|
||||
using Yavsc.Helpers;
|
||||
using Yavsc.Model.FrontOffice.Catalog;
|
||||
using Yavsc.Model.Skill;
|
||||
using System.Web.Profile;
|
||||
using Yavsc.Model.Google.Api;
|
||||
using System.Net;
|
||||
using System.Linq;
|
||||
|
||||
namespace Yavsc.Controllers
|
||||
{
|
||||
@ -33,6 +37,7 @@ namespace Yavsc.Controllers
|
||||
{
|
||||
return View ();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Pub the Event
|
||||
/// </summary>
|
||||
@ -42,6 +47,7 @@ namespace Yavsc.Controllers
|
||||
{
|
||||
return View (model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Estimates released to this client
|
||||
/// </summary>
|
||||
@ -266,16 +272,28 @@ namespace Yavsc.Controllers
|
||||
return View (skills);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Performers on this MEA.
|
||||
/// fr
|
||||
/// Liste des prestataires dont
|
||||
/// l'activité principale est celle spécifiée
|
||||
/// </summary>
|
||||
/// <param name="id">Identifiant APE de l'activité.</param>
|
||||
public ActionResult Performers (string id)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Activities the specified search and toPower.
|
||||
/// </summary>
|
||||
/// <param name="search">Search.</param>
|
||||
/// <param name="toPower">If set to <c>true</c> to power.</param>
|
||||
public ActionResult Activities (string search, bool toPower = false)
|
||||
public ActionResult Activities (string id, bool toPower = false)
|
||||
{
|
||||
if (search == null)
|
||||
search = "%";
|
||||
var activities = WorkFlowManager.FindActivity(search,!toPower);
|
||||
if (id == null)
|
||||
id = "%";
|
||||
var activities = WorkFlowManager.FindActivity (id, !toPower);
|
||||
return View (activities);
|
||||
}
|
||||
|
||||
@ -287,6 +305,7 @@ namespace Yavsc.Controllers
|
||||
{
|
||||
return View (WorkFlowManager.GetActivity (id));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Display and should
|
||||
/// offer Ajax edition of
|
||||
@ -308,15 +327,131 @@ namespace Yavsc.Controllers
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Booking the specified model.
|
||||
/// Dates the query.
|
||||
/// </summary>
|
||||
/// <returns>The query.</returns>
|
||||
/// <param name="model">Model.</param>
|
||||
public ActionResult Booking (string id, SimpleBookingQuery model)
|
||||
[Authorize,HttpPost]
|
||||
public ActionResult Book (BookingQuery model)
|
||||
{
|
||||
if (model.Needs == null)
|
||||
model.Needs = SkillManager.FindSkill ("%");
|
||||
model.MAECode = id;
|
||||
DateTime mindate = DateTime.Now;
|
||||
if (model.StartDate.Date < mindate.Date) {
|
||||
ModelState.AddModelError ("StartDate", LocalizedText.FillInAFutureDate);
|
||||
}
|
||||
if (model.EndDate < model.StartDate)
|
||||
ModelState.AddModelError ("EndDate", LocalizedText.StartDateAfterEndDate);
|
||||
|
||||
if (ModelState.IsValid) {
|
||||
|
||||
var result = new List<PerformerProfile> ();
|
||||
|
||||
foreach (string meacode in model.MEACodes) {
|
||||
foreach (PerformerProfile profile in WorkFlowManager.FindPerformer(meacode)) {
|
||||
try {
|
||||
var events = ProfileBase.Create (profile.UserName).GetEvents (model.StartDate, model.EndDate);
|
||||
if (events.items.Length == 0)
|
||||
result.Add (profile);
|
||||
} catch (WebException ex) {
|
||||
string response;
|
||||
using (var stream = ex.Response.GetResponseStream ()) {
|
||||
using (var reader = new StreamReader (stream)) {
|
||||
response = reader.ReadToEnd ();
|
||||
stream.Close ();
|
||||
}
|
||||
YavscHelpers.Notify (ViewData,
|
||||
string.Format (
|
||||
"Google calendar API exception {0} : {1}<br><pre>{2}</pre>",
|
||||
ex.Status.ToString (),
|
||||
ex.Message,
|
||||
response));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return View ("Performers", result.ToArray ());
|
||||
}
|
||||
return View (model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Booking the specified model.
|
||||
/// </summary>
|
||||
/// <param name="MEACode">MEA Code.</param>
|
||||
/// <param name="model">Model.</param>
|
||||
public ActionResult Booking (SimpleBookingQuery model)
|
||||
{
|
||||
|
||||
// In order to present this form
|
||||
// with no need selected and without
|
||||
// validation error display,
|
||||
// we only check the need here, not at validation time.
|
||||
// Although, the need is indeed cruxial requirement,
|
||||
// but we already have got a MEA code
|
||||
if (ModelState.IsValid)
|
||||
if (model.Needs != null) {
|
||||
var result = new List<PerformerAvailability> ();
|
||||
foreach (PerformerProfile profile in WorkFlowManager.FindPerformer(model.MEACode)) {
|
||||
if (profile.HasCalendar ()) {
|
||||
try {
|
||||
var events = ProfileBase.Create (profile.UserName)
|
||||
.GetEvents (
|
||||
model.PreferedDate.Date,
|
||||
model.PreferedDate.AddDays (1).Date);
|
||||
// TODO replace (events.items.Length == 0)
|
||||
// with a descent computing of dates and times claims, calendar,
|
||||
// AND performer preferences, perhaps also client preferences
|
||||
result.Add (profile.CreateAvailability (model.PreferedDate, (events.items.Length == 0)));
|
||||
} catch (WebException ex) {
|
||||
HandleWebException (ex, "Google Calendar Api");
|
||||
}
|
||||
} else
|
||||
result.Add (profile.CreateAvailability (model.PreferedDate, false));
|
||||
|
||||
}
|
||||
return View ("Performers", result.ToArray ());
|
||||
} else {
|
||||
// A first Get
|
||||
var needs = SkillManager.FindSkill ("%", model.MEACode);
|
||||
ViewData ["Needs"] = needs;
|
||||
model.Needs = needs.Select (
|
||||
x => string.Format ("{0}:{1}", x.Id, x.Rate)).ToArray ();
|
||||
}
|
||||
|
||||
var activity = WorkFlowManager.GetActivity (model.MEACode);
|
||||
ViewData ["Activity"] = activity;
|
||||
ViewData ["Title"] = activity.Title;
|
||||
ViewData ["Comment"] = activity.Comment;
|
||||
ViewData ["Photo"] = activity.Photo;
|
||||
if (model.PreferedDate < DateTime.Now)
|
||||
model.PreferedDate = DateTime.Now;
|
||||
return View (model);
|
||||
}
|
||||
|
||||
private void HandleWebException (WebException ex, string context)
|
||||
{
|
||||
|
||||
string response = "";
|
||||
using (var stream = ex.Response.GetResponseStream ()) {
|
||||
if (stream.CanRead) {
|
||||
var reader = new StreamReader (stream);
|
||||
response = reader.ReadToEnd ();
|
||||
reader.Close ();
|
||||
reader.DiscardBufferedData ();
|
||||
reader.Dispose ();
|
||||
}
|
||||
stream.Close ();
|
||||
stream.Dispose ();
|
||||
|
||||
}
|
||||
YavscHelpers.Notify (ViewData,
|
||||
string.Format (
|
||||
"{3} exception {0} : {1}<br><pre>{2}</pre>",
|
||||
ex.Status.ToString (),
|
||||
ex.Message,
|
||||
response,
|
||||
context
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -15,9 +15,12 @@ using Newtonsoft.Json;
|
||||
using Yavsc.Model;
|
||||
using Yavsc.Model.Google;
|
||||
using Yavsc.Model.RolesAndMembers;
|
||||
using Yavsc.Helpers.Google;
|
||||
using Yavsc.Model.Calendar;
|
||||
using Yavsc.Helpers;
|
||||
using Yavsc.Model.WorkFlow;
|
||||
using Yavsc.Model.FrontOffice;
|
||||
using Yavsc.Model.Google.Api;
|
||||
using Yavsc.Model.Skill;
|
||||
|
||||
namespace Yavsc.Controllers
|
||||
{
|
||||
@ -303,44 +306,10 @@ namespace Yavsc.Controllers
|
||||
return View (model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Dates the query.
|
||||
/// </summary>
|
||||
/// <returns>The query.</returns>
|
||||
/// <param name="model">Model.</param>
|
||||
[Authorize,HttpPost]
|
||||
public ActionResult Book (BookingQuery model)
|
||||
{
|
||||
DateTime mindate = DateTime.Now;
|
||||
if (model.StartDate.Date < mindate.Date){
|
||||
ModelState.AddModelError ("StartDate", LocalizedText.FillInAFutureDate);
|
||||
}
|
||||
if (model.EndDate < model.StartDate)
|
||||
ModelState.AddModelError ("EndDate", LocalizedText.StartDateAfterEndDate);
|
||||
|
||||
if (ModelState.IsValid) {
|
||||
foreach (string rolename in model.Roles) {
|
||||
foreach (string username in Roles.GetUsersInRole(rolename)) {
|
||||
try {
|
||||
var pr = ProfileBase.Create(username);
|
||||
var events = pr.GetEvents(model.StartDate,model.EndDate);
|
||||
} catch (WebException ex) {
|
||||
string response;
|
||||
using (var stream = ex.Response.GetResponseStream())
|
||||
using (var reader = new StreamReader(stream))
|
||||
|
||||
public ActionResult Book (SimpleBookingQuery model)
|
||||
{
|
||||
response = reader.ReadToEnd();
|
||||
}
|
||||
YavscHelpers.Notify (ViewData,
|
||||
string.Format(
|
||||
"Google calendar API exception {0} : {1}<br><pre>{2}</pre>",
|
||||
ex.Status.ToString(),
|
||||
ex.Message,
|
||||
response));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return View (model);
|
||||
}
|
||||
}
|
||||
|
@ -15,6 +15,8 @@ using Yavsc;
|
||||
using System.Web.Mvc;
|
||||
using Yavsc.Model.Blogs;
|
||||
using Yavsc.Model.WorkFlow;
|
||||
using Yavsc.WebControls;
|
||||
using SalesCatalog.XmlImplementation;
|
||||
|
||||
namespace Yavsc.Controllers
|
||||
{
|
||||
@ -47,10 +49,13 @@ namespace Yavsc.Controllers
|
||||
{
|
||||
Assembly[] aslist = {
|
||||
GetType ().Assembly,
|
||||
typeof(BlogsController).Assembly,
|
||||
typeof(ITCPNpgsqlProvider).Assembly,
|
||||
typeof(NpgsqlMembershipProvider).Assembly,
|
||||
typeof(NpgsqlContentProvider).Assembly,
|
||||
typeof(NpgsqlBlogProvider).Assembly
|
||||
typeof(NpgsqlBlogProvider).Assembly,
|
||||
typeof(InputUserName).Assembly,
|
||||
typeof(XmlCatalog).Assembly
|
||||
};
|
||||
|
||||
List <AssemblyName> asnlist = new List<AssemblyName> ();
|
||||
|
@ -1,78 +0,0 @@
|
||||
//
|
||||
// Manager.cs
|
||||
//
|
||||
// Author:
|
||||
// Paul Schneider <paulschneider@free.fr>
|
||||
//
|
||||
// Copyright (c) 2015 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 Yavsc.Helpers;
|
||||
using System.Web.Profile;
|
||||
using Yavsc.Model.Google;
|
||||
using System.Net;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Yavsc.Helpers.Google
|
||||
{
|
||||
/// <summary>
|
||||
/// Google base API client.
|
||||
/// This class implements the identification values for a Google Api,
|
||||
/// and provides some scope values.
|
||||
/// </summary>
|
||||
public class ApiClient
|
||||
{
|
||||
/// <summary>
|
||||
/// The CLIENT Id.
|
||||
/// </summary>
|
||||
public static string CLIENT_ID { get ; set ; }
|
||||
|
||||
/// <summary>
|
||||
/// The CLIENt SECREt
|
||||
/// </summary>
|
||||
public static string CLIENT_SECRET { get ; set ; }
|
||||
|
||||
/// <summary>
|
||||
/// The API KEY.
|
||||
/// </summary>
|
||||
public static string API_KEY { get ; set ; }
|
||||
/* // to use in descendence
|
||||
*
|
||||
protected static string getPeopleUri = "https://www.googleapis.com/plus/v1/people";
|
||||
private static string authUri = "https://accounts.google.com/o/oauth2/auth";
|
||||
*/
|
||||
/// <summary>
|
||||
/// The Map tracks scope .
|
||||
/// </summary>
|
||||
protected static string scopeTracks = "https://www.googleapis.com/auth/tracks";
|
||||
/// <summary>
|
||||
/// The calendar scope.
|
||||
/// </summary>
|
||||
protected static string scopeCalendar = "https://www.googleapis.com/auth/calendar";
|
||||
|
||||
/// <summary>
|
||||
/// The scope openid.
|
||||
/// </summary>
|
||||
protected static string[] scopeOpenid = {
|
||||
"openid",
|
||||
"profile",
|
||||
"email"
|
||||
};
|
||||
}
|
||||
|
||||
}
|
@ -1,134 +0,0 @@
|
||||
//
|
||||
// Calendar.cs
|
||||
//
|
||||
// Author:
|
||||
// Paul Schneider <paulschneider@free.fr>
|
||||
//
|
||||
// Copyright (c) 2015 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 Yavsc.Helpers;
|
||||
using System.Web.Profile;
|
||||
using Yavsc.Model.Google;
|
||||
using System.Net;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using Newtonsoft.Json;
|
||||
using System.Web;
|
||||
using System.Runtime.Serialization.Json;
|
||||
using Yavsc.Model;
|
||||
|
||||
namespace Yavsc.Helpers.Google
|
||||
{
|
||||
/// <summary>
|
||||
/// Google Calendar API client.
|
||||
/// </summary>
|
||||
public class CalendarApi : ApiClient
|
||||
{
|
||||
public CalendarApi(string apiKey)
|
||||
{
|
||||
API_KEY = apiKey;
|
||||
}
|
||||
/// <summary>
|
||||
/// The get cal list URI.
|
||||
/// </summary>
|
||||
protected static string getCalListUri = "https://www.googleapis.com/calendar/v3/users/me/calendarList";
|
||||
/// <summary>
|
||||
/// The get cal entries URI.
|
||||
/// </summary>
|
||||
protected static string getCalEntriesUri = "https://www.googleapis.com/calendar/v3/calendars/{0}/events";
|
||||
|
||||
/// <summary>
|
||||
/// The date format.
|
||||
/// </summary>
|
||||
private static string dateFormat = "yyyy-MM-ddTHH:mm:ss";
|
||||
|
||||
/// <summary>
|
||||
/// The time zone. TODO Fixme with machine time zone
|
||||
/// </summary>
|
||||
private string timeZone = "+01:00";
|
||||
|
||||
/// <summary>
|
||||
/// Gets the calendar list.
|
||||
/// </summary>
|
||||
/// <returns>The calendars.</returns>
|
||||
/// <param name="cred">Cred.</param>
|
||||
public CalendarList GetCalendars (string cred)
|
||||
{
|
||||
CalendarList res = null;
|
||||
HttpWebRequest webreq = WebRequest.CreateHttp (getCalListUri);
|
||||
webreq.Headers.Add (HttpRequestHeader.Authorization, cred);
|
||||
webreq.Method = "GET";
|
||||
webreq.ContentType = "application/http";
|
||||
using (WebResponse resp = webreq.GetResponse ()) {
|
||||
using (Stream respstream = resp.GetResponseStream ()) {
|
||||
res = (CalendarList) new DataContractJsonSerializer(typeof(CalendarList)).ReadObject (respstream);
|
||||
}
|
||||
resp.Close ();
|
||||
}
|
||||
webreq.Abort ();
|
||||
return res;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a calendar.
|
||||
/// </summary>
|
||||
/// <returns>The calendar.</returns>
|
||||
/// <param name="calid">Calid.</param>
|
||||
/// <param name="mindate">Mindate.</param>
|
||||
/// <param name="maxdate">Maxdate.</param>
|
||||
/// <param name="upr">Upr.</param>
|
||||
public CalendarEventList GetCalendar (string calid, DateTime mindate, DateTime maxdate,string cred)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace (calid))
|
||||
throw new Exception ("the calendar identifier is not specified");
|
||||
|
||||
string uri = string.Format (
|
||||
getCalEntriesUri, HttpUtility.UrlEncode (calid)) +
|
||||
string.Format ("?orderBy=startTime&singleEvents=true&timeMin={0}&timeMax={1}&key=" + API_KEY,
|
||||
HttpUtility.UrlEncode (mindate.ToString (dateFormat) + timeZone),
|
||||
HttpUtility.UrlEncode (maxdate.ToString (dateFormat) + timeZone));
|
||||
|
||||
HttpWebRequest webreq = WebRequest.CreateHttp (uri);
|
||||
|
||||
webreq.Headers.Add (HttpRequestHeader.Authorization, cred);
|
||||
webreq.Method = "GET";
|
||||
webreq.ContentType = "application/http";
|
||||
CalendarEventList res = null;
|
||||
try {
|
||||
using (WebResponse resp = webreq.GetResponse ()) {
|
||||
using (Stream respstream = resp.GetResponseStream ()) {
|
||||
try {
|
||||
res = (CalendarEventList) new DataContractJsonSerializer(typeof(CalendarEventList)).ReadObject (respstream);
|
||||
} catch (Exception ) {
|
||||
respstream.Close ();
|
||||
resp.Close ();
|
||||
webreq.Abort ();
|
||||
throw ;
|
||||
}
|
||||
}
|
||||
resp.Close ();
|
||||
}
|
||||
} catch (WebException ) {
|
||||
webreq.Abort ();
|
||||
throw;
|
||||
}
|
||||
webreq.Abort ();
|
||||
return res;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -1,56 +0,0 @@
|
||||
//
|
||||
// Entity.cs
|
||||
//
|
||||
// Author:
|
||||
// Paul Schneider <paulschneider@free.fr>
|
||||
//
|
||||
// Copyright (c) 2015 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 Yavsc.Helpers;
|
||||
using System.Web.Profile;
|
||||
using Yavsc.Model.Google;
|
||||
using System.Net;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Yavsc.Helpers.Google
|
||||
{
|
||||
/// <summary>
|
||||
/// Entity.
|
||||
/// </summary>
|
||||
public class Entity
|
||||
{
|
||||
/// <summary>
|
||||
/// The I.
|
||||
/// </summary>
|
||||
public string ID;
|
||||
/// <summary>
|
||||
/// The name.
|
||||
/// </summary>
|
||||
public string Name;
|
||||
|
||||
/// <summary>
|
||||
/// The type: AUTOMOBILE: A car or passenger vehicle.
|
||||
/// * TRUCK: A truck or cargo vehicle.
|
||||
/// * WATERCRAFT: A boat or other waterborne vehicle.
|
||||
/// * PERSON: A person.
|
||||
/// </summary>
|
||||
public string Type;
|
||||
}
|
||||
|
||||
}
|
@ -1,46 +0,0 @@
|
||||
//
|
||||
// EntityQuery.cs
|
||||
//
|
||||
// Author:
|
||||
// Paul Schneider <paulschneider@free.fr>
|
||||
//
|
||||
// Copyright (c) 2015 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 Yavsc.Helpers;
|
||||
using System.Web.Profile;
|
||||
using Yavsc.Model.Google;
|
||||
using System.Net;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Yavsc.Helpers.Google
|
||||
{
|
||||
/// <summary>
|
||||
/// Entity query.
|
||||
/// </summary>
|
||||
public class EntityQuery {
|
||||
/// <summary>
|
||||
/// The entity identifiers.
|
||||
/// </summary>
|
||||
public string [] EntityIds;
|
||||
/// <summary>
|
||||
/// The minimum identifier.
|
||||
/// </summary>
|
||||
public string MinId;
|
||||
}
|
||||
}
|
@ -1,137 +0,0 @@
|
||||
//
|
||||
// GoogleHelpers.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.Google;
|
||||
using System.Web.Profile;
|
||||
using System.Configuration;
|
||||
using System.Web;
|
||||
using Yavsc.Model.Calendar;
|
||||
using Yavsc.Model.Circles;
|
||||
using System.Collections.Generic;
|
||||
using System.Web.Security;
|
||||
|
||||
namespace Yavsc.Helpers.Google
|
||||
{
|
||||
/// <summary>
|
||||
/// Google helpers.
|
||||
/// </summary>
|
||||
public static class GoogleHelpers
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the events.
|
||||
/// </summary>
|
||||
/// <returns>The events.</returns>
|
||||
/// <param name="profile">Profile.</param>
|
||||
/// <param name="mindate">Mindate.</param>
|
||||
/// <param name="maxdate">Maxdate.</param>
|
||||
public static CalendarEventList GetEvents(this ProfileBase profile, DateTime mindate, DateTime maxdate)
|
||||
{
|
||||
string gcalid = (string) profile.GetPropertyValue ("gcalid");
|
||||
if (string.IsNullOrWhiteSpace (gcalid))
|
||||
throw new ArgumentException ("NULL gcalid");
|
||||
CalendarApi c = new CalendarApi (clientApiKey);
|
||||
string creds = OAuth2.GetFreshGoogleCredential (profile);
|
||||
return c.GetCalendar (gcalid, mindate, maxdate, creds);
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets the calendars.
|
||||
/// </summary>
|
||||
/// <returns>The calendars.</returns>
|
||||
/// <param name="profile">Profile.</param>
|
||||
public static CalendarList GetCalendars (this ProfileBase profile)
|
||||
{
|
||||
string cred = OAuth2.GetFreshGoogleCredential (profile);
|
||||
CalendarApi c = new CalendarApi (clientApiKey);
|
||||
return c.GetCalendars (cred);
|
||||
}
|
||||
|
||||
private static string clientId = ConfigurationManager.AppSettings ["GOOGLE_CLIENT_ID"];
|
||||
private static string clientSecret = ConfigurationManager.AppSettings ["GOOGLE_CLIENT_SECRET"];
|
||||
private static string clientApiKey = ConfigurationManager.AppSettings ["GOOGLE_API_KEY"];
|
||||
/// <summary>
|
||||
/// Login the specified response, state and callBack.
|
||||
/// </summary>
|
||||
/// <param name="response">Response.</param>
|
||||
/// <param name="state">State.</param>
|
||||
/// <param name="callBack">Call back.</param>
|
||||
public static void Login(this HttpResponseBase response, string state, string callBack)
|
||||
{
|
||||
OAuth2 oa = new OAuth2 (callBack, clientId,clientSecret);
|
||||
oa.Login (response, state);
|
||||
}
|
||||
/// <summary>
|
||||
/// Cals the login.
|
||||
/// </summary>
|
||||
/// <param name="response">Response.</param>
|
||||
/// <param name="state">State.</param>
|
||||
/// <param name="callBack">Call back.</param>
|
||||
public static void CalLogin(this HttpResponseBase response, string state, string callBack)
|
||||
{
|
||||
OAuth2 oa = new OAuth2 (callBack,clientId,clientSecret);
|
||||
oa.GetCalendarScope (response, state);
|
||||
}
|
||||
/// <summary>
|
||||
/// Creates the O auth2.
|
||||
/// </summary>
|
||||
/// <returns>The O auth2.</returns>
|
||||
/// <param name="callBack">Call back.</param>
|
||||
public static OAuth2 CreateOAuth2(string callBack)
|
||||
{
|
||||
return new OAuth2 (callBack,clientId,clientSecret);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Notifies the event.
|
||||
/// </summary>
|
||||
/// <returns>The event.</returns>
|
||||
/// <param name="evpub">Evpub.</param>
|
||||
public static MessageWithPayloadResponse NotifyEvent(EventPub evpub) {
|
||||
using (SimpleJsonPostMethod<MessageWithPayload<YaEvent>,MessageWithPayloadResponse> r =
|
||||
new SimpleJsonPostMethod<MessageWithPayload<YaEvent>,MessageWithPayloadResponse>(
|
||||
"https://gcm-http.googleapis.com/gcm/send")) {
|
||||
var users = Circle.Union (evpub.CircleIds);
|
||||
var regids = new List<string> ();
|
||||
var to = new List<string> ();
|
||||
foreach (var u in users) {
|
||||
var p = ProfileBase.Create (u);
|
||||
if (p != null) {
|
||||
var regid = p.GetPropertyValue("gregid");
|
||||
if (regid == null) {
|
||||
var muser = Membership.GetUser (u);
|
||||
to.Add (muser.Email);
|
||||
}
|
||||
else regids.Add ((string)regid);
|
||||
}
|
||||
}
|
||||
if (regids.Count == 0)
|
||||
throw new InvalidOperationException
|
||||
("No recipient where found for this circle list");
|
||||
|
||||
var msg = new MessageWithPayload<YaEvent> () {
|
||||
notification = new Notification() { title = evpub.Title, body = evpub.Description, icon = "event" },
|
||||
data = new YaEvent[] { (YaEvent)evpub }, registration_ids = regids.ToArray() };
|
||||
return r.Invoke (msg);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,81 +0,0 @@
|
||||
//
|
||||
// Google.cs
|
||||
//
|
||||
// Author:
|
||||
// Paul Schneider <paulschneider@free.fr>
|
||||
//
|
||||
// Copyright (c) 2015 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 Yavsc.Helpers;
|
||||
using System.Web.Profile;
|
||||
using Yavsc.Model.Google;
|
||||
using System.Net;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Yavsc.Helpers.Google
|
||||
{
|
||||
/// <summary>
|
||||
/// Google Map tracks Api client.
|
||||
/// </summary>
|
||||
public class MapTracks:ApiClient {
|
||||
|
||||
/// <summary>
|
||||
/// The google map tracks path (uri of the service).
|
||||
/// </summary>
|
||||
protected static string googleMapTracksPath = "https://www.googleapis.com/tracks/v1/";
|
||||
// entities/[create|list|delete]
|
||||
// collections/[list|create|[add|remove]entities|delete]
|
||||
// crumbs/[record|getrecent|gethistory|report|summarize|getlocationinfo|delete
|
||||
|
||||
|
||||
// entities/[create|list|delete]
|
||||
// collections/[list|create|[add|remove]entities|delete]
|
||||
// crumbs/[record|getrecent|gethistory|report|summarize|getlocationinfo|delete
|
||||
|
||||
/// <summary>
|
||||
/// Creates the entity.
|
||||
/// </summary>
|
||||
/// <returns>The entity.</returns>
|
||||
/// <param name="entities">Entities.</param>
|
||||
public static string [] CreateEntity( Entity[] entities ) {
|
||||
string [] ans = null;
|
||||
using (SimpleJsonPostMethod< Entity[] ,string []> wr =
|
||||
new SimpleJsonPostMethod< Entity[] ,string[]> (googleMapTracksPath + "entities/create"))
|
||||
{
|
||||
ans = wr.Invoke (entities);
|
||||
}
|
||||
return ans;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Lists the entities.
|
||||
/// </summary>
|
||||
/// <returns>The entities.</returns>
|
||||
/// <param name="eq">Eq.</param>
|
||||
static Entity[] ListEntities (EntityQuery eq)
|
||||
{
|
||||
Entity [] ans = null;
|
||||
using (SimpleJsonPostMethod<EntityQuery,Entity[]> wr =
|
||||
new SimpleJsonPostMethod<EntityQuery,Entity[]> (googleMapTracksPath + "entities/create"))
|
||||
{
|
||||
ans = wr.Invoke (eq);
|
||||
}
|
||||
return ans;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,252 +0,0 @@
|
||||
//
|
||||
// OAuth2.cs
|
||||
//
|
||||
// Author:
|
||||
// Paul Schneider <paulschneider@free.fr>
|
||||
//
|
||||
// Copyright (c) 2015 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.IO;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using Newtonsoft.Json;
|
||||
using Yavsc.Model.Google;
|
||||
using System.Web.Profile;
|
||||
using System.Web;
|
||||
using Yavsc.Model;
|
||||
using System.Runtime.Serialization.Json;
|
||||
using Yavsc.Helpers.Google;
|
||||
|
||||
namespace Yavsc.Helpers.Google
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Google O auth2 client.
|
||||
/// </summary>
|
||||
public class OAuth2 : ApiClient
|
||||
{
|
||||
/// <summary>
|
||||
/// The URI used to get tokens.
|
||||
/// </summary>
|
||||
protected static string tokenUri = "https://accounts.google.com/o/oauth2/token";
|
||||
|
||||
/// <summary>
|
||||
/// The URI used to get authorized to.
|
||||
/// </summary>
|
||||
protected static string authUri = "https://accounts.google.com/o/oauth2/auth";
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the redirect URI sent to Google.
|
||||
/// </summary>
|
||||
/// <value>The redirect URI.</value>
|
||||
public string RedirectUri { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Yavsc.Helpers.Google.OAuth2"/> class.
|
||||
/// </summary>
|
||||
/// <param name="redirectUri">Redirect URI.</param>
|
||||
/// <param name="clientId">Client identifier.</param>
|
||||
/// <param name="clientSecret">Client secret.</param>
|
||||
public OAuth2 (string redirectUri, string clientId, string clientSecret)
|
||||
{
|
||||
RedirectUri = redirectUri;
|
||||
CLIENT_ID = clientId;
|
||||
CLIENT_SECRET = clientSecret;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Login with Google
|
||||
/// by redirecting the specified http web response bresp,
|
||||
/// and using the specified session state.
|
||||
/// </summary>
|
||||
/// <param name="bresp">Bresp.</param>
|
||||
/// <param name="state">State.</param>
|
||||
public void Login (HttpResponseBase bresp, string state)
|
||||
{
|
||||
string scope = string.Join ("%20", scopeOpenid);
|
||||
|
||||
string prms = String.Format ("response_type=code&client_id={0}&redirect_uri={1}&scope={2}&state={3}&include_granted_scopes=false&approval_prompt=force",
|
||||
CLIENT_ID, RedirectUri, scope, state);
|
||||
GetAuthResponse (bresp, prms);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the cal authorization.
|
||||
/// </summary>
|
||||
/// <param name="bresp">Bresp.</param>
|
||||
/// <param name="state">State.</param>
|
||||
public void GetCalendarScope (HttpResponseBase bresp, string state)
|
||||
{
|
||||
string prms = String.Format ("response_type=code&client_id={0}&redirect_uri={1}&scope={2}&state={3}&include_granted_scopes=true&access_type=offline&approval_prompt=force",
|
||||
CLIENT_ID, RedirectUri, scopeCalendar, state);
|
||||
GetAuthResponse (bresp, prms);
|
||||
}
|
||||
|
||||
private void GetAuthResponse (HttpResponseBase bresp, string prms)
|
||||
{
|
||||
string cont = null;
|
||||
WebRequest wr = WebRequest.Create (authUri + "?" + prms);
|
||||
wr.Method = "GET";
|
||||
using (WebResponse response = wr.GetResponse ()) {
|
||||
string resQuery = response.ResponseUri.Query;
|
||||
cont = HttpUtility.ParseQueryString (resQuery) ["continue"];
|
||||
response.Close ();
|
||||
}
|
||||
wr.Abort ();
|
||||
bresp.Redirect (cont);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Builds the post data, from code given
|
||||
/// by Google in the request parameters,
|
||||
/// and using the given <c>redirectUri</c>.
|
||||
/// This request body is used to get a new
|
||||
/// OAuth2 token from Google, it is Url encoded.
|
||||
/// </summary>
|
||||
/// <returns>The post data from code.</returns>
|
||||
/// <param name="redirectUri">Redirect URI.</param>
|
||||
/// <param name="code">Code.</param>
|
||||
public static string TokenPostDataFromCode (string redirectUri, string code)
|
||||
{
|
||||
string postdata =
|
||||
string.Format (
|
||||
"redirect_uri={0}&client_id={1}&client_secret={2}&code={3}&grant_type=authorization_code",
|
||||
HttpUtility.UrlEncode (redirectUri),
|
||||
HttpUtility.UrlEncode (CLIENT_ID),
|
||||
HttpUtility.UrlEncode (CLIENT_SECRET),
|
||||
HttpUtility.UrlEncode (code));
|
||||
return postdata;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the Google Authorization token.
|
||||
/// </summary>
|
||||
/// <returns>The token.</returns>
|
||||
/// <param name="rq">Rq.</param>
|
||||
/// <param name="state">State.</param>
|
||||
/// <param name="message">Message.</param>
|
||||
public AuthToken GetToken (HttpRequestBase rq, string state, out string message)
|
||||
{
|
||||
string code = OAuth2.GetCodeFromRequest (rq, state, out message);
|
||||
string postdata = OAuth2.TokenPostDataFromCode (RedirectUri, code);
|
||||
return GetTokenPosting (postdata);
|
||||
}
|
||||
|
||||
internal static AuthToken GetTokenPosting (string postdata)
|
||||
{
|
||||
HttpWebRequest webreq = WebRequest.CreateHttp (tokenUri);
|
||||
webreq.Method = "POST";
|
||||
webreq.Accept = "application/json";
|
||||
webreq.ContentType = "application/x-www-form-urlencoded";
|
||||
Byte[] bytes = System.Text.Encoding.UTF8.GetBytes (postdata);
|
||||
webreq.ContentLength = bytes.Length;
|
||||
|
||||
using (Stream dataStream = webreq.GetRequestStream ()) {
|
||||
dataStream.Write (bytes, 0, bytes.Length);
|
||||
dataStream.Close ();
|
||||
}
|
||||
|
||||
AuthToken gat = null;
|
||||
using (WebResponse response = webreq.GetResponse ()) {
|
||||
using (Stream responseStream = response.GetResponseStream ()) {
|
||||
gat = (AuthToken)new DataContractJsonSerializer (typeof(AuthToken)).ReadObject (responseStream);
|
||||
responseStream.Close ();
|
||||
}
|
||||
response.Close ();
|
||||
}
|
||||
webreq.Abort ();
|
||||
return gat;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the code from the Google request.
|
||||
/// </summary>
|
||||
/// <returns>The code from request.</returns>
|
||||
/// <param name="rq">Rq.</param>
|
||||
/// <param name="state">State.</param>
|
||||
/// <param name="message">Message.</param>
|
||||
public static string GetCodeFromRequest (HttpRequestBase rq, string state, out string message)
|
||||
{
|
||||
message = "";
|
||||
string code = rq.Params ["code"];
|
||||
string error = rq.Params ["error"];
|
||||
if (error != null) {
|
||||
message =
|
||||
string.Format (LocalizedText.Google_error,
|
||||
LocalizedText.ResourceManager.GetString (error));
|
||||
return null;
|
||||
}
|
||||
string rqstate = rq.Params ["state"];
|
||||
if (state != null && string.Compare (rqstate, state) != 0) {
|
||||
message =
|
||||
LocalizedText.ResourceManager.GetString ("invalid request state");
|
||||
return null;
|
||||
}
|
||||
return code;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invalid O auth2 refresh token.
|
||||
/// </summary>
|
||||
public class InvalidOAuth2RefreshToken: Exception
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Yavsc.Helpers.Google.OAuth2.InvalidOAuth2RefreshToken"/> class.
|
||||
/// </summary>
|
||||
/// <param name="message">Message.</param>
|
||||
public InvalidOAuth2RefreshToken(string message):base(message)
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Yavsc.Helpers.Google.OAuth2.InvalidOAuth2RefreshToken"/> class.
|
||||
/// </summary>
|
||||
/// <param name="message">Message.</param>
|
||||
/// <param name="innerException">Inner exception.</param>
|
||||
public InvalidOAuth2RefreshToken(string message,Exception innerException):base(message,innerException)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets fresh google credential.
|
||||
/// </summary>
|
||||
/// <returns>The fresh google credential.</returns>
|
||||
/// <param name="pr">Pr.</param>
|
||||
public static string GetFreshGoogleCredential (ProfileBase pr)
|
||||
{
|
||||
string token = (string)pr.GetPropertyValue ("gtoken");
|
||||
string token_type = (string) pr.GetPropertyValue ("gtokentype");
|
||||
DateTime token_exp = (DateTime) pr.GetPropertyValue ("gtokenexpir");
|
||||
if (token_exp < DateTime.Now) {
|
||||
object ort = pr.GetPropertyValue ("grefreshtoken");
|
||||
if (ort is DBNull || string.IsNullOrWhiteSpace((string)ort)) {
|
||||
throw new InvalidOAuth2RefreshToken ("Google");
|
||||
}
|
||||
string refresh_token = ort as string;
|
||||
AuthToken gat = OAuth2.GetTokenPosting (
|
||||
string.Format ("grant_type=refresh_token&client_id={0}&client_secret={1}&refresh_token={2}",
|
||||
CLIENT_ID, CLIENT_SECRET, refresh_token));
|
||||
token = gat.access_token;
|
||||
pr.SetPropertyValue ("gtoken", token);
|
||||
pr.Save ();
|
||||
// ASSERT gat.token_type == pr.GetPropertyValue("gtokentype")
|
||||
}
|
||||
return token_type + " " + token;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,68 +0,0 @@
|
||||
//
|
||||
// PeopleApi.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.IO;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using Newtonsoft.Json;
|
||||
using Yavsc.Model.Google;
|
||||
using System.Web.Profile;
|
||||
using System.Web;
|
||||
using Yavsc.Model;
|
||||
using System.Runtime.Serialization.Json;
|
||||
using Yavsc.Helpers.Google;
|
||||
|
||||
namespace Yavsc.Helpers.Google
|
||||
{
|
||||
/// <summary>
|
||||
/// Google People API.
|
||||
/// </summary>
|
||||
public class PeopleApi: ApiClient
|
||||
{
|
||||
private static string getPeopleUri = "https://www.googleapis.com/plus/v1/people";
|
||||
|
||||
/// <summary>
|
||||
/// Gets the People object associated to the given Google Access Token
|
||||
/// </summary>
|
||||
/// <returns>The me.</returns>
|
||||
/// <param name="gat">The Google Access Token object <see cref="AuthToken"/> class.</param>
|
||||
public static People GetMe (AuthToken gat)
|
||||
{
|
||||
People me;
|
||||
DataContractJsonSerializer ppser = new DataContractJsonSerializer (typeof(People));
|
||||
HttpWebRequest webreppro = WebRequest.CreateHttp (getPeopleUri + "/me");
|
||||
webreppro.ContentType = "application/http";
|
||||
webreppro.Headers.Add (HttpRequestHeader.Authorization, gat.token_type + " " + gat.access_token);
|
||||
webreppro.Method = "GET";
|
||||
using (WebResponse proresp = webreppro.GetResponse ()) {
|
||||
using (Stream prresponseStream = proresp.GetResponseStream ()) {
|
||||
me = (People)ppser.ReadObject (prresponseStream);
|
||||
prresponseStream.Close ();
|
||||
}
|
||||
proresp.Close ();
|
||||
}
|
||||
webreppro.Abort ();
|
||||
return me;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,108 +0,0 @@
|
||||
//
|
||||
// PostJson.cs
|
||||
//
|
||||
// Author:
|
||||
// Paul Schneider <paulschneider@free.fr>
|
||||
//
|
||||
// Copyright (c) 2015 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.Net;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization.Json;
|
||||
|
||||
namespace Yavsc.Helpers
|
||||
{
|
||||
/// <summary>
|
||||
/// Simple json post method.
|
||||
/// </summary>
|
||||
public class SimpleJsonPostMethod<TQuery,TAnswer>: IDisposable
|
||||
{
|
||||
internal HttpWebRequest request = null;
|
||||
internal HttpWebRequest Request { get { return request; } }
|
||||
|
||||
string CharSet {
|
||||
get { return Request.TransferEncoding; }
|
||||
set { Request.TransferEncoding=value;}
|
||||
}
|
||||
string Method { get { return Request.Method; } }
|
||||
/// <summary>
|
||||
/// Gets the path.
|
||||
/// </summary>
|
||||
/// <value>The path.</value>
|
||||
public string Path {
|
||||
get{ return Request.RequestUri.ToString(); }
|
||||
}
|
||||
/// <summary>
|
||||
/// Sets the credential.
|
||||
/// </summary>
|
||||
/// <param name="cred">Cred.</param>
|
||||
public void SetCredential(string cred) {
|
||||
Request.Headers.Set(HttpRequestHeader.Authorization,cred);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the Yavsc.Helpers.SimpleJsonPostMethod class.
|
||||
/// </summary>
|
||||
/// <param name="pathToMethod">Path to method.</param>
|
||||
public SimpleJsonPostMethod (string pathToMethod)
|
||||
{
|
||||
// ASSERT Request == null
|
||||
request = WebRequest.CreateHttp (pathToMethod);
|
||||
|
||||
Request.Method = "POST";
|
||||
Request.Accept = "application/json";
|
||||
Request.ContentType = "application/json";
|
||||
Request.SendChunked = true;
|
||||
Request.TransferEncoding = "UTF-8";
|
||||
}
|
||||
/// <summary>
|
||||
/// Invoke the specified query.
|
||||
/// </summary>
|
||||
/// <param name="query">Query.</param>
|
||||
public TAnswer Invoke(TQuery query)
|
||||
{
|
||||
|
||||
DataContractJsonSerializer serquery = new DataContractJsonSerializer (typeof(TQuery));
|
||||
DataContractJsonSerializer seransw = new DataContractJsonSerializer (typeof(TAnswer));
|
||||
|
||||
using (MemoryStream streamQuery = new MemoryStream ()) {
|
||||
serquery.WriteObject (streamQuery, query);
|
||||
}
|
||||
|
||||
TAnswer ans = default (TAnswer);
|
||||
using (WebResponse response = Request.GetResponse ()) {
|
||||
using (Stream responseStream = response.GetResponseStream ()) {
|
||||
ans = (TAnswer) seransw.ReadObject(responseStream);
|
||||
}
|
||||
response.Close();
|
||||
}
|
||||
return ans;
|
||||
}
|
||||
|
||||
#region IDisposable implementation
|
||||
|
||||
/// <summary>
|
||||
/// Releases all resource used by the Yavsc.Helpers.SimpleJsonPostMethod object.
|
||||
/// </summary>
|
||||
public void Dispose ()
|
||||
{
|
||||
if (Request != null) Request.Abort ();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -33,10 +33,10 @@ namespace Yavsc.Helpers
|
||||
/// </summary>
|
||||
/// <param name="helper">Helper.</param>
|
||||
/// <param name="text">Text.</param>
|
||||
public static IHtmlString Translate(this HtmlHelper helper, string text)
|
||||
public static IHtmlString Translate(this HtmlHelper helper, object text)
|
||||
{
|
||||
// Just call the other one, to avoid having two copies (we don't use the HtmlHelper).
|
||||
return new MvcHtmlString(helper.Encode(GetString(text)));
|
||||
return new MvcHtmlString(helper.Encode(GetString((string)text)));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -22,6 +22,9 @@ using System;
|
||||
using System.Web.Mvc;
|
||||
using System.Collections.Generic;
|
||||
using Yavsc.Model.Messaging;
|
||||
using System.Runtime.Serialization.Json;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
namespace Yavsc.Helpers
|
||||
{
|
||||
@ -61,10 +64,36 @@ namespace Yavsc.Helpers
|
||||
return "\"" + tmpstr + "\"";
|
||||
return "'" + tmpstr + "'";
|
||||
}
|
||||
|
||||
public static string JString(this AjaxHelper helper, object str)
|
||||
/// <summary>
|
||||
/// Js the son string.
|
||||
/// </summary>
|
||||
/// <returns>The son string.</returns>
|
||||
/// <param name="helper">Helper.</param>
|
||||
/// <param name="obj">Object.</param>
|
||||
public static string JSonString(this AjaxHelper helper, object obj)
|
||||
{
|
||||
return QuoteJavascriptString (str);
|
||||
string result = null;
|
||||
DataContractJsonSerializer ser = new DataContractJsonSerializer (obj.GetType());
|
||||
var e = Encoding.UTF8;
|
||||
using (MemoryStream streamQuery = new MemoryStream ()) {
|
||||
ser.WriteObject (streamQuery, obj);
|
||||
streamQuery.Seek (0, SeekOrigin.Begin);
|
||||
using (StreamReader sr = new StreamReader (streamQuery)) {
|
||||
result = sr.ReadToEnd ();
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Js the string.
|
||||
/// </summary>
|
||||
/// <returns>The string.</returns>
|
||||
/// <param name="helper">Helper.</param>
|
||||
/// <param name="text">Text.</param>
|
||||
public static string JString(this AjaxHelper helper, object text)
|
||||
{
|
||||
return QuoteJavascriptString ((string)text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ Page.StyleSheetTheme = (string) Profile.UITheme; %>
|
||||
<script type="text/javascript">
|
||||
var apiBaseUrl = '<%=Url.Content(Yavsc.WebApiConfig.UrlPrefixRelative)%>';
|
||||
$(document).ready(function(){
|
||||
$('[data-type="rate-bill"]').rate({target: 'Blogs/Rate'});
|
||||
$('[data-type="rate-bill"]').rate({webTarget: 'Blogs/Rate'});
|
||||
});
|
||||
</script>
|
||||
<%=Ajax.GlobalizationScript()%>
|
||||
|
@ -85,7 +85,7 @@ $(document).ready(function(){
|
||||
if ($stwidth>320 && $stheight>320) {
|
||||
window.addEventListener('deviceorientation', function(event) {
|
||||
tiltLR = $stwidth*Math.sin(event.gamma*Math.PI/180);
|
||||
titleFB = $stheight*Math.sin(event.beta*Math.PI/180);
|
||||
titleFB = $stheight*Math.sin(event.beta*Math.PI/90);
|
||||
onPos($bgobj,tiltLR,titleFB);
|
||||
},false); }
|
||||
$(window).mousemove(function(e) {
|
||||
|
@ -2,11 +2,16 @@
|
||||
(function(jQuery) {
|
||||
return jQuery.widget('Yavsc.rate', {
|
||||
options: {
|
||||
target: null,
|
||||
webTarget: null,
|
||||
jsTarget: null,
|
||||
disabled: false
|
||||
},
|
||||
sendRate: function (rating,callback) {
|
||||
Yavsc.ajax(this.options.target+'/Rate', rating, callback);
|
||||
if (this.options.webTarget)
|
||||
Yavsc.ajax(this.options.webTarget+'/Rate', rating, callback);
|
||||
if (this.options.jsTarget)
|
||||
if (this.options.jsTarget(rating))
|
||||
if (callback) callback();
|
||||
},
|
||||
_create: function() {
|
||||
var $ratectl = $(this.element);
|
||||
|
@ -11,9 +11,12 @@
|
||||
<aside class="control">
|
||||
<form method="post" action="DeclareActivity">
|
||||
<fieldset>
|
||||
<input type="text" name="meacode" id="meacode" >
|
||||
<input type="text" name="activityname" id="activityname" >
|
||||
<input type="text" name="comment" id="comment" >
|
||||
<%= Html.Translate("MEACode")%>:
|
||||
<input type="text" name="meacode" id="meacode" ><br>
|
||||
<%= Html.Translate("Title")%>:
|
||||
<input type="text" name="activityname" id="activityname" ><br>
|
||||
<%= Html.Translate("Comment")%>:
|
||||
<textarea name="comment" id="comment" class="fullwidth" ></textarea><br>
|
||||
<input type="button" value="Créer l'activité" id="btncreate" >
|
||||
</fieldset>
|
||||
</form>
|
||||
|
@ -1,9 +1,10 @@
|
||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Activity>" %>
|
||||
|
||||
<h1 class="activity">
|
||||
<%=Html.Icon("act"+Model.Id)%>
|
||||
<%=Html.Markdown(Model.Title)%></h1>
|
||||
<i>(<%=Html.Markdown(Model.Id)%>)</i>
|
||||
<div>
|
||||
<div data-type="background" data-speed="10" style="width:100%; height:10em; background: url(<%=Ajax.JString(Model.Photo)%>) 50% 50% repeat fixed;" >
|
||||
</div>
|
||||
<h1><a href="<%= Url.RouteUrl("Default", new { controller="FrontOffice", action="Booking", id=Model.Id }) %>">
|
||||
<%=Html.Encode(Model.Title)%></a></h1>
|
||||
<i>(<%=Html.Translate("MEACode")%>: <%=Html.Encode(Model.Id)%>)</i>
|
||||
<p>
|
||||
<%=Html.Markdown(Model.Comment)%>
|
||||
</p>
|
||||
</p></div>
|
||||
|
@ -1,4 +1,19 @@
|
||||
<%@ Page Title="Booking" Language="C#" MasterPageFile="~/Models/App.master" Inherits="System.Web.Mvc.ViewPage<SimpleBookingQuery>" %>
|
||||
|
||||
<asp:Content ContentPlaceHolderID="init" ID="init1" runat="server">
|
||||
<% Title = Html.Translate("BookingTitle"+Model.MEACode) + " - " + YavscHelpers.SiteName; %>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ContentPlaceHolderID="overHeaderOne" ID="header1" runat="server">
|
||||
<h1>
|
||||
<a href="<%=Url.RouteUrl("FrontOffice",new {action="Booking", MEACode=Model.MEACode })%>">
|
||||
<img href="<%= ViewData["Photo"] %>" alt="">
|
||||
<%=Html.Translate("BookingTitle"+Model.MEACode)%>
|
||||
</a>
|
||||
- <a href="<%= Url.RouteUrl("Default",new {controller="Home" }) %>"><%= YavscHelpers.SiteName %></a>
|
||||
</h1>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ContentPlaceHolderID="head" ID="headContent" runat="server">
|
||||
<link rel="stylesheet" type="text/css" href="/App_Themes/jquery.timepicker.css" />
|
||||
<script type="text/javascript" src="/Scripts/globalize/globalize.js"></script>
|
||||
@ -10,28 +25,39 @@
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
|
||||
<% using ( Html.BeginForm("Booking") ) { %>
|
||||
<%= Html.Hidden("MAECode") %>
|
||||
<% using ( Html.BeginForm( "Booking", "FrontOffice", new { MEACode = Model.MEACode }) ) { %>
|
||||
<%= Html.ValidationSummary() %>
|
||||
<%= Html.Hidden("MEACode") %>
|
||||
<fieldset>
|
||||
<legend>Préferences musicales</legend>
|
||||
<%= Html.LabelFor(model=>model.Needs) %>:
|
||||
<legend><%= Html.Translate("YourNeed") %></legend>
|
||||
<input type="hidden" name="Needs" id="Needs" value="">
|
||||
<ul>
|
||||
<% foreach (var need in Model.Needs) { %>
|
||||
<% foreach (var need in (SkillEntity[])(ViewData["Needs"])) { %>
|
||||
<li><%= need.Name %> <%= Html.Partial("RateSkillControl", need)%></li>
|
||||
<% } %>
|
||||
</ul>
|
||||
<%= Html.ValidationMessageFor(model=>model.Needs) %>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>Date de l'événement</legend>
|
||||
<legend><%= Html.Translate("PerformanceDate") %></legend>
|
||||
Intervention souhaitée le
|
||||
<input type="text" id="PreferedDate" name="PreferedDate" class="start date" value="<%=Model.PreferedDate.ToString("yyyy/MM/dd")%>">
|
||||
<%= Html.ValidationMessageFor( model=>model.PreferedDate ) %>
|
||||
</fieldset>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$('[data-type="rate-site-skill"]').rate({target: 'FrontOffice/RateSkill'});
|
||||
var needs = <%= Ajax.JSonString((SkillEntity[])(ViewData["Needs"])) %>;
|
||||
var fneeds = needs.map( function (need) {
|
||||
return need.Id+' '+need.Rate; } );
|
||||
|
||||
fneeds.forEach(function(elt) { console.log(Yavsc.dumpprops(elt)) } );
|
||||
$('#Needs').val(fneeds);
|
||||
$('[data-type="rate-site-skill"]').rate({jsTarget: function (rating)
|
||||
{
|
||||
// console.log(Yavsc.dumpprops(rating));
|
||||
return true;
|
||||
}
|
||||
});
|
||||
var tpconfig = {
|
||||
'timeFormat': 'H:i',
|
||||
'showDuration': true,
|
||||
|
@ -31,10 +31,8 @@ et le
|
||||
<%= Html.ValidationMessageFor(model=>model.EndHour) %>
|
||||
</div>
|
||||
<fieldset>
|
||||
<legend>Intervenant</legend>
|
||||
<%= Html.LabelFor(model=>model.Roles) %>:
|
||||
<%= Html.TextBoxFor(model=>model.Roles) %>
|
||||
<%= Html.ValidationMessageFor(model=>model.Roles) %>
|
||||
<legend>Services concernés</legend>
|
||||
<%= Html.ListBox("MEACodes") %>
|
||||
</fieldset>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
|
@ -9,7 +9,7 @@
|
||||
<%= Html.LabelFor(model => model.Location) %>: <%=Model.Location%> <br/>
|
||||
<%= Html.LabelFor(model => model.StartDate) %>: <%=Model.StartDate%> <br/>
|
||||
<%= Html.LabelFor(model => model.EndDate) %>: <%=Model.EndDate%> <br/>
|
||||
<%= Html.LabelFor(model => model.Circles) %>: <%=Model.Circles%> <br/>
|
||||
<%= Html.LabelFor(model => model.CircleIds) %>: <%=Model.CircleIds%> <br/>
|
||||
<%= Html.LabelFor(model => model.EventWebPage) %>: <%=Model.EventWebPage%> <br/>
|
||||
<%= Html.LabelFor(model => model.ProviderName) %>: <%=Model.ProviderName%> <br/>
|
||||
<%= Html.LabelFor(model => model.Comment) %>: <%=Model.Comment%> <br/>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<script src="<%=Url.Content("~/Scripts/yavsc.skills.js")%>"></script>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$('[data-type="rate-site-skill"]').rate({target: 'Skill/RateSkill'});
|
||||
$('[data-type="rate-site-skill"]').rate({webTarget: 'Skill/RateSkill'});
|
||||
});
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<script src="<%=Url.Content("~/Scripts/yavsc.skills.js")%>"></script>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$('[data-type="rate-user-skill"]').rate({target: 'Skill/RateUserSkill'});
|
||||
$('[data-type="rate-user-skill"]').rate({webTarget: 'Skill/RateUserSkill'});
|
||||
});
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
@ -10,16 +10,8 @@
|
||||
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
|
||||
<div id="activities">
|
||||
<% foreach (var a in ((Activity[])(ViewData["Activities"]))) { %>
|
||||
<div>
|
||||
<div data-type="background" data-speed="10" style="width:100%; height:10em; background: url(<%=Ajax.JString(a.Photo)%>) 50% 50% repeat fixed;" >
|
||||
</div>
|
||||
<h1><a href="<%= Url.RouteUrl("Default", new { controller="FrontOffice", action="Booking", id=a.Id }) %>"><%=Html.Encode(a.Title)%></a></h1>
|
||||
<i>(<%=Html.Encode(a.Id)%>)</i>
|
||||
<p>
|
||||
<%=Html.Markdown(a.Comment)%>
|
||||
</p></div>
|
||||
<%= Html.Partial("Activity",a) %>
|
||||
<% } %>
|
||||
</div>
|
||||
<%= Html.Partial("TagPanel",ViewData["Accueil"]) %>
|
||||
</asp:Content>
|
||||
|
||||
|
@ -150,6 +150,7 @@ http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx
|
||||
<add name="gregid" allowAnonymous="true" />
|
||||
<add name="allowcookies" type="System.Boolean" allowAnonymous="true" defaultValue="false" />
|
||||
<add name="UITheme" allowAnonymous="true" defaultValue="dark" />
|
||||
<add name="Rate" type="System.Int32" defaultValue="100" />
|
||||
</properties>
|
||||
</profile>
|
||||
<blog defaultProvider="NpgsqlBlogProvider">
|
||||
|
@ -30,7 +30,6 @@
|
||||
</CustomCommands>
|
||||
<DocumentationFile>bin\Yavsc.xml</DocumentationFile>
|
||||
<Externalconsole>true</Externalconsole>
|
||||
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>none</DebugType>
|
||||
@ -40,13 +39,11 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<DocumentationFile>bin\Yavsc.xml</DocumentationFile>
|
||||
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Lua|AnyCPU' ">
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin</OutputPath>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'TotemPre|AnyCPU' ">
|
||||
<Optimize>false</Optimize>
|
||||
@ -155,7 +152,6 @@
|
||||
<Folder Include="Formatters\" />
|
||||
<Folder Include="htmldoc\" />
|
||||
<Folder Include="Helpers\" />
|
||||
<Folder Include="Helpers\Google\" />
|
||||
<Folder Include="lib\" />
|
||||
<Folder Include="Models\" />
|
||||
<Folder Include="Settings\" />
|
||||
@ -203,16 +199,9 @@
|
||||
<Compile Include="Settings\ModulesConfigurationSection.cs" />
|
||||
<Compile Include="Settings\ModuleConfigurationElementCollection.cs" />
|
||||
<Compile Include="Settings\ModuleConfigurationElement.cs" />
|
||||
<Compile Include="Helpers\SimpleJsonPostMethod.cs" />
|
||||
<Compile Include="Helpers\Google\Entity.cs" />
|
||||
<Compile Include="Helpers\Google\MapTracks.cs" />
|
||||
<Compile Include="Helpers\Google\EntityQuery.cs" />
|
||||
<Compile Include="Helpers\Google\ApiClient.cs" />
|
||||
<Compile Include="Helpers\Google\CalendarApi.cs" />
|
||||
<Compile Include="Formatters\ErrorHtmlFormatter.cs" />
|
||||
<Compile Include="Formatters\RssFeedsFormatter.cs" />
|
||||
<Compile Include="Formatters\TexToPdfFormatter.cs" />
|
||||
<Compile Include="WebApiConfig.cs" />
|
||||
<Compile Include="Formatters\EstimToPdfFormatter.MSAN.cs" />
|
||||
<Compile Include="Helpers\TemplateException.cs" />
|
||||
<Compile Include="Formatters\FormatterException.cs" />
|
||||
@ -228,17 +217,15 @@
|
||||
<Compile Include="Web References\sms.diamondcard.us\Reference.cs">
|
||||
<DependentUpon>Reference.map</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Helpers\Google\OAuth2.cs" />
|
||||
<Compile Include="Helpers\Google\PeopleApi.cs" />
|
||||
<Compile Include="ApiControllers\PaypalController.cs" />
|
||||
<Compile Include="ApiControllers\AuthorizationDenied.cs" />
|
||||
<Compile Include="ApiControllers\YavscController.cs" />
|
||||
<Compile Include="Helpers\YavscAjaxHelper.cs" />
|
||||
<Compile Include="Helpers\Google\GoogleHelpers.cs" />
|
||||
<Compile Include="AuthorizeAttribute.cs" />
|
||||
<Compile Include="ApiControllers\SkillController.cs" />
|
||||
<Compile Include="Controllers\PayPalController.cs" />
|
||||
<Compile Include="ApiControllers\BackOfficeController.cs" />
|
||||
<Compile Include="WebApiConfig.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Web.config" />
|
||||
@ -497,7 +484,6 @@
|
||||
<Content Include="App_Themes\images\Mono-powered.png" />
|
||||
<Content Include="App_Themes\images\noavatar.png" />
|
||||
<Content Include="App_Themes\images\p8-av4.s.jpg" />
|
||||
<Content Include="App_Themes\images\p8-av4.xxs.jpg" />
|
||||
<Content Include="App_Themes\images\pgsql.png" />
|
||||
<Content Include="App_Themes\images\sign-in-with-google.png" />
|
||||
<Content Include="App_Themes\images\sign-in-with-google-s.png" />
|
||||
@ -519,13 +505,10 @@
|
||||
<Content Include="App_Code\Global.asax.cs" />
|
||||
<Content Include="Views\FrontOffice\RateSkillControl.ascx" />
|
||||
<Content Include="Views\FrontOffice\RateUserSkillControl.ascx" />
|
||||
<Content Include="Web.Release.config" />
|
||||
<Content Include="Views\PayPal\Index.aspx" />
|
||||
<Content Include="Views\PayPal\Abort.aspx" />
|
||||
<Content Include="Views\PayPal\Commit.aspx" />
|
||||
<Content Include="Views\PayPal\IPN.aspx" />
|
||||
<Content Include="Web.Debug.config" />
|
||||
<Content Include="Web.Lua.config" />
|
||||
<Content Include="Scripts\yavsc.admin.js" />
|
||||
<Content Include="Views\FrontOffice\RestrictedArea.aspx" />
|
||||
<Content Include="Views\Admin\RestrictedArea.aspx" />
|
||||
@ -534,8 +517,6 @@
|
||||
<Content Include="Views\FileSystem\RestrictedArea.aspx" />
|
||||
<Content Include="Views\BackOffice\RestrictedArea.aspx" />
|
||||
<Content Include="Views\Account\RestrictedArea.aspx" />
|
||||
<Content Include="Web.TotemProd.config" />
|
||||
<Content Include="Web.TotemPre.config" />
|
||||
<Content Include="Views\FrontOffice\Booking.aspx" />
|
||||
<Content Include="Views\FrontOffice\EavyBooking.aspx" />
|
||||
<Content Include="App_Themes\blue\style.tablesorter.css" />
|
||||
@ -544,6 +525,12 @@
|
||||
<Content Include="Views\FrontOffice\Activity.ascx" />
|
||||
<Content Include="Views\BackOffice\NotifyEventResponse.aspx" />
|
||||
<Content Include="Views\BackOffice\NotifyEvent.aspx" />
|
||||
<Content Include="Views\FrontOffice\Performer.ascx" />
|
||||
<Content Include="App_Themes\images\p8-av4.jpg" />
|
||||
<Content Include="App_Themes\images\p8-av4.xs.jpg" />
|
||||
<Content Include="App_Themes\images\p8-av4.l.jpg" />
|
||||
<Content Include="Views\Home\Activity.ascx" />
|
||||
<Content Include="Views\FrontOffice\Performers.aspx" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||
@ -572,11 +559,17 @@
|
||||
</None>
|
||||
<None Include="fonts\fontawesome-webfont.woff2" />
|
||||
<None Include="lib\MarkdownDeep.dll" />
|
||||
<None Include="App_Code\Sql\Skills.sql" />
|
||||
<None Include="WebDeploy.targets" />
|
||||
<None Include="WebTasks.dll" />
|
||||
<None Include="App_Code\Sql\MEA.sql" />
|
||||
<None Include="App_Code\Sql\activity.sql" />
|
||||
<None Include="Web.Debug.config">
|
||||
<Gettext-ScanForTranslations>False</Gettext-ScanForTranslations>
|
||||
</None>
|
||||
<None Include="Web.Lua.config" />
|
||||
<None Include="Web.Release.config" />
|
||||
<None Include="Web.TotemPre.config" />
|
||||
<None Include="Web.TotemProd.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\NpgsqlMRPProviders\NpgsqlMRPProviders.csproj">
|
||||
|
Binary file not shown.
@ -73,7 +73,7 @@ namespace Yavsc.Model.Calendar
|
||||
/// <value>The role.</value>
|
||||
[Required(ErrorMessage= "S'il vous plait, saisissez le ou les types d'intervention souhaité")]
|
||||
[Display(Name="Role",ResourceType=typeof(LocalizedText))]
|
||||
public string [] Roles { get; set; }
|
||||
public string [] MEACodes{ get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,87 @@
|
||||
2015-11-28 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* SkillManager.cs:
|
||||
* Notification.cs:
|
||||
* Notification.cs:
|
||||
* MessageWithPayLoad.cs:
|
||||
* MessageWithPayloadResponse.cs: refabrication
|
||||
|
||||
* BookingQuery.cs: Le booking lourd devient une commande basée
|
||||
sur des activités concernée par l'intervention
|
||||
|
||||
* ChangeLog: nettoyage
|
||||
|
||||
* CatalogProvider.cs: implemente l'interface d'un fournissseur
|
||||
de contenu
|
||||
|
||||
* PerformerProfile.cs: implemente le profile prestataire
|
||||
|
||||
* SimpleBookingQuery.cs: Les besoin sont exprimé sous forme
|
||||
d'un tableau de valeur du parametrage de la commande
|
||||
|
||||
* LocalizedText.resx:
|
||||
* LocalizedText.fr.resx:
|
||||
* LocalizedText.Designer.cs:
|
||||
* LocalizedText.fr.Designer.cs: internationalisation
|
||||
|
||||
* Profile.cs: implemente un accès à l'id d'enregistrement
|
||||
Google GCM
|
||||
|
||||
* SkillEntity.cs: La compétence appartient à un domaine
|
||||
d'activité, on lui associe un et un seul code APE
|
||||
|
||||
* SkillProvider.cs: Fait chercher les compétences à partir
|
||||
d'un code activité
|
||||
|
||||
* IContentProvider.cs: xml doc
|
||||
|
||||
* WorkFlowManager.cs: implemente l'accès à la liste des
|
||||
préstataires
|
||||
de telle activité
|
||||
|
||||
* YavscModel.csproj: refabrications
|
||||
|
||||
2015-11-28 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* YavscModel.csproj:
|
||||
* LocalizedText.resx:
|
||||
* Entity.cs:
|
||||
* OAuth2.cs:
|
||||
* SkillEntity.cs:
|
||||
* SkillManager.cs:
|
||||
* LocalizedText.fr.resx:
|
||||
* SkillProvider.cs:
|
||||
* PeopleApi.cs:
|
||||
* MapTracks.cs:
|
||||
* ApiClient.cs:
|
||||
* Entity.cs:
|
||||
* OAuth2.cs:
|
||||
* SimpleJsonPostMethod.cs:
|
||||
* BookingQuery.cs:
|
||||
* CalendarApi.cs:
|
||||
* LocalizedText.Designer.cs:
|
||||
* Notification.cs:
|
||||
* EntityQuery.cs:
|
||||
* ApiClient.cs:
|
||||
* MapTracks.cs:
|
||||
* PeopleApi.cs:
|
||||
* WorkFlowManager.cs:
|
||||
* GoogleHelpers.cs:
|
||||
* EntityQuery.cs:
|
||||
* LocalizedText.fr.Designer.cs:
|
||||
* IContentProvider.cs:
|
||||
* CalendarApi.cs:
|
||||
* GoogleHelpers.cs:
|
||||
* PerformerProfile.cs:
|
||||
* SimpleBookingQuery.cs:
|
||||
* Notification.cs:
|
||||
* PerformerAvailability.cs:
|
||||
* CatalogProvider.cs:
|
||||
* MessageWithPayLoad.cs:
|
||||
* MessageWithPayloadResponse.cs:
|
||||
|
||||
* Profile.cs: internationalisation
|
||||
|
||||
2015-11-26 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* LocalizedText.resx:
|
||||
|
@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Configuration.Provider;
|
||||
using Yavsc.Model.WorkFlow;
|
||||
|
||||
namespace Yavsc.Model.FrontOffice.Catalog
|
||||
{
|
||||
@ -7,8 +8,274 @@ namespace Yavsc.Model.FrontOffice.Catalog
|
||||
/// Catalog provider.<br/>
|
||||
/// Abstract class, inherited to implement a catalog provider.
|
||||
/// </summary>
|
||||
public abstract class CatalogProvider: ProviderBase
|
||||
public abstract class CatalogProvider: ProviderBase, IContentProvider
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates the estimate.
|
||||
/// </summary>
|
||||
/// <returns>The estimate.</returns>
|
||||
/// <param name="responsible">Responsible.</param>
|
||||
/// <param name="client">Client.</param>
|
||||
/// <param name="title">Title.</param>
|
||||
/// <param name="description">Description.</param>
|
||||
public virtual Estimate CreateEstimate (string responsible, string client, string title, string description)
|
||||
{
|
||||
return WorkFlowManager.CreateEstimate (responsible, client, title, description);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Drops the writting.
|
||||
/// </summary>
|
||||
/// <param name="wrid">Wrid.</param>
|
||||
public virtual void DropWritting (long wrid)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Drops the estimate.
|
||||
/// </summary>
|
||||
/// <param name="estid">Estid.</param>
|
||||
public void DropEstimate (long estid)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Drops the tag writting.
|
||||
/// </summary>
|
||||
/// <param name="wrid">Wrid.</param>
|
||||
/// <param name="tag">Tag.</param>
|
||||
public void DropWrittingTag (long wrid, string tag)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Finds the activity.
|
||||
/// </summary>
|
||||
/// <returns>The activity.</returns>
|
||||
/// <param name="pattern">Pattern.</param>
|
||||
/// <param name="exerted">If set to <c>true</c> exerted.</param>
|
||||
public abstract Activity[] FindActivity (string pattern, bool exerted);
|
||||
|
||||
/// <summary>
|
||||
/// Finds the performer.
|
||||
/// </summary>
|
||||
/// <returns>The performer.</returns>
|
||||
/// <param name="MEACode">MEA code.</param>
|
||||
public abstract PerformerProfile[] FindPerformer (string MEACode);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the activity.
|
||||
/// </summary>
|
||||
/// <returns>The activity.</returns>
|
||||
/// <param name="MEACode">MAE code.</param>
|
||||
public abstract Activity GetActivity (string MEACode);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the writting status changes.
|
||||
/// </summary>
|
||||
/// <returns>The writting statuses.</returns>
|
||||
/// <param name="wrid">Wrid.</param>
|
||||
public StatusChange[] GetWrittingStatuses (long wrid)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the estimate status changes.
|
||||
/// </summary>
|
||||
/// <returns>The estimate statuses.</returns>
|
||||
/// <param name="estid">Estid.</param>
|
||||
public StatusChange[] GetEstimateStatuses (long estid)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the estimates.
|
||||
/// </summary>
|
||||
/// <returns>The estimates.</returns>
|
||||
/// <param name="username">Username.</param>
|
||||
public Estimate[] GetEstimates (string username)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
/// <summary>
|
||||
/// Registers the activity.
|
||||
/// </summary>
|
||||
/// <param name="activityName">Activity name.</param>
|
||||
/// <param name="meacode">Meacode.</param>
|
||||
/// <param name="comment">Comment.</param>
|
||||
public abstract void RegisterActivity (string activityName, string meacode, string comment);
|
||||
/// <summary>
|
||||
/// Gets the estimates.
|
||||
/// </summary>
|
||||
/// <returns>The estimates.</returns>
|
||||
/// <param name="client">Client.</param>
|
||||
/// <param name="responsible">Responsible.</param>
|
||||
public Estimate[] GetEstimates (string client, string responsible)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the commands.
|
||||
/// </summary>
|
||||
/// <returns>The commands.</returns>
|
||||
/// <param name="username">Username.</param>
|
||||
public CommandSet GetCommands (string username)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets the stock status.
|
||||
/// </summary>
|
||||
/// <returns>The stock status.</returns>
|
||||
/// <param name="productReference">Product reference.</param>
|
||||
public StockStatus GetStockStatus (string productReference)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Registers the command.
|
||||
/// </summary>
|
||||
/// <returns>The command id in db.</returns>
|
||||
/// <param name="com">COM.</param>
|
||||
public long RegisterCommand (Command com)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the writting status.
|
||||
/// </summary>
|
||||
/// <param name="wrtid">Wrtid.</param>
|
||||
/// <param name="status">Status.</param>
|
||||
/// <param name="username">Username.</param>
|
||||
public void SetWrittingStatus (long wrtid, int status, string username)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the estimate status.
|
||||
/// </summary>
|
||||
/// <param name="estid">Estid.</param>
|
||||
/// <param name="status">Status.</param>
|
||||
/// <param name="username">Username.</param>
|
||||
public void SetEstimateStatus (long estid, int status, string username)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tags the writting.
|
||||
/// </summary>
|
||||
/// <param name="wrid">Wrid.</param>
|
||||
/// <param name="tag">Tag.</param>
|
||||
public void TagWritting (long wrid, string tag)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates the writting.
|
||||
/// </summary>
|
||||
/// <param name="wr">Wr.</param>
|
||||
public void UpdateWritting (Writting wr)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Write the specified estid, desc, ucost, count and productid.
|
||||
/// </summary>
|
||||
/// <param name="estid">Estid.</param>
|
||||
/// <param name="desc">Desc.</param>
|
||||
/// <param name="ucost">Ucost.</param>
|
||||
/// <param name="count">Count.</param>
|
||||
/// <param name="productid">Productid.</param>
|
||||
public long Write (long estid, string desc, decimal ucost, int count, string productid)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets the different status labels.
|
||||
/// 0 is the starting status. Each status is an integer and the 0-based index
|
||||
/// of a string in this array.
|
||||
/// </summary>
|
||||
/// <value>The status labels.</value>
|
||||
public string[] Statuses {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the final statuses.
|
||||
/// </summary>
|
||||
/// <value>The final statuses.</value>
|
||||
public bool[] FinalStatuses {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the specified id.
|
||||
/// </summary>
|
||||
/// <param name="id">Identifier.</param>
|
||||
public Estimate Get (long id)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update the specified data.
|
||||
/// </summary>
|
||||
/// <param name="data">Data.</param>
|
||||
public void Update (Estimate data)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Releases all resource used by the <see cref="Yavsc.Model.FrontOffice.Catalog.CatalogProvider"/> object.
|
||||
/// </summary>
|
||||
/// <remarks>Call <see cref="Dispose"/> when you are finished using the
|
||||
/// <see cref="Yavsc.Model.FrontOffice.Catalog.CatalogProvider"/>. The <see cref="Dispose"/> method leaves the
|
||||
/// <see cref="Yavsc.Model.FrontOffice.Catalog.CatalogProvider"/> in an unusable state. After calling
|
||||
/// <see cref="Dispose"/>, you must release all references to the
|
||||
/// <see cref="Yavsc.Model.FrontOffice.Catalog.CatalogProvider"/> so the garbage collector can reclaim the memory that
|
||||
/// the <see cref="Yavsc.Model.FrontOffice.Catalog.CatalogProvider"/> was occupying.</remarks>
|
||||
public void Dispose ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Install the model in database using the specified cnx.
|
||||
/// </summary>
|
||||
/// <param name="cnx">Cnx.</param>
|
||||
public void Install (System.Data.IDbConnection cnx)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Uninstall the module data and data model from
|
||||
/// database, using the specified connection.
|
||||
/// </summary>
|
||||
/// <param name="cnx">Cnx.</param>
|
||||
/// <param name="removeConfig">If set to <c>true</c> remove config.</param>
|
||||
public void Uninstall (System.Data.IDbConnection cnx, bool removeConfig)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the catalog.
|
||||
/// </summary>
|
||||
|
@ -28,6 +28,7 @@ using Yavsc.Model;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using Yavsc.Model.Google.Api;
|
||||
|
||||
namespace Yavsc.Model.FrontOffice
|
||||
{
|
||||
@ -48,6 +49,9 @@ namespace Yavsc.Model.FrontOffice
|
||||
/// </summary>
|
||||
/// <value>The identifier.</value>
|
||||
public long Id { get; set; }
|
||||
|
||||
public int Rate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the skills.
|
||||
/// </summary>
|
||||
@ -88,14 +92,19 @@ namespace Yavsc.Model.FrontOffice
|
||||
return yavscCLientProfile;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets or sets the rate.
|
||||
/// </summary>
|
||||
/// <value>The rate.</value>
|
||||
public int Rate {
|
||||
|
||||
public string EMail {
|
||||
get ;
|
||||
set;
|
||||
}
|
||||
|
||||
public string GoogleRegId {
|
||||
get { return YavscClientProfile.GoogleRegId; }
|
||||
}
|
||||
|
||||
public string GoogleCalId {
|
||||
get { return YavscClientProfile.GoogleCalendar; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Determines whether this instance references the specified skillId.
|
||||
/// </summary>
|
||||
@ -116,10 +125,28 @@ namespace Yavsc.Model.FrontOffice
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether this instance has calendar.
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if this instance has calendar; otherwise, <c>false</c>.</returns>
|
||||
public bool HasCalendar ()
|
||||
{
|
||||
return (YavscClientProfile.GoogleCalendar != null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates the availability description object.
|
||||
/// </summary>
|
||||
/// <returns>The availability.</returns>
|
||||
/// <param name="date">Date.</param>
|
||||
/// <param name="available">If set to <c>true</c> available.</param>
|
||||
public PerformerAvailability CreateAvailability(DateTime date, bool available) {
|
||||
PerformerAvailability p = new PerformerAvailability(this,UserName,date,available);
|
||||
p.DateAvailable = available;
|
||||
p.PerformanceDate = date;
|
||||
return p;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -21,13 +21,23 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Yavsc.Model.Skill;
|
||||
using Yavsc.Model.WorkFlow;
|
||||
using System.Linq;
|
||||
|
||||
namespace Yavsc.Model.FrontOffice
|
||||
{
|
||||
/// <summary>
|
||||
/// Simple booking query.
|
||||
/// </summary>
|
||||
public class SimpleBookingQuery: Command
|
||||
{
|
||||
public SimpleBookingQuery ()
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Yavsc.Model.FrontOffice.SimpleBookingQuery"/> class.
|
||||
/// </summary>
|
||||
[Required(ErrorMessageResourceName="MEACode",ErrorMessageResourceType=typeof(LocalizedText))]
|
||||
public string MEACode {
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets or sets the prefered date.
|
||||
@ -38,18 +48,13 @@ namespace Yavsc.Model.FrontOffice
|
||||
[Display(ResourceType=typeof(LocalizedText),Name="PreferedDate")]
|
||||
public DateTime PreferedDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the MAE code.
|
||||
/// </summary>
|
||||
/// <value>The MAE code.</value>
|
||||
public string MAECode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the needs.
|
||||
/// </summary>
|
||||
/// <value>The needs.</value>
|
||||
[Display(ResourceType=typeof(LocalizedText),Name="Needs")]
|
||||
public SkillEntity[] Needs { get; set; }
|
||||
public string[] Needs { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,98 +0,0 @@
|
||||
//
|
||||
// MessageWithPayLoad.cs
|
||||
//
|
||||
// Author:
|
||||
// paul <>
|
||||
//
|
||||
// Copyright (c) 2015 paul
|
||||
//
|
||||
// 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.Web.Mvc;
|
||||
|
||||
namespace Yavsc.Model.Google
|
||||
{
|
||||
// https://gcm-http.googleapis.com/gcm/send
|
||||
/// <summary>
|
||||
/// Message with payload.
|
||||
/// </summary>
|
||||
public class MessageWithPayload<T> {
|
||||
/// <summary>
|
||||
/// To.
|
||||
/// </summary>
|
||||
public string to;
|
||||
/// <summary>
|
||||
/// The registration identifiers.
|
||||
/// </summary>
|
||||
public string [] registration_ids;
|
||||
/// <summary>
|
||||
/// The data.
|
||||
/// </summary>
|
||||
public T[] data ;
|
||||
/// <summary>
|
||||
/// The notification.
|
||||
/// </summary>
|
||||
public Notification notification;
|
||||
/// <summary>
|
||||
/// The collapse key.
|
||||
/// </summary>
|
||||
public string collapse_key; // in order to collapse ...
|
||||
/// <summary>
|
||||
/// The priority.
|
||||
/// </summary>
|
||||
public int priority; // between 0 and 10, 10 is the lowest!
|
||||
/// <summary>
|
||||
/// The content available.
|
||||
/// </summary>
|
||||
public bool content_available;
|
||||
/// <summary>
|
||||
/// The delay while idle.
|
||||
/// </summary>
|
||||
public bool delay_while_idle;
|
||||
/// <summary>
|
||||
/// The time to live.
|
||||
/// </summary>
|
||||
public int time_to_live; // seconds
|
||||
/// <summary>
|
||||
/// The name of the restricted package.
|
||||
/// </summary>
|
||||
public string restricted_package_name;
|
||||
/// <summary>
|
||||
/// The dry run.
|
||||
/// </summary>
|
||||
public bool dry_run;
|
||||
/// <summary>
|
||||
/// Validate the specified modelState.
|
||||
/// </summary>
|
||||
/// <param name="modelState">Model state.</param>
|
||||
public void Validate(ModelStateDictionary modelState) {
|
||||
if (to==null && registration_ids == null) {
|
||||
modelState.AddModelError ("to", "One of \"to\" or \"registration_ids\" parameters must be specified");
|
||||
modelState.AddModelError ("registration_ids", "*");
|
||||
modelState.AddModelError ("to", "*");
|
||||
}
|
||||
if (notification == null && data == null) {
|
||||
modelState.AddModelError ("notification", "At least one of \"notification\" or \"data\" parameters must be specified");
|
||||
modelState.AddModelError ("data", "*");
|
||||
}
|
||||
if (notification != null) {
|
||||
if (notification.icon == null)
|
||||
modelState.AddModelError ("notification.icon", "please, specify an icon resoure name");
|
||||
if (notification.title == null)
|
||||
modelState.AddModelError ("notification.title", "please, specify a title");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,71 +0,0 @@
|
||||
//
|
||||
// MessageWithPayloadResponse.cs
|
||||
//
|
||||
// Author:
|
||||
// paul <paul@pschneider.fr>
|
||||
//
|
||||
// Copyright (c) 2015 paul
|
||||
//
|
||||
// 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;
|
||||
|
||||
namespace Yavsc.Model.Google
|
||||
{
|
||||
// https://gcm-http.googleapis.com/gcm/send
|
||||
|
||||
/// <summary>
|
||||
/// Message with payload response.
|
||||
/// </summary>
|
||||
public class MessageWithPayloadResponse {
|
||||
/// <summary>
|
||||
/// The multicast identifier.
|
||||
/// </summary>
|
||||
public int multicast_id;
|
||||
/// <summary>
|
||||
/// The success count.
|
||||
/// </summary>
|
||||
public int success;
|
||||
/// <summary>
|
||||
/// The failure count.
|
||||
/// </summary>
|
||||
public int failure;
|
||||
/// <summary>
|
||||
/// The canonical identifiers... ?!?
|
||||
/// </summary>
|
||||
public int canonical_ids;
|
||||
/// <summary>
|
||||
/// Detailled result.
|
||||
/// </summary>
|
||||
public class Result {
|
||||
/// <summary>
|
||||
/// The message identifier.
|
||||
/// </summary>
|
||||
public string message_id;
|
||||
/// <summary>
|
||||
/// The registration identifier.
|
||||
/// </summary>
|
||||
public string registration_id;
|
||||
/// <summary>
|
||||
/// The error.
|
||||
/// </summary>
|
||||
public string error;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The results.
|
||||
/// </summary>
|
||||
public Result [] results;
|
||||
}
|
||||
}
|
@ -1,62 +0,0 @@
|
||||
//
|
||||
// Notification.cs
|
||||
//
|
||||
// Author:
|
||||
// paul <>
|
||||
//
|
||||
// Copyright (c) 2015 paul
|
||||
//
|
||||
// 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;
|
||||
|
||||
namespace Yavsc.Model.Google
|
||||
{
|
||||
/// <summary>
|
||||
/// Notification.
|
||||
/// </summary>
|
||||
public class Notification {
|
||||
/// <summary>
|
||||
/// The title.
|
||||
/// </summary>
|
||||
public string title;
|
||||
/// <summary>
|
||||
/// The body.
|
||||
/// </summary>
|
||||
public string body;
|
||||
/// <summary>
|
||||
/// The icon.
|
||||
/// </summary>
|
||||
public string icon;
|
||||
/// <summary>
|
||||
/// The sound.
|
||||
/// </summary>
|
||||
public string sound;
|
||||
/// <summary>
|
||||
/// The tag.
|
||||
/// </summary>
|
||||
public string tag;
|
||||
/// <summary>
|
||||
/// The color.
|
||||
/// </summary>
|
||||
public string color;
|
||||
/// <summary>
|
||||
/// The click action.
|
||||
/// </summary>
|
||||
public string click_action;
|
||||
|
||||
}
|
||||
// https://gcm-http.googleapis.com/gcm/send
|
||||
|
||||
}
|
100
yavscModel/LocalizedText.Designer.cs
generated
100
yavscModel/LocalizedText.Designer.cs
generated
@ -64,9 +64,15 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string Pdf_version {
|
||||
public static string Needs {
|
||||
get {
|
||||
return ResourceManager.GetString("Pdf_version", resourceCulture);
|
||||
return ResourceManager.GetString("Needs", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string BookingTitleArtiste {
|
||||
get {
|
||||
return ResourceManager.GetString("BookingTitleArtiste", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
@ -88,6 +94,18 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string ChooseADateInTheFutur {
|
||||
get {
|
||||
return ResourceManager.GetString("ChooseADateInTheFutur", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string XHasBeenNotified {
|
||||
get {
|
||||
return ResourceManager.GetString("XHasBeenNotified", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Photo {
|
||||
get {
|
||||
return ResourceManager.GetString("Photo", resourceCulture);
|
||||
@ -202,6 +220,12 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string Google_calendar_ {
|
||||
get {
|
||||
return ResourceManager.GetString("Google_calendar_", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string ProviderName {
|
||||
get {
|
||||
return ResourceManager.GetString("ProviderName", resourceCulture);
|
||||
@ -220,9 +244,9 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string Submit {
|
||||
public static string available {
|
||||
get {
|
||||
return ResourceManager.GetString("Submit", resourceCulture);
|
||||
return ResourceManager.GetString("available", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
@ -238,6 +262,12 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string ThisPerformerDoesntGiveAccessToHisCalendar {
|
||||
get {
|
||||
return ResourceManager.GetString("ThisPerformerDoesntGiveAccessToHisCalendar", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string entries {
|
||||
get {
|
||||
return ResourceManager.GetString("entries", resourceCulture);
|
||||
@ -262,9 +292,9 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string XHasBeenNotified {
|
||||
public static string Pdf_version {
|
||||
get {
|
||||
return ResourceManager.GetString("XHasBeenNotified", resourceCulture);
|
||||
return ResourceManager.GetString("Pdf_version", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
@ -328,6 +358,12 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string Google_registration_id {
|
||||
get {
|
||||
return ResourceManager.GetString("Google_registration_id", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Hide {
|
||||
get {
|
||||
return ResourceManager.GetString("Hide", resourceCulture);
|
||||
@ -340,9 +376,9 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string PreferedDate {
|
||||
public static string PerformanceDate {
|
||||
get {
|
||||
return ResourceManager.GetString("PreferedDate", resourceCulture);
|
||||
return ResourceManager.GetString("PerformanceDate", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
@ -364,6 +400,12 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string BookingTitle6829C {
|
||||
get {
|
||||
return ResourceManager.GetString("BookingTitle6829C", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Bill_removal {
|
||||
get {
|
||||
return ResourceManager.GetString("Bill_removal", resourceCulture);
|
||||
@ -418,6 +460,12 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string ThisPerformerGivesAccessToHisCalendarAndSeemsToBeAvailable {
|
||||
get {
|
||||
return ResourceManager.GetString("ThisPerformerGivesAccessToHisCalendarAndSeemsToBeAvailable", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Offline {
|
||||
get {
|
||||
return ResourceManager.GetString("Offline", resourceCulture);
|
||||
@ -442,12 +490,24 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string YourNeed {
|
||||
get {
|
||||
return ResourceManager.GetString("YourNeed", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Count {
|
||||
get {
|
||||
return ResourceManager.GetString("Count", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string PreferedDate {
|
||||
get {
|
||||
return ResourceManager.GetString("PreferedDate", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Edit {
|
||||
get {
|
||||
return ResourceManager.GetString("Edit", resourceCulture);
|
||||
@ -484,12 +544,6 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string Needs {
|
||||
get {
|
||||
return ResourceManager.GetString("Needs", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Role {
|
||||
get {
|
||||
return ResourceManager.GetString("Role", resourceCulture);
|
||||
@ -532,6 +586,12 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string ThisPerformerGivesAccessToHisCalendarAndItAppearsHeShouldNotBeAvailable {
|
||||
get {
|
||||
return ResourceManager.GetString("ThisPerformerGivesAccessToHisCalendarAndItAppearsHeShouldNotBeAvailable", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string User_List {
|
||||
get {
|
||||
return ResourceManager.GetString("User_List", resourceCulture);
|
||||
@ -604,12 +664,24 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string YourSkills {
|
||||
get {
|
||||
return ResourceManager.GetString("YourSkills", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string yourquerytransmitted {
|
||||
get {
|
||||
return ResourceManager.GetString("yourquerytransmitted", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Submit {
|
||||
get {
|
||||
return ResourceManager.GetString("Submit", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Online {
|
||||
get {
|
||||
return ResourceManager.GetString("Online", resourceCulture);
|
||||
|
110
yavscModel/LocalizedText.fr.Designer.cs
generated
110
yavscModel/LocalizedText.fr.Designer.cs
generated
@ -64,9 +64,15 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string Pdf_version {
|
||||
public static string Needs {
|
||||
get {
|
||||
return ResourceManager.GetString("Pdf_version", resourceCulture);
|
||||
return ResourceManager.GetString("Needs", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string BookingTitleArtiste {
|
||||
get {
|
||||
return ResourceManager.GetString("BookingTitleArtiste", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
@ -82,9 +88,21 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string YourMEACode {
|
||||
public static string PreferedDate {
|
||||
get {
|
||||
return ResourceManager.GetString("YourMEACode", resourceCulture);
|
||||
return ResourceManager.GetString("PreferedDate", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string ChooseADateInTheFutur {
|
||||
get {
|
||||
return ResourceManager.GetString("ChooseADateInTheFutur", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string XHasBeenNotified {
|
||||
get {
|
||||
return ResourceManager.GetString("XHasBeenNotified", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
@ -124,9 +142,9 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string My_Estimates {
|
||||
public static string AnIMessageHasbeenSent {
|
||||
get {
|
||||
return ResourceManager.GetString("My_Estimates", resourceCulture);
|
||||
return ResourceManager.GetString("AnIMessageHasbeenSent", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
@ -220,9 +238,9 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string Submit {
|
||||
public static string available {
|
||||
get {
|
||||
return ResourceManager.GetString("Submit", resourceCulture);
|
||||
return ResourceManager.GetString("available", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
@ -238,6 +256,12 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string ThisPerformerDoesntGiveAccessToHisCalendar {
|
||||
get {
|
||||
return ResourceManager.GetString("ThisPerformerDoesntGiveAccessToHisCalendar", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string entries {
|
||||
get {
|
||||
return ResourceManager.GetString("entries", resourceCulture);
|
||||
@ -262,9 +286,9 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string XHasBeenNotified {
|
||||
public static string Pdf_version {
|
||||
get {
|
||||
return ResourceManager.GetString("XHasBeenNotified", resourceCulture);
|
||||
return ResourceManager.GetString("Pdf_version", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
@ -328,6 +352,12 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string Google_registration_id {
|
||||
get {
|
||||
return ResourceManager.GetString("Google_registration_id", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Hide {
|
||||
get {
|
||||
return ResourceManager.GetString("Hide", resourceCulture);
|
||||
@ -340,9 +370,9 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string PreferedDate {
|
||||
public static string PerformanceDate {
|
||||
get {
|
||||
return ResourceManager.GetString("PreferedDate", resourceCulture);
|
||||
return ResourceManager.GetString("PerformanceDate", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
@ -352,6 +382,12 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string My_Estimates {
|
||||
get {
|
||||
return ResourceManager.GetString("My_Estimates", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Location {
|
||||
get {
|
||||
return ResourceManager.GetString("Location", resourceCulture);
|
||||
@ -364,6 +400,12 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string BookingTitle6829C {
|
||||
get {
|
||||
return ResourceManager.GetString("BookingTitle6829C", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Bill_removal {
|
||||
get {
|
||||
return ResourceManager.GetString("Bill_removal", resourceCulture);
|
||||
@ -412,6 +454,12 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string ThisPerformerGivesAccessToHisCalendarAndSeemsToBeAvailable {
|
||||
get {
|
||||
return ResourceManager.GetString("ThisPerformerGivesAccessToHisCalendarAndSeemsToBeAvailable", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Offline {
|
||||
get {
|
||||
return ResourceManager.GetString("Offline", resourceCulture);
|
||||
@ -436,6 +484,12 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string YourNeed {
|
||||
get {
|
||||
return ResourceManager.GetString("YourNeed", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Count {
|
||||
get {
|
||||
return ResourceManager.GetString("Count", resourceCulture);
|
||||
@ -466,15 +520,15 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string ProviderId {
|
||||
public static string YourMEACode {
|
||||
get {
|
||||
return ResourceManager.GetString("ProviderId", resourceCulture);
|
||||
return ResourceManager.GetString("YourMEACode", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Needs {
|
||||
public static string ProviderId {
|
||||
get {
|
||||
return ResourceManager.GetString("Needs", resourceCulture);
|
||||
return ResourceManager.GetString("ProviderId", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
@ -520,6 +574,12 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string ThisPerformerGivesAccessToHisCalendarAndItAppearsHeShouldNotBeAvailable {
|
||||
get {
|
||||
return ResourceManager.GetString("ThisPerformerGivesAccessToHisCalendarAndItAppearsHeShouldNotBeAvailable", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string User_List {
|
||||
get {
|
||||
return ResourceManager.GetString("User_List", resourceCulture);
|
||||
@ -592,12 +652,24 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string YourSkills {
|
||||
get {
|
||||
return ResourceManager.GetString("YourSkills", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string yourquerytransmitted {
|
||||
get {
|
||||
return ResourceManager.GetString("yourquerytransmitted", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Submit {
|
||||
get {
|
||||
return ResourceManager.GetString("Submit", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Online {
|
||||
get {
|
||||
return ResourceManager.GetString("Online", resourceCulture);
|
||||
@ -628,12 +700,6 @@ namespace Yavsc.Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static string AnIMessageHasbeenSent {
|
||||
get {
|
||||
return ResourceManager.GetString("AnIMessageHasbeenSent", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Profile_edition {
|
||||
get {
|
||||
return ResourceManager.GetString("Profile_edition", resourceCulture);
|
||||
|
@ -17,14 +17,18 @@
|
||||
<data name="access_denied"><value>Accès refusé</value></data>
|
||||
<data name="AnIMessageHasbeenSent"><value>Un message instantané a été envoyé à {0},
|
||||
lui présentant votre demande. Vous devriez être contacté très rapidement.</value></data>
|
||||
<data name="available"><value>disponible</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="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="Consultant"><value>Consultant</value></data>
|
||||
<data name="Count"><value>Nombre</value></data>
|
||||
<data name="ChooseADescription"><value>S'il vous plait, choisissez une description.</value></data>
|
||||
<data name="ChooseATitle"><value>S'il vous plait, choisissez un titre.</value></data>
|
||||
<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="Comment"><value>Commentaire</value></data>
|
||||
@ -48,6 +52,7 @@
|
||||
<data name="FillInAFutureDate"><value>Veuilliez, s'il vous plait, utiliser une date future.</value></data>
|
||||
<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="Home"><value>Accueil</value></data>
|
||||
<data name="Hide"><value>Cacher</value></data>
|
||||
@ -59,7 +64,7 @@
|
||||
<data name="Location"><value>Lieu</value></data>
|
||||
<data name="Logout"><value>Déconnection</value></data>
|
||||
<data name="MaxDate"><value>Date maximale du rendez-vous</value></data>
|
||||
<data name="MEACode"><value>Code activité principalement éxercée</value></data>
|
||||
<data name="MEACode"><value>Code d'Activité Principalement Exercée</value></data>
|
||||
<data name="Members"><value>Membres</value></data>
|
||||
<data name="Message_sent"><value>Votre message a été envoyé</value></data>
|
||||
<data name="MinDate"><value>Date minimale du rendez-vous</value></data>
|
||||
@ -76,6 +81,7 @@
|
||||
<data name="Offline"><value>Hors ligne</value></data>
|
||||
<data name="Online"><value>En ligne</value></data>
|
||||
<data name="Pdf_version"><value>Version Pdf</value></data>
|
||||
<data name="PerformanceDate"><value>Date de la prestation</value></data>
|
||||
<data name="Person"><value>Personne</value></data>
|
||||
<data name="Photo"><value>Photo</value></data>
|
||||
<data name="PhotoUpdated"><value>Photo mise à jour</value></data>
|
||||
@ -92,7 +98,7 @@
|
||||
<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="Skills"><value>Talents/Compétences/Spécialités</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>
|
||||
@ -100,6 +106,9 @@
|
||||
<data name="Tag_name"><value>Nom du tag</value></data>
|
||||
<data name="Tex_version"><value>Version LaTeX</value></data>
|
||||
<data name="ThisSiteUsesCookies"><value>Ce site utilise les cookies</value></data>
|
||||
<data name="ThisPerformerGivesAccessToHisCalendarAndSeemsToBeAvailable"><value>Selon son calendier Google, ce perstataire est disponbile.</value></data>
|
||||
<data name="ThisPerformerGivesAccessToHisCalendarAndItAppearsHeShouldNotBeAvailable"><value>Selon son calendier Google, ce perstataire pourrait ne pas être disponible.</value></data>
|
||||
<data name="ThisPerformerDoesntGiveAccessToHisCalendar"><value>Ce prestataire n'a pas mis de calendrier à disposition.</value></data>
|
||||
<data name="Title"><value>Titre</value></data>
|
||||
<data name="Unitary_cost"><value>Coût unitaire</value></data>
|
||||
<data name="User_List"><value>Liste des utilisateurs</value><comment></comment></data>
|
||||
@ -115,5 +124,7 @@
|
||||
{0} devrait être disponible pour ce rendez-vous</value></data>
|
||||
<data name="younotadmin"><value>Vous n'êtes pas administrateur</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>Your skills, your special fields, the scope of your activities</value></data>
|
||||
</root>
|
||||
|
@ -17,14 +17,19 @@
|
||||
<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="available"><value>available</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="BookingTitleArtiste"><value>Book an artiste</value></data>
|
||||
<data name="BookingTitle6829C"><value>Book a software editor</value></data>
|
||||
<data name="Create"><value>Create</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>
|
||||
<data name="ChooseADateInTheFutur"><value>Please, Choose A Date In The Futur</value></data>
|
||||
|
||||
<data name="Ciffer"><value>Ciffer</value></data>
|
||||
<data name="Circles"><value>Circles</value></data>
|
||||
<data name="Consultant"><value>Consultant</value></data>
|
||||
@ -52,7 +57,9 @@
|
||||
<data name="Hide_source"><value>Hide the bill source text</value></data>
|
||||
<data name="entries"><value>entries</value></data>
|
||||
<data name="Google_calendar"><value>Google calendar</value></data>
|
||||
<data name="Google_calendar_"><value>Google calendar</value></data>
|
||||
<data name="Google_error"><value>Google error : {0}</value></data>
|
||||
<data name="Google_registration_id"><value>Google registration id</value></data>
|
||||
<data name="I_understood"><value>I understood</value></data>
|
||||
<data name="InternalServerError"><value>Internal Server Error</value></data>
|
||||
<data name="ImgLocator"><value>Image URI</value></data>
|
||||
@ -78,6 +85,7 @@
|
||||
<data name="Online"><value>Online</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>
|
||||
<data name="Person"><value>Person</value></data>
|
||||
<data name="Photo"><value>Photo</value></data>
|
||||
<data name="PhotoUpdated"><value>Photo updated</value></data>
|
||||
@ -104,6 +112,9 @@
|
||||
<data name="Tag_name"><value>Tag name</value></data>
|
||||
<data name="Tex_version"><value>LaTeX version</value></data>
|
||||
<data name="ThisSiteUsesCookies"><value>This site uses cookies</value></data>
|
||||
<data name="ThisPerformerGivesAccessToHisCalendarAndSeemsToBeAvailable"><value>ThisPerformerGivesAccessToHisCalendarAndSeemsToBeAvailable</value></data>
|
||||
<data name="ThisPerformerGivesAccessToHisCalendarAndItAppearsHeShouldNotBeAvailable"><value>ThisPerformerGivesAccessToHisCalendarAndItAppearsHeShouldNotBeAvailable</value></data>
|
||||
<data name="ThisPerformerDoesntGiveAccessToHisCalendar"><value>ThisPerformerDoesntGiveAccessToHisCalendar</value></data>
|
||||
<data name="Title"><value>Title</value></data>
|
||||
<data name="Unitary_cost"><value>Unitary_cost</value></data>
|
||||
<data name="User_List"><value>User List</value><comment></comment></data>
|
||||
@ -119,6 +130,8 @@
|
||||
{0} should be available for this booking</value></data>
|
||||
<data name="younotadmin"><value>You're not administrator</value></data>
|
||||
<data name="YourMEACode"><value>Your activity</value></data>
|
||||
<data name="YourNeed"><value>Your need</value></data>
|
||||
<data name="YourSkills"><value>Vos talents, vos spécialités, le domaine de vos activités</value></data>
|
||||
<data name="yourquerytransmitted"><value>your query has been transmitted</value></data>
|
||||
|
||||
</root>
|
||||
|
@ -22,7 +22,7 @@ using System;
|
||||
|
||||
namespace Yavsc.Model.Messaging
|
||||
{
|
||||
public class Notification : Google.Notification
|
||||
public class Notification : Yavsc.Model.Google.Api.Messaging.Notification
|
||||
{
|
||||
public Notification ()
|
||||
{
|
||||
|
@ -169,6 +169,8 @@ namespace Yavsc.Model.RolesAndMembers
|
||||
/// <value>The google calendar.</value>
|
||||
[Display(Name="Google_calendar",ResourceType=typeof(LocalizedText))]
|
||||
public string GoogleCalendar { get; set; }
|
||||
[Display(Name="Google_registration_id",ResourceType=typeof(LocalizedText))]
|
||||
public string GoogleRegId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether this instance has bank account.
|
||||
@ -274,6 +276,7 @@ namespace Yavsc.Model.RolesAndMembers
|
||||
AccountNumber = (string) profile.GetPropertyValue ("AccountNumber");
|
||||
BankedKey = (int) profile.GetPropertyValue ("BankedKey");
|
||||
GoogleCalendar = (string) profile.GetPropertyValue ("gcalid");
|
||||
GoogleRegId = (string) profile.GetPropertyValue ("gregid");
|
||||
MEACode = (string) profile.GetPropertyValue ("MEACode");
|
||||
}
|
||||
|
||||
@ -281,10 +284,8 @@ namespace Yavsc.Model.RolesAndMembers
|
||||
/// Gets or sets the MEA code.
|
||||
/// </summary>
|
||||
/// <value>The MEA code.</value>
|
||||
[Localizable(true), Required(ErrorMessage = "S'il vous plait, entrez un code APE valide")
|
||||
,Display(ResourceType=typeof(LocalizedText),Name="MEACode"),
|
||||
RegularExpression(@"[a-zA-Z0-9 \-_.~/\\]+")
|
||||
]
|
||||
[Display(ResourceType=typeof(LocalizedText),Name="MEACode"),
|
||||
RegularExpression(@"[a-zA-Z0-9 \-_.~/\\]*")]
|
||||
public string MEACode { get; set; }
|
||||
|
||||
}
|
||||
|
@ -38,6 +38,13 @@ namespace Yavsc.Model.Skill
|
||||
/// <value>The identifier.</value>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the MEA code.
|
||||
/// </summary>
|
||||
/// <value>The MEA code.</value>
|
||||
[Required(ErrorMessageResourceName="MEACode",ErrorMessageResourceType=typeof(LocalizedText))]
|
||||
public string MEACode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name.
|
||||
/// </summary>
|
||||
|
@ -37,7 +37,7 @@ namespace Yavsc.Model.Skill
|
||||
/// Gets the provider.
|
||||
/// </summary>
|
||||
/// <value>The provider.</value>
|
||||
private static SkillProvider Provider {
|
||||
private static SkillProvider DefaultProvider {
|
||||
get {
|
||||
if (provider == null)
|
||||
provider = ManagerHelper.CreateDefaultProvider<SkillProvider>
|
||||
@ -51,7 +51,7 @@ namespace Yavsc.Model.Skill
|
||||
/// </summary>
|
||||
/// <param name="skill">the skill.</param>
|
||||
public static long DeclareSkill(SkillEntity skill) {
|
||||
Provider.Declare(skill);
|
||||
DefaultProvider.Declare(skill);
|
||||
return skill.Id;
|
||||
}
|
||||
/// <summary>
|
||||
@ -60,7 +60,7 @@ namespace Yavsc.Model.Skill
|
||||
/// <returns>The skill.</returns>
|
||||
/// <param name="dec">Dec.</param>
|
||||
public static long DeclareUserSkill(UserSkillDeclaration dec) {
|
||||
return Provider.Declare(dec);
|
||||
return DefaultProvider.Declare(dec);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -70,7 +70,7 @@ namespace Yavsc.Model.Skill
|
||||
/// <param name="username">Username.</param>
|
||||
/// <param name="userSkill">User skill.</param>
|
||||
public static long RateUserSkill(string username, UserSkillRating userSkill) {
|
||||
return Provider.Rate(userSkill);
|
||||
return DefaultProvider.Rate(userSkill);
|
||||
}
|
||||
/// <summary>
|
||||
/// Rates the skill.
|
||||
@ -78,7 +78,7 @@ namespace Yavsc.Model.Skill
|
||||
/// <param name="username">Username.</param>
|
||||
/// <param name="skill">Skill.</param>
|
||||
public static void RateSkill(string username, SkillRating skill) {
|
||||
Provider.Rate(skill);
|
||||
DefaultProvider.Rate(skill);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -86,8 +86,8 @@ namespace Yavsc.Model.Skill
|
||||
/// </summary>
|
||||
/// <returns>The skill identifier.</returns>
|
||||
/// <param name="pattern">Pattern.</param>
|
||||
public static SkillEntity [] FindSkill(string pattern){
|
||||
return Provider.FindSkill(pattern);
|
||||
public static SkillEntity [] FindSkill(string pattern, string MEACode=null){
|
||||
return DefaultProvider.FindSkill(pattern, MEACode);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -96,7 +96,7 @@ namespace Yavsc.Model.Skill
|
||||
/// <returns>The performer.</returns>
|
||||
/// <param name="skillIds">Skill identifiers.</param>
|
||||
public static string [] FindPerformer(long [] skillIds) {
|
||||
return Provider.FindPerformer(skillIds);
|
||||
return DefaultProvider.FindPerformer(skillIds);
|
||||
}
|
||||
/// <summary>
|
||||
/// Deletes the skill.
|
||||
@ -104,7 +104,7 @@ namespace Yavsc.Model.Skill
|
||||
/// <param name="skillId">Skill identifier.</param>
|
||||
public static void DeleteSkill (long skillId)
|
||||
{
|
||||
Provider.DeleteSkill (skillId);
|
||||
DefaultProvider.DeleteSkill (skillId);
|
||||
}
|
||||
/// <summary>
|
||||
/// Deletes the user skill.
|
||||
@ -112,7 +112,7 @@ namespace Yavsc.Model.Skill
|
||||
/// <param name="skillId">Skill identifier.</param>
|
||||
public static void DeleteUserSkill (long skillId)
|
||||
{
|
||||
Provider.DeleteUserSkill (skillId);
|
||||
DefaultProvider.DeleteUserSkill (skillId);
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets the user skills.
|
||||
@ -121,7 +121,7 @@ namespace Yavsc.Model.Skill
|
||||
/// <param name="userName">User name.</param>
|
||||
public static PerformerProfile GetUserSkills(string userName)
|
||||
{
|
||||
return Provider.GetUserSkills (userName);
|
||||
return DefaultProvider.GetUserSkills (userName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ namespace Yavsc.Model.Skill
|
||||
/// </summary>
|
||||
/// <returns>The skill identifier.</returns>
|
||||
/// <param name="pattern">Pattern.</param>
|
||||
public abstract SkillEntity [] FindSkill(string pattern);
|
||||
public abstract SkillEntity [] FindSkill(string pattern, string MEACode);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the user skills.
|
||||
|
@ -63,6 +63,12 @@ namespace Yavsc.Model.WorkFlow
|
||||
/// <param name="exerted">If set to <c>true</c> exerted.</param>
|
||||
Activity [] FindActivity (string pattern, bool exerted);
|
||||
|
||||
/// <summary>
|
||||
/// Finds the performer.
|
||||
/// </summary>
|
||||
/// <returns>The performer.</returns>
|
||||
/// <param name="MEACode">MEA code.</param>
|
||||
PerformerProfile [] FindPerformer (string MEACode);
|
||||
/// <summary>
|
||||
/// Gets the activity.
|
||||
/// </summary>
|
||||
|
@ -9,6 +9,7 @@ using System.Collections.Generic;
|
||||
|
||||
namespace Yavsc.Model.WorkFlow
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Work flow manager.
|
||||
/// It takes orders store them and raise some events for modules
|
||||
@ -16,6 +17,16 @@ namespace Yavsc.Model.WorkFlow
|
||||
/// </summary>
|
||||
public static class WorkFlowManager
|
||||
{
|
||||
/// <summary>
|
||||
/// Finds the performer.
|
||||
/// </summary>
|
||||
/// <returns>The performer.</returns>
|
||||
/// <param name="MEACode">MEA code.</param>
|
||||
public static PerformerProfile [] FindPerformer(string MEACode)
|
||||
{
|
||||
return DefaultProvider.FindPerformer (MEACode);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Finds the activity.
|
||||
/// </summary>
|
||||
@ -157,6 +168,16 @@ namespace Yavsc.Model.WorkFlow
|
||||
return defaultProvider;
|
||||
}
|
||||
}
|
||||
|
||||
public static void DropWrittingTag (long wrid, string tag)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the providers.
|
||||
/// </summary>
|
||||
/// <value>The providers.</value>
|
||||
public static IContentProvider [] Providers {
|
||||
|
||||
get {
|
||||
|
@ -9,7 +9,7 @@
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>Yavsc.Model</RootNamespace>
|
||||
<AssemblyName>YavscModel</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@ -42,21 +42,25 @@
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\TotemPre</OutputPath>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'TotemProd|AnyCPU' ">
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\TotemProd</OutputPath>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'YavscPre|AnyCPU' ">
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\YavscPre</OutputPath>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Yavsc|AnyCPU' ">
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Yavsc</OutputPath>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
@ -72,6 +76,8 @@
|
||||
<Reference Include="MarkdownDeep">
|
||||
<HintPath>..\web\lib\MarkdownDeep.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
@ -147,9 +153,6 @@
|
||||
<Compile Include="Google\CalendarEventList.cs" />
|
||||
<Compile Include="Google\GDate.cs" />
|
||||
<Compile Include="Google\Resource.cs" />
|
||||
<Compile Include="Google\Messaging\MessageWithPayLoad.cs" />
|
||||
<Compile Include="Google\Messaging\MessageWithPayloadResponse.cs" />
|
||||
<Compile Include="Google\Messaging\Notification.cs" />
|
||||
<Compile Include="Calendar\EventPub.cs" />
|
||||
<Compile Include="Calendar\OpenDay.cs" />
|
||||
<Compile Include="Calendar\Period.cs" />
|
||||
@ -224,6 +227,19 @@
|
||||
<Compile Include="ITitle.cs" />
|
||||
<Compile Include="Calendar\BaseEvent.cs" />
|
||||
<Compile Include="ManagerHelper.cs" />
|
||||
<Compile Include="Google\Api\ApiClient.cs" />
|
||||
<Compile Include="Google\Api\CalendarApi.cs" />
|
||||
<Compile Include="Google\Api\Entity.cs" />
|
||||
<Compile Include="Google\Api\EntityQuery.cs" />
|
||||
<Compile Include="Google\Api\GoogleHelpers.cs" />
|
||||
<Compile Include="Google\Api\MapTracks.cs" />
|
||||
<Compile Include="Google\Api\OAuth2.cs" />
|
||||
<Compile Include="Google\Api\PeopleApi.cs" />
|
||||
<Compile Include="Google\Api\Messaging\MessageWithPayLoad.cs" />
|
||||
<Compile Include="Google\Api\Messaging\MessageWithPayloadResponse.cs" />
|
||||
<Compile Include="Google\Api\Messaging\Notification.cs" />
|
||||
<Compile Include="SimpleJsonPostMethod.cs" />
|
||||
<Compile Include="FrontOffice\PerformerAvailability.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
@ -235,7 +251,6 @@
|
||||
<Folder Include="FrontOffice\" />
|
||||
<Folder Include="FrontOffice\Catalog\" />
|
||||
<Folder Include="FrontOffice\Catalog\Billing\" />
|
||||
<Folder Include="Google\Messaging\" />
|
||||
<Folder Include="Circles\" />
|
||||
<Folder Include="RolesAndMembers\" />
|
||||
<Folder Include="Messaging\" />
|
||||
|
Reference in New Issue
Block a user