From 46441ec8ce5dbf4b12db7da2bce3490d35a25654 Mon Sep 17 00:00:00 2001 From: miladkdz Date: Wed, 18 Mar 2015 12:00:16 +0330 Subject: [PATCH] ad fixes --- Sevomin.WebFrontend.Controllers/HomeController.cs | 1 + Sevomin.WebFrontend/App_Start/RouteConfig.cs | 6 ++++++ Sevomin.WebFrontend/Views/Job/JobList.cshtml | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Sevomin.WebFrontend.Controllers/HomeController.cs b/Sevomin.WebFrontend.Controllers/HomeController.cs index 1869a98..261ca65 100644 --- a/Sevomin.WebFrontend.Controllers/HomeController.cs +++ b/Sevomin.WebFrontend.Controllers/HomeController.cs @@ -45,6 +45,7 @@ namespace Sevomin.WebFrontend.Controllers return HttpNotFound(); } ad.ClickCount++; + _adRepository.Save(); return Redirect(ad.Link); } } diff --git a/Sevomin.WebFrontend/App_Start/RouteConfig.cs b/Sevomin.WebFrontend/App_Start/RouteConfig.cs index d90bb37..2891cbd 100644 --- a/Sevomin.WebFrontend/App_Start/RouteConfig.cs +++ b/Sevomin.WebFrontend/App_Start/RouteConfig.cs @@ -15,6 +15,12 @@ namespace Sevomin.WebFrontend defaults: new { controller = "Base", action = "Error404" } ); + routes.MapRoute( + name: "Ads", + url: "ad/{id}", + defaults: new { controller = "Home", action = "Ads" } + ); + #region For Help routes.MapRoute( diff --git a/Sevomin.WebFrontend/Views/Job/JobList.cshtml b/Sevomin.WebFrontend/Views/Job/JobList.cshtml index 760e39a..1aa5cb4 100644 --- a/Sevomin.WebFrontend/Views/Job/JobList.cshtml +++ b/Sevomin.WebFrontend/Views/Job/JobList.cshtml @@ -18,7 +18,7 @@

@ad.Description

- مشاهده سایت + مشاهده سایت }