Un bouton "Demander un devis"
* INominative.cs: Interface d'un objet destiné à un préstataire spécifié, par une propriété `PerformerName` * NominativeSimpleBookingQuery.cs: implémente l'interface INominative * packages.config: * packages.config: * packages.config: * ITContentProvider.csproj: * NpgsqlBlogProvider.csproj: * NpgsqlContentProvider.csproj: mise à niveau Npgsql * NpgsqlContentProvider.cs: stocke la classe de commande * AccountController.cs: implémente la methode de login de l'API * BasketController.cs: implémente la methode de recupération du panier * AccountController.cs: enléve un commaentaire obsolète * YavscHelpers.cs: * FrontOfficeController.cs: refabrication de l'ajout au panier * yavsc.user.js: enlève un message de debuggage js * Performer.ascx: formattage * Performers.aspx: implémente le bouton de demande de reservation * Yavsc.csproj: validate unobtrusive * packages.config: référence M$ Owin * UserFileSystemManager.cs: Fixe: Ne pas créer un dossier de destination si on a aucun fichier à recevoir. * Commande.cs: * Ajoute le nom du client dans l'objet commande * Factorise le positionnement des paramêtres * La commande est une instance du type spécifié à la commande, dans son paramêtre `type` * SimpleBookingQuery.cs: refabrication * LocalizedText.resx: * LocalizedText.fr.resx: traducations * UserNameBase.cs: implemente l'interface `IUserName` * IContentProvider.cs: doc xml * YavscModel.csproj: reference le nouveau code source * Web.config: retour à une version d'équère * IUserName.cs: Définit l'interface d'un objet associé à un utilisateur.
This commit is contained in:
parent
1cb3a692ef
commit
2a1301d93c
34 changed files with 409 additions and 77 deletions
|
|
@ -107,6 +107,16 @@ namespace Yavsc.ApiControllers
|
|||
}
|
||||
}
|
||||
|
||||
[ValidateAjax]
|
||||
public void Login(LoginModel model)
|
||||
{
|
||||
if (ModelState.IsValid) {
|
||||
if (Membership.ValidateUser (model.UserName, model.Password)) {
|
||||
FormsAuthentication.SetAuthCookie (model.UserName, model.RememberMe);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds the user to role.
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ using System.Web.Http;
|
|||
using Yavsc.Model.WorkFlow;
|
||||
using System.Collections.Specialized;
|
||||
using Yavsc.Model.FrontOffice;
|
||||
using Yavsc.Helpers;
|
||||
|
||||
namespace Yavsc.ApiControllers
|
||||
{
|
||||
|
|
@ -15,6 +16,7 @@ namespace Yavsc.ApiControllers
|
|||
/// Maintains a collection of articles
|
||||
/// qualified with name value pairs
|
||||
/// </summary>
|
||||
[Authorize]
|
||||
public class BasketController : ApiController
|
||||
{
|
||||
|
||||
|
|
@ -30,25 +32,25 @@ namespace Yavsc.ApiControllers
|
|||
return b;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Get the basket.
|
||||
/// </summary>
|
||||
public CommandSet Get() {
|
||||
return CurrentBasket;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create the specified basket item using specified command parameters.
|
||||
/// </summary>
|
||||
/// <param name="cmdParams">Command parameters.</param>
|
||||
[Authorize]
|
||||
public long Create(NameValueCollection cmdParams)
|
||||
public long Create()
|
||||
{
|
||||
// HttpContext.Current.Request.Files
|
||||
Command cmd = Command.CreateCommand(cmdParams, HttpContext.Current.Request.Files);
|
||||
CurrentBasket.Add (cmd);
|
||||
return cmd.Id;
|
||||
return YavscHelpers.CreateCommandFromRequest ();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Read the specified basket item.
|
||||
/// </summary>
|
||||
/// <param name="itemid">Itemid.</param>
|
||||
[Authorize]
|
||||
Command Read(long itemid){
|
||||
return CurrentBasket[itemid];
|
||||
}
|
||||
|
|
@ -59,7 +61,6 @@ namespace Yavsc.ApiControllers
|
|||
/// <param name="itemid">Item identifier.</param>
|
||||
/// <param name="param">Parameter name.</param>
|
||||
/// <param name="value">Value.</param>
|
||||
[Authorize]
|
||||
public void UpdateParam(long itemid, string param, string value)
|
||||
{
|
||||
CurrentBasket [itemid].Parameters [param] = value;
|
||||
|
|
@ -69,7 +70,6 @@ namespace Yavsc.ApiControllers
|
|||
/// Delete the specified item.
|
||||
/// </summary>
|
||||
/// <param name="itemid">Item identifier.</param>
|
||||
[Authorize]
|
||||
public void Delete(long itemid)
|
||||
{
|
||||
CurrentBasket.Remove (itemid);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue