diff --git a/NpgsqlBlogProvider/BlogManager.cs b/NpgsqlBlogProvider/BlogManager.cs
index 2ebac0d7..b92f2690 100644
--- a/NpgsqlBlogProvider/BlogManager.cs
+++ b/NpgsqlBlogProvider/BlogManager.cs
@@ -57,6 +57,15 @@ namespace Npgsql.Web.Blog
{
return Provider.GetComments (postid,getHidden);
}
+ ///
+ /// Tag the specified post by postid.
+ ///
+ /// Postid.
+ /// The tag identifier
+ public static long Tag(long postid, string tag) {
+ return Provider.Tag (postid, tag);
+ }
+
}
}
diff --git a/NpgsqlBlogProvider/BlogProvider.cs b/NpgsqlBlogProvider/BlogProvider.cs
index dfa4fee6..76314bfc 100644
--- a/NpgsqlBlogProvider/BlogProvider.cs
+++ b/NpgsqlBlogProvider/BlogProvider.cs
@@ -25,6 +25,8 @@ namespace yavscModel.Blogs
public abstract bool AutoValidateComment { get; set; }
public abstract void ValidateComment (long cmtid);
public abstract void UpdateComment (long cmtid, string content, bool visible);
+ public abstract long Tag (long postid,string tag);
+ public abstract void RemoveTag (long tagid);
}
}
diff --git a/NpgsqlBlogProvider/NpgsqlBlogProvider.cs b/NpgsqlBlogProvider/NpgsqlBlogProvider.cs
index ad1c2e2f..9422dd88 100644
--- a/NpgsqlBlogProvider/NpgsqlBlogProvider.cs
+++ b/NpgsqlBlogProvider/NpgsqlBlogProvider.cs
@@ -14,6 +14,26 @@ namespace Npgsql.Web.Blog
#region implemented abstract members of BlogProvider
+ public override long Tag (long postid, string tag)
+ {
+ using (NpgsqlConnection cnx = new NpgsqlConnection (connectionString))
+ using (NpgsqlCommand cmd = cnx.CreateCommand ()) {
+ cmd.CommandText = "insert into bltag (blid,tag) values (@postid,@tag) returning _id";
+ cmd.Parameters.Add("@tag",tag);
+ cmd.Parameters.Add("@postid",postid);
+ return (long) cmd.ExecuteScalar ();
+ }
+ }
+
+ public override void RemoveTag (long tagid)
+ {
+ using (NpgsqlConnection cnx = new NpgsqlConnection (connectionString))
+ using (NpgsqlCommand cmd = cnx.CreateCommand ()) {
+ cmd.CommandText = "delete from bltag where _id = @tagid";
+ cmd.Parameters.Add("@tagid",tagid);
+ cmd.ExecuteNonQuery ();
+ }
+ }
public override long GetPostId (string username, string title)
{
throw new NotImplementedException ();
@@ -199,6 +219,18 @@ namespace Npgsql.Web.Blog
be.Posted = rdr.GetDateTime (rdr.GetOrdinal ("posted"));
be.Visible = rdr.GetBoolean (rdr.GetOrdinal ("visible"));
be.Id = rdr.GetInt64 (rdr.GetOrdinal ("_id"));
+ using (NpgsqlCommand cmdtags = cnx.CreateCommand()) {
+ List tags = new List ();
+ cmd.CommandText = "select tag from bltags where blid = @pid";
+ cmd.Parameters.Add ("@pid", be.Id);
+ using (NpgsqlDataReader rdrt = cmd.ExecuteReader ()) {
+
+ while (rdrt.Read ()) {
+ tags.Add (rdrt.GetString (0));
+ }
+ }
+ be.Tags = tags.ToArray ();
+ }
}
}
}
diff --git a/WorkFlowProvider/NpgsqlContentProvider.cs b/WorkFlowProvider/NpgsqlContentProvider.cs
index 34de5455..80a173a7 100644
--- a/WorkFlowProvider/NpgsqlContentProvider.cs
+++ b/WorkFlowProvider/NpgsqlContentProvider.cs
@@ -12,6 +12,35 @@ namespace WorkFlowProvider
{
public class NpgsqlContentProvider: ProviderBase, IContentProvider
{
+ public Estimate[] GetEstimates (string client)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void Install ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void Uninstall ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public ConfigurationSection DefaultConfig (string appName, string cnxStr)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public bool Active {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
public StatusChange[] GetWrittingStatuses (long wrid)
{
throw new NotImplementedException ();
@@ -246,6 +275,9 @@ namespace WorkFlowProvider
cnxstr = ConfigurationManager.ConnectionStrings [config ["connectionStringName"]].ConnectionString;
applicationName = config["applicationName"] ?? "/";
+
+
+
}
protected NpgsqlConnection CreateConnection ()
diff --git a/WorkFlowProvider/WFManager.cs b/WorkFlowProvider/WFManager.cs
index 99432237..5a48f513 100644
--- a/WorkFlowProvider/WFManager.cs
+++ b/WorkFlowProvider/WFManager.cs
@@ -12,7 +12,10 @@ namespace WorkFlowProvider
{
return ContentProvider.GetEstimate (estid);
}
-
+ public static Estimate [] GetEstimates (string client)
+ {
+ return ContentProvider.GetEstimates (client);
+ }
public static void UpdateWritting (Writting wr)
{
ContentProvider.UpdateWritting (wr);
@@ -80,6 +83,7 @@ namespace WorkFlowProvider
}
+
public static long Write(long estid, string desc, decimal ucost, int count, long productid)
{
return ContentProvider.Write(estid, desc, ucost, count, productid);
diff --git a/web/Controllers/AccountController.cs b/web/Controllers/AccountController.cs
index f70ad920..61f6e527 100644
--- a/web/Controllers/AccountController.cs
+++ b/web/Controllers/AccountController.cs
@@ -100,11 +100,16 @@ namespace Yavsc.Controllers
return View (model);
case MembershipCreateStatus.Success:
FileInfo fi = new FileInfo (
- Server.MapPath(registrationMessage));
+ Server.MapPath (registrationMessage));
if (!fi.Exists) {
- ViewData["Error"] = "Erreur inattendue (pas de corps de message à envoyer)";
+ ViewData ["Error"] =
+ string.Format (
+ "Erreur inattendue (pas de corps de message " +
+ "à envoyer pour le message de confirmation ({0}))",
+ registrationMessage);
return View (model);
}
+
using (StreamReader sr = fi.OpenText()) {
string body = sr.ReadToEnd();
body = body.Replace("<%SiteName%>",YavscHelpers.SiteName);
@@ -189,79 +194,8 @@ namespace Yavsc.Controllers
return View (model);
}
- [Authorize()]
- public ActionResult UserList ()
- {
- MembershipUserCollection c = Membership.GetAllUsers ();
- return View (c);
- }
-
- private const string adminRoleName = "Admin";
-
- [Authorize()]
- public ActionResult Admin (NewAdminModel model)
- {
- string currentUser = Membership.GetUser ().UserName;
- if (ModelState.IsValid) {
- Roles.AddUserToRole (model.UserName, adminRoleName);
- ViewData ["Message"] = model.UserName + " was added to the role '" + adminRoleName + "'";
- } else {
- if (!Roles.RoleExists (adminRoleName)) {
- Roles.CreateRole (adminRoleName);
- string.Format ("The role '{0}' has just been created. ",
- adminRoleName);
- }
- string [] admins = Roles.GetUsersInRole (adminRoleName);
- if (admins.Length > 0) {
- if (! admins.Contains (Membership.GetUser ().UserName)) {
- ModelState.Remove("UserName");
- ModelState.AddModelError("UserName", "You're not administrator!");
- return View ("Index");
- }
- } else {
- Roles.AddUserToRole (currentUser, adminRoleName);
- admins = new string[] { currentUser };
- ViewData ["Message"] += string.Format (
- "There was no user in the 'Admin' role. You ({0}) was just added as the firt user in the 'Admin' role. ", currentUser);
- }
-
- List users = new List ();
- foreach (MembershipUser u in Membership.GetAllUsers ()) {
- var i = new SelectListItem ();
- i.Text = string.Format ("{0} <{1}>", u.UserName, u.Email);
- i.Value = u.UserName;
- users.Add (i);
- }
- ViewData ["useritems"] = users;
- ViewData ["admins"] = admins;
- }
- return View (model);
- }
-
- [Authorize()]
- public ActionResult RoleList ()
- {
- return View (Roles.GetAllRoles ());
- }
-
- [Authorize(Roles="Admin")]
- public ActionResult RemoveFromRole(string username, string rolename, string returnUrl)
- {
- Roles.RemoveUserFromRole(username,rolename);
- return Redirect(returnUrl);
- }
- [Authorize(Roles="Admin")]
- public ActionResult RemoveUser (string username, string submitbutton)
- {
- if (submitbutton == "Supprimer") {
- Membership.DeleteUser (username);
- ViewData["Message"]=
- string.Format("utilisateur \"{0}\" supprimé",username);
- }
- return RedirectToAction("UserList");
- }
[Authorize]
[HttpPost]
//public ActionResult UpdateProfile(HttpPostedFileBase Avatar, string Address, string CityAndState, string ZipCode, string Country, string WebSite)
@@ -304,30 +238,6 @@ namespace Yavsc.Controllers
return RedirectToAction ("Profile");
}
- [Authorize(Roles="Admin")]
- public ActionResult RemoveRole (string rolename, string submitbutton)
- {
- if (submitbutton == "Supprimer")
- {
- Roles.DeleteRole(rolename);
- }
- return RedirectToAction("RoleList");
- }
-
- [Authorize(Roles="Admin")]
- public ActionResult RemoveRoleQuery(string rolename)
- {
- ViewData["roletoremove"] = rolename;
- return View ();
- }
-
- [Authorize(Roles="Admin")]
- public ActionResult RemoveUserQuery(string username)
- {
- ViewData["usertoremove"] = username;
- return UserList();
- }
-
[Authorize]
public ActionResult Logout (string returnUrl)
{
@@ -335,20 +245,9 @@ namespace Yavsc.Controllers
return Redirect(returnUrl);
}
- [Authorize(Roles="Admin")]
- public ActionResult AddRole ()
- {
- return View ();
- }
- [Authorize(Roles="Admin")]
- public ActionResult DoAddRole (string rolename)
- {
- Roles.CreateRole(rolename);
- ViewData["Message"] = "Rôle créé : "+rolename;
- return View ();
- }
+ [HttpGet]
public ActionResult Validate (string id, string key)
{
MembershipUser u = Membership.GetUser (id, false);
diff --git a/web/Controllers/AdminController.cs b/web/Controllers/AdminController.cs
new file mode 100644
index 00000000..7b40c0ae
--- /dev/null
+++ b/web/Controllers/AdminController.cs
@@ -0,0 +1,127 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.Mvc;
+using System.Web.Mvc.Ajax;
+using System.Web.Security;
+using yavscModel.RolesAndMembers;
+
+namespace Yavsc.Controllers.Controllers
+{
+ public class AdminController : Controller
+ {
+ [Authorize(Roles="Admin")]
+ public ActionResult RemoveFromRole(string username, string rolename, string returnUrl)
+ {
+ Roles.RemoveUserFromRole(username,rolename);
+ return Redirect(returnUrl);
+ }
+
+ [Authorize(Roles="Admin")]
+ public ActionResult RemoveUser (string username, string submitbutton)
+ {
+ if (submitbutton == "Supprimer") {
+ Membership.DeleteUser (username);
+ ViewData["Message"]=
+ string.Format("utilisateur \"{0}\" supprimé",username);
+ }
+ return RedirectToAction("UserList");
+ }
+ [Authorize(Roles="Admin")]
+ public ActionResult RemoveRole (string rolename, string submitbutton)
+ {
+ if (submitbutton == "Supprimer")
+ {
+ Roles.DeleteRole(rolename);
+ }
+ return RedirectToAction("RoleList");
+ }
+
+ [Authorize(Roles="Admin")]
+ public ActionResult RemoveRoleQuery(string rolename)
+ {
+ ViewData["roletoremove"] = rolename;
+ return View ();
+ }
+
+ [Authorize(Roles="Admin")]
+ public ActionResult RemoveUserQuery(string username)
+ {
+ ViewData["usertoremove"] = username;
+ return UserList();
+ }
+ //TODO no more than pageSize results per page
+ [Authorize()]
+ public ActionResult UserList ()
+ {
+ MembershipUserCollection c = Membership.GetAllUsers ();
+ return View (c);
+ }
+
+ [Authorize(Roles="Admin")]
+ public ActionResult AddRole ()
+ {
+ return View ();
+ }
+
+ [Authorize(Roles="Admin")]
+ public ActionResult DoAddRole (string rolename)
+ {
+ Roles.CreateRole(rolename);
+ ViewData["Message"] = "Rôle créé : "+rolename;
+ return View ();
+ }
+
+ [Authorize()]
+ public ActionResult RoleList ()
+ {
+ return View (Roles.GetAllRoles ());
+ }
+ private const string adminRoleName = "Admin";
+ protected override void Initialize (System.Web.Routing.RequestContext requestContext)
+ {
+ base.Initialize (requestContext);
+ if (!Roles.RoleExists (adminRoleName)) {
+ Roles.CreateRole (adminRoleName);
+ }
+ }
+
+ [Authorize()]
+ public ActionResult Admin (NewAdminModel model)
+ {
+ string currentUser = Membership.GetUser ().UserName;
+ if (ModelState.IsValid) {
+ Roles.AddUserToRole (model.UserName, adminRoleName);
+ ViewData ["Message"] = model.UserName + " was added to the role '" + adminRoleName + "'";
+ } else {
+ // assert (Roles.RoleExists (adminRoleName))
+ string [] admins = Roles.GetUsersInRole (adminRoleName);
+ if (admins.Length > 0) {
+ if (! admins.Contains (Membership.GetUser ().UserName)) {
+ ModelState.Remove("UserName");
+ ModelState.AddModelError("UserName", "You're not administrator!");
+ return View ("Index");
+ }
+ } else {
+ Roles.AddUserToRole (currentUser, adminRoleName);
+ admins = new string[] { currentUser };
+ ViewData ["Message"] += string.Format (
+ "There was no user in the 'Admin' role. You ({0}) was just added as the firt user in the 'Admin' role. ", currentUser);
+ }
+
+ List users = new List ();
+ foreach (MembershipUser u in Membership.GetAllUsers ()) {
+ var i = new SelectListItem ();
+ i.Text = string.Format ("{0} <{1}>", u.UserName, u.Email);
+ i.Value = u.UserName;
+ users.Add (i);
+ }
+ ViewData ["useritems"] = users;
+ ViewData ["admins"] = admins;
+ }
+ return View (model);
+ }
+ }
+}
+
diff --git a/web/Controllers/BackOfficeController.cs b/web/Controllers/BackOfficeController.cs
index 5f47af6d..555c56db 100644
--- a/web/Controllers/BackOfficeController.cs
+++ b/web/Controllers/BackOfficeController.cs
@@ -47,6 +47,10 @@ namespace Yavsc.Controllers
throw new NotImplementedException();
}
+ [Authorize(Roles="Admin")]
+ public ActionResult Upgrade(DataAccess datac) {
+ throw new NotImplementedException();
+ }
[Authorize(Roles="Admin")]
public ActionResult Restore(DataAccess datac,string backupName,bool dataOnly=true)
diff --git a/web/Controllers/BasketController.cs b/web/Controllers/BasketController.cs
index 0f4c0254..4aef0999 100644
--- a/web/Controllers/BasketController.cs
+++ b/web/Controllers/BasketController.cs
@@ -2,72 +2,54 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
-using System.Web.Mvc;
using System.Web.Security;
+using System.Web.Http;
+using yavscModel.WorkFlow;
-namespace Yavsc.Controllers
+namespace Yavsc.ApiControllers
{
// TODO should mostly be an API Controller
- public class BasketController : Controller
+ public class BasketController : ApiController
{
- public ActionResult Index()
- {
- return View ();
- }
+ ///
+ /// Validates the order.
+ ///
+ ///
+ /// true, if order was validated, false otherwise.
+ /// Orderid.
+ bool ValidateOrder(long orderid) {
+ throw new NotImplementedException ();
+ }
- public ActionResult Details(int id)
- {
- return View ();
- }
+ long CreateOrder(string title,string mesg)
+ {
+ throw new NotImplementedException ();
+ }
- public ActionResult Create()
- {
- throw new NotImplementedException();
- // var user = Membership.GetUser ();
- // var username = (user != null)?user.UserName:Request.AnonymousID;
- // get an existing basket
-
- //return View ();
- }
+ ///
+ /// Adds to basket, a product from the catalog, in the user's session.
+ ///
+ /// The to basket.
+ [HttpGet]
+ public long AddToOrder (long orderid, string prodref,int count, object prodparams=null)
+ {
+ //TODO find the basket for Membership.GetUser().UserName
+ //return WFManager.Write(estid << from the basket, desc, ucost, count, productid);
+ throw new NotImplementedException ();
+ }
- [HttpPost]
- public ActionResult Create(FormCollection collection)
- {
- try {
- return RedirectToAction ("Index");
- } catch {
- return View ();
- }
- }
-
- public ActionResult Edit(int id)
- {
- return View ();
- }
+ [HttpGet]
+ [Authorize]
+ public Estimate[] YourEstimates()
+ {
+ return WorkFlowProvider.WFManager.GetEstimates (
+ Membership.GetUser().UserName);
+ }
- [HttpPost]
- public ActionResult Edit(int id, FormCollection collection)
- {
- try {
- return RedirectToAction ("Index");
- } catch {
- return View ();
- }
- }
-
- public ActionResult Delete(int id)
- {
- return View ();
- }
-
- [HttpPost]
- public ActionResult Delete(int id, FormCollection collection)
- {
- try {
- return RedirectToAction ("Index");
- } catch {
- return View ();
- }
- }
+ [HttpGet]
+ public object Order (BasketImpact bi)
+ {
+ return new { c="lmk,", message="Panier impacté", impactRef=bi.ProductRef, count=bi.Count};
+ }
}
}
\ No newline at end of file
diff --git a/web/Controllers/BasketImpact.cs b/web/Controllers/BasketImpact.cs
index a57d6087..e83254ed 100644
--- a/web/Controllers/BasketImpact.cs
+++ b/web/Controllers/BasketImpact.cs
@@ -15,7 +15,8 @@ namespace Yavsc.ApiControllers
public class BasketImpact
{
public string ProductRef { get; set; }
- public int count { get; set; }
+ public int Count { get; set; }
+ public string Message { get; set; }
}
}
diff --git a/web/Controllers/BlogsApiController.cs b/web/Controllers/BlogsApiController.cs
index e9c07f4e..103d3f68 100644
--- a/web/Controllers/BlogsApiController.cs
+++ b/web/Controllers/BlogsApiController.cs
@@ -12,7 +12,16 @@ namespace Yavsc.Controllers
{
public class BlogsApiController : Controller
{
- public void Tag (long postid,string tag) {
+ private const string adminRoleName = "Admin";
+ protected override void Initialize (System.Web.Routing.RequestContext requestContext)
+ {
+ base.Initialize (requestContext);
+ if (!Roles.RoleExists (adminRoleName)) {
+ Roles.CreateRole (adminRoleName);
+ }
+ }
+
+ public long Tag (long postid,string tag) {
BlogEntry e = BlogManager.GetPost (postid);
if (!Roles.IsUserInRole ("Admin")) {
string rguser = Membership.GetUser ().UserName;
@@ -23,6 +32,7 @@ namespace Yavsc.Controllers
e.UserName));
}
}
+ return BlogManager.Tag (postid, tag);
}
public static HttpStatusCodeResult RemovePost(string user, string title) {
@@ -44,6 +54,10 @@ namespace Yavsc.Controllers
BlogManager.RemovePost (user, title);
return new HttpStatusCodeResult (200);
}
+
+ public void RemoveTag(long tagid) {
+ throw new NotImplementedException ();
+ }
}
}
diff --git a/web/Controllers/FrontOfficeApiController.cs b/web/Controllers/FrontOfficeApiController.cs
index 6202e2c5..0887c020 100644
--- a/web/Controllers/FrontOfficeApiController.cs
+++ b/web/Controllers/FrontOfficeApiController.cs
@@ -13,6 +13,7 @@ using System.IO;
using System.Net;
using WorkFlowProvider;
using System.Web.Security;
+using yavscModel.WorkFlow;
namespace Yavsc.ApiControllers
{
@@ -66,17 +67,21 @@ namespace Yavsc.ApiControllers
return result;
}
+
+
+ [Authorize]
+ [HttpGet]
///
- /// Adds to basket, a product from the catalog, in the user's session.
+ /// Gets the estimate.
///
- /// The to basket.
- [HttpGet]
- public long AddToBasket (string prodref,int count, object prodparams=null)
+ /// The estimate.
+ /// Estid.
+ public Estimate GetEstimate (long estid)
{
- //TODO find the basket for Membership.GetUser().UserName
- //return WFManager.Write(estid << from the basket, desc, ucost, count, productid);
- throw new NotImplementedException ();
+ Estimate est = WFManager.ContentProvider.GetEstimate (estid);
+ return est;
}
+
}
}
diff --git a/web/Controllers/FrontOfficeController.cs b/web/Controllers/FrontOfficeController.cs
index ea4c9ab2..6242c160 100644
--- a/web/Controllers/FrontOfficeController.cs
+++ b/web/Controllers/FrontOfficeController.cs
@@ -10,14 +10,25 @@ using Yavsc.Controllers;
using System.Collections.Generic;
using yavscModel.WorkFlow;
using WorkFlowProvider;
+using System.Web.Security;
namespace Yavsc.Controllers
{
public class FrontOfficeController : Controller
{
[HttpGet]
- public Estimate GetEstimate(long estid) {
- return WFManager.GetEstimate (estid);
+ [HttpPost]
+ public ActionResult Estimate(Estimate e)
+ {
+ if (ModelState.IsValid) {
+ if (e.Id > 0) {
+ Estimate f = WFManager.GetEstimate (e.Id);
+ if (e.Owner != f.Owner)
+ if (!Roles.IsUserInRole ("FrontOffice"))
+ throw new UnauthorizedAccessException ("You're not allowed to modify this estimate");
+ }
+ }
+ return View (e);
}
[AcceptVerbs("GET")]
diff --git a/web/Controllers/HomeController.cs b/web/Controllers/HomeController.cs
index 95a15a10..c4e54ffb 100644
--- a/web/Controllers/HomeController.cs
+++ b/web/Controllers/HomeController.cs
@@ -60,12 +60,12 @@ namespace Yavsc.Controllers
public ActionResult Index ()
{
- InitCatalog ();
+ InitCulture ();
ViewData ["Message"] = string.Format(T.GetString("Welcome")+"({0})",GetType ().Assembly.FullName);
return View ();
}
- public void InitCatalog() {
+ public void InitCulture() {
CultureInfo culture = null;
string defaultCulture = "fr";
diff --git a/web/Controllers/T.cs b/web/Controllers/T.cs
index a212dbad..70fac62c 100644
--- a/web/Controllers/T.cs
+++ b/web/Controllers/T.cs
@@ -17,6 +17,5 @@ namespace Yavsc
{
return Mono.Unix.Catalog.GetString (msgid);
}
-
}
}
diff --git a/web/Controllers/WorkFlowController.cs b/web/Controllers/WorkFlowController.cs
index bcc1fd45..b3372ee9 100644
--- a/web/Controllers/WorkFlowController.cs
+++ b/web/Controllers/WorkFlowController.cs
@@ -14,6 +14,16 @@ namespace Yavsc.ApiControllers
[HttpControllerConfiguration(ActionValueBinder=typeof(Basic.MvcActionValueBinder))]
public class WorkFlowController : ApiController
{
+ string adminRoleName="Admin";
+
+ protected override void Initialize (HttpControllerContext controllerContext)
+ {
+ base.Initialize (controllerContext);
+ if (!Roles.RoleExists (adminRoleName)) {
+ Roles.CreateRole (adminRoleName);
+ }
+ }
+
[HttpGet]
[Authorize]
public long CreateEstimate (string title)
@@ -21,6 +31,7 @@ namespace Yavsc.ApiControllers
return WFManager.CreateEstimate (
Membership.GetUser().UserName,title);
}
+
[HttpGet]
[Authorize]
public void DropWritting(long wrid)
@@ -49,11 +60,7 @@ namespace Yavsc.ApiControllers
return new { test=string.Format("Hello {0}!",username) };
}
- [HttpGet]
- public object Order (BasketImpact bi)
- {
- return new { c="lmk,", message="Panier impacté", impactRef=bi.ProductRef, count=bi.count};
- }
+
[HttpGet]
[Authorize]
@@ -63,18 +70,7 @@ namespace Yavsc.ApiControllers
return WFManager.Write(estid, desc, ucost, count, productid);
}
- [Authorize]
- [HttpGet]
- ///
- /// Gets the estimate.
- ///
- /// The estimate.
- /// Estid.
- public Estimate GetEstimate (long estid)
- {
- Estimate est = WFManager.ContentProvider.GetEstimate (estid);
- return est;
- }
+
/*
public object Details(int id)
{
diff --git a/web/Models/App.master b/web/Models/App.master
index aac47956..0fb20616 100644
--- a/web/Models/App.master
+++ b/web/Models/App.master
@@ -32,17 +32,13 @@
-
-