diff --git a/SalesCatalog/Model/CheckBox.cs b/SalesCatalog/Model/CheckBox.cs index b1e37c20..91321fc7 100644 --- a/SalesCatalog/Model/CheckBox.cs +++ b/SalesCatalog/Model/CheckBox.cs @@ -7,12 +7,23 @@ namespace SalesCatalog.Model public CheckBox () { } + + #region implemented abstract members of FormInput + + + public override string Type { + get { + return "checkbox"; + } + } + public bool Value { get; set; } public override string ToHtml () { return string.Format ("", Id,Name,Value?"checked":""); } + #endregion } } diff --git a/SalesCatalog/Model/FilesInput.cs b/SalesCatalog/Model/FilesInput.cs index 8fd64376..06ab9ebb 100644 --- a/SalesCatalog/Model/FilesInput.cs +++ b/SalesCatalog/Model/FilesInput.cs @@ -4,6 +4,13 @@ namespace SalesCatalog.Model { public class FilesInput : FormInput { + #region implemented abstract members of FormInput + public override string Type { + get { + return "file"; + } + } + #endregion public FilesInput () { diff --git a/SalesCatalog/Model/FormInput.cs b/SalesCatalog/Model/FormInput.cs index 63a8e1d9..b6c5d2e1 100644 --- a/SalesCatalog/Model/FormInput.cs +++ b/SalesCatalog/Model/FormInput.cs @@ -13,6 +13,7 @@ namespace SalesCatalog.Model public string Id { get; set; } private string name=null; + public abstract string Type { get; } public string Name { get { return name == null ? Id : name; } set { name = value; } } } } diff --git a/SalesCatalog/Model/RadioButton.cs b/SalesCatalog/Model/RadioButton.cs index 2cb3917d..ecf36bf2 100644 --- a/SalesCatalog/Model/RadioButton.cs +++ b/SalesCatalog/Model/RadioButton.cs @@ -4,6 +4,16 @@ namespace SalesCatalog.Model { public class RadioButton:FormInput { + #region implemented abstract members of FormInput + + public override string Type { + get { + return "radio"; + } + } + + #endregion + public RadioButton () { } diff --git a/SalesCatalog/Model/SelectInput.cs b/SalesCatalog/Model/SelectInput.cs index 3b364172..a3e5e195 100644 --- a/SalesCatalog/Model/SelectInput.cs +++ b/SalesCatalog/Model/SelectInput.cs @@ -6,6 +6,16 @@ namespace SalesCatalog.Model { public class SelectInput: FormInput { + #region implemented abstract members of FormInput + + public override string Type { + get { + return "select"; + } + } + + #endregion + public Option[] Items; public int SelectedIndex; public override string ToHtml () diff --git a/SalesCatalog/Model/TextInput.cs b/SalesCatalog/Model/TextInput.cs index f3890b78..46bc1acf 100644 --- a/SalesCatalog/Model/TextInput.cs +++ b/SalesCatalog/Model/TextInput.cs @@ -4,9 +4,18 @@ namespace SalesCatalog.Model { public class TextInput:FormInput { + #region implemented abstract members of FormInput + public override string Type { + get { + return "text"; + } + } + #endregion + public TextInput () { } + public TextInput (string txt) { text = txt; diff --git a/WorkFlowProvider/WFManager.cs b/WorkFlowProvider/WFManager.cs index 196693c8..99432237 100644 --- a/WorkFlowProvider/WFManager.cs +++ b/WorkFlowProvider/WFManager.cs @@ -8,9 +8,14 @@ namespace WorkFlowProvider { public static class WFManager { + public static Estimate GetEstimate (long estid) + { + return ContentProvider.GetEstimate (estid); + } + public static void UpdateWritting (Writting wr) { - throw new NotImplementedException (); + ContentProvider.UpdateWritting (wr); } public static void DropWritting (long wrid) diff --git a/web/Controllers/BackOfficeController.cs b/web/Controllers/BackOfficeController.cs index 66c7c484..5f47af6d 100644 --- a/web/Controllers/BackOfficeController.cs +++ b/web/Controllers/BackOfficeController.cs @@ -44,7 +44,7 @@ namespace Yavsc.Controllers [Authorize(Roles="Admin")] public ActionResult CreateUserBackup(DataAccess datac,string username) { -throw new NotImplementedException(); + throw new NotImplementedException(); } diff --git a/web/Controllers/FileSystemController.cs b/web/Controllers/FileSystemController.cs index 6045fc94..310808c3 100644 --- a/web/Controllers/FileSystemController.cs +++ b/web/Controllers/FileSystemController.cs @@ -12,7 +12,7 @@ namespace Yavsc.Controllers { public class FileSystemController : Controller { - private static string usersDir ="users"; + private static string usersDir ="~/users"; public static string UsersDir { get { @@ -25,9 +25,10 @@ namespace Yavsc.Controllers { string user = Membership.GetUser ().UserName; ViewData ["UserName"] = user; + DirectoryInfo di = new DirectoryInfo ( Path.Combine( - UsersDir, + Server.MapPath(UsersDir), user)); if (!di.Exists) di.Create (); diff --git a/web/Controllers/FrontOfficeApiController.cs b/web/Controllers/FrontOfficeApiController.cs index 6c73ef9b..6202e2c5 100644 --- a/web/Controllers/FrontOfficeApiController.cs +++ b/web/Controllers/FrontOfficeApiController.cs @@ -66,10 +66,12 @@ namespace Yavsc.ApiControllers return result; } - + /// + /// Adds to basket, a product from the catalog, in the user's session. + /// + /// The to basket. [HttpGet] - [Authorize] - public long AddToBasket (string title) + public long AddToBasket (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); diff --git a/web/Controllers/FrontOfficeController.cs b/web/Controllers/FrontOfficeController.cs index c55a67de..ea4c9ab2 100644 --- a/web/Controllers/FrontOfficeController.cs +++ b/web/Controllers/FrontOfficeController.cs @@ -8,11 +8,18 @@ using System.Text.RegularExpressions; using System.IO; using Yavsc.Controllers; using System.Collections.Generic; +using yavscModel.WorkFlow; +using WorkFlowProvider; namespace Yavsc.Controllers { public class FrontOfficeController : Controller { + [HttpGet] + public Estimate GetEstimate(long estid) { + return WFManager.GetEstimate (estid); + } + [AcceptVerbs("GET")] public ActionResult Catalog () { diff --git a/web/Models/App.master b/web/Models/App.master index 3dd81396..aac47956 100644 --- a/web/Models/App.master +++ b/web/Models/App.master @@ -7,18 +7,14 @@ - - - - <%= Page.Title %> - <asp:Literal runat="server" Text=" - " /><%= YavscHelpers.SiteName %> - + -
+<%= Html.ActionLink( YavscHelpers.SiteName, "Index", "Home" ) %> + <% if (Membership.GetUser()==null) { %> <%= Html.ActionLink("Login", "Login", "Account", new { returnUrl=Request.Url.PathAndQuery }, null ) %> @@ -31,7 +27,7 @@ <%= Html.ActionLink( "Profile", "Profile", "Account" ) %> <% } %> - <%= Html.ActionLink( "Accueil", "Index", "Home" ) %> +
@@ -41,10 +37,9 @@

<%= Page.Title %> - - - <%= YavscHelpers.SiteName %> -

+ + + diff --git a/web/Views/Blogs/UserPost.aspx b/web/Views/Blogs/UserPost.aspx index a6cf64dd..ab6b0445 100644 --- a/web/Views/Blogs/UserPost.aspx +++ b/web/Views/Blogs/UserPost.aspx @@ -11,7 +11,7 @@ -
+
<% BBCodeHelper.Init(); %> <%= BBCodeHelper.Parser.ToHtml(Model.Content) %> @@ -39,5 +39,5 @@ <% } %>
-
+
diff --git a/web/Web.csproj b/web/Web.csproj index 700d1e50..0255b16e 100644 --- a/web/Web.csproj +++ b/web/Web.csproj @@ -221,6 +221,9 @@ + + + diff --git a/web/style.css b/web/style.css index aebc9989..b9dcb22a 100644 --- a/web/style.css +++ b/web/style.css @@ -78,9 +78,7 @@ label { font-size: small; } .blogpost { - border-top: solid 0.5px; - border-bottom: dashed 0.5px; - padding-top: 3px; + background-color: rgba(32,32,32,0.3); } .editblog { width: 95%;