* BasketController.cs: adds comments,

and modifies the Create method
  profile

* BlogsController.cs: adds comments

* Global.asax.cs: (Revert to revision
  0ec856db45)

* Web.csproj: reomves the GoogleMapsHelpers library. It targets the
  MVC 4.0.0.0 assembly.
main
Paul Schneider 11 years ago
parent f54336852b
commit b00c1a8cd3
4 changed files with 64 additions and 11 deletions

@ -6,11 +6,14 @@ using System.Web.Security;
using System.Web.Http; using System.Web.Http;
using Yavsc.Model.WorkFlow; using Yavsc.Model.WorkFlow;
using System.Collections.Specialized; using System.Collections.Specialized;
using Yavsc.Model.FrontOffice;
namespace Yavsc.ApiControllers namespace Yavsc.ApiControllers
{ {
/// <summary> /// <summary>
/// Basket controller. /// Basket controller.
/// Maintains a collection of articles
/// qualified with name value pairs
/// </summary> /// </summary>
public class BasketController : ApiController public class BasketController : ApiController
{ {
@ -27,11 +30,58 @@ namespace Yavsc.ApiControllers
base.Initialize (controllerContext); base.Initialize (controllerContext);
wfmgr = new WorkFlowManager (); wfmgr = new WorkFlowManager ();
} }
[AcceptVerbs("GET")]
public long Create(string productId , NameValueCollection cmdParams) /// <summary>
/// Create the specified basket item using specified command parameters.
/// </summary>
/// <param name="cmdParams">Command parameters.</param>
[AcceptVerbs("CREATE")]
public long Create(NameValueCollection cmdParams)
{
throw new NotImplementedException ();
}
/// <summary>
/// Read the specified basket item.
/// </summary>
/// <param name="itemid">Itemid.</param>
[AcceptVerbs("READ")]
Commande Read(long itemid){
throw new NotImplementedException ();
}
/// <summary>
/// Update the specified item parameter using the specified value.
/// </summary>
/// <param name="itemid">Item identifier.</param>
/// <param name="param">Parameter name.</param>
/// <param name="value">Value.</param>
[AcceptVerbs("UPDATE")]
public void Update(long itemid, string param, string value)
{ {
throw new NotImplementedException (); throw new NotImplementedException ();
} }
/// <summary>
/// Delete the specified item.
/// </summary>
/// <param name="itemid">Item identifier.</param>
public void Delete(long itemid)
{
throw new NotImplementedException ();
}
/// <summary>
/// Post a file, as attached document to the specified
/// Item
/// </summary>
[AcceptVerbs("POST")]
public void Post(long itemId)
{
throw new NotImplementedException ();
}
} }
} }

@ -114,12 +114,16 @@ namespace Yavsc.Controllers
FindBlogEntryFlags sf = FindBlogEntryFlags.MatchUserName; FindBlogEntryFlags sf = FindBlogEntryFlags.MatchUserName;
ViewData ["SiteName"] = sitename; ViewData ["SiteName"] = sitename;
ViewData ["BlogUser"] = user; ViewData ["BlogUser"] = user;
// displays invisible items when the logged user is also the author
if (u != null) if (u != null)
if (u.UserName == user) if (u.UserName == user)
sf |= FindBlogEntryFlags.MatchInvisible; sf |= FindBlogEntryFlags.MatchInvisible;
// find entries
BlogEntryCollection c = BlogManager.FindPost (user, sf, pageIndex, pageSize, out tr); BlogEntryCollection c = BlogManager.FindPost (user, sf, pageIndex, pageSize, out tr);
// Get author's meta data
Profile bupr = AccountController.GetProfile (user); Profile bupr = AccountController.GetProfile (user);
ViewData ["BlogUserProfile"] = bupr; ViewData ["BlogUserProfile"] = bupr;
// Inform of listing meta data
ViewData ["BlogTitle"] = bupr.BlogTitle; ViewData ["BlogTitle"] = bupr.BlogTitle;
ViewData ["Avatar"] = bupr.avatar; ViewData ["Avatar"] = bupr.avatar;
ViewData ["PageIndex"] = pageIndex; ViewData ["PageIndex"] = pageIndex;

@ -37,11 +37,16 @@ namespace Yavsc
"Blog", "Blog",
"Blog/{user}/{title}", "Blog/{user}/{title}",
new { controller = "Blogs", action = "Index", user=UrlParameter.Optional, title = UrlParameter.Optional } new { controller = "Blogs", action = "Index", user=UrlParameter.Optional, title = UrlParameter.Optional }
); );
routes.MapRoute (
"Blogs",
"Blogs/{action}/{user}/{title}",
new { controller = "Blogs", action = "Index", user=UrlParameter.Optional, title = UrlParameter.Optional }
);
routes.MapRoute ( routes.MapRoute (
"Default", "Default",
"{controller}/{action}/{id}", "{controller}/{action}/{user}/{title}",
new { controller = "Home", action = "Index", id=UrlParameter.Optional} new { controller = "Blogs", action = "Index", user=UrlParameter.Optional, title = UrlParameter.Optional }
); );
} }
/// <summary> /// <summary>

@ -95,12 +95,6 @@
<HintPath>..\packages\PayPalCoreSDK.1.6.0\lib\net451\PayPalCoreSDK.dll</HintPath> <HintPath>..\packages\PayPalCoreSDK.1.6.0\lib\net451\PayPalCoreSDK.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Net.Http.Formatting" /> <Reference Include="System.Net.Http.Formatting" />
<Reference Include="GoogleMapsHelpers">
<HintPath>..\packages\GoogleMapsHelpers.0.1.4.1\lib\4.5\GoogleMapsHelpers.dll</HintPath>
</Reference>
<Reference Include="Mvc.GoogleMaps">
<HintPath>..\packages\MVC.GoogleMaps.1.0.0\lib\net45\Mvc.GoogleMaps.dll</HintPath>
</Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="Models\" /> <Folder Include="Models\" />

Loading…