From d1f76f4902cce12090179f3e5759d183efaf3469 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Thu, 13 Nov 2014 14:57:48 +0100 Subject: [PATCH] Fixes the default of lines at updating --- web/Controllers/FrontOfficeController.cs | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/web/Controllers/FrontOfficeController.cs b/web/Controllers/FrontOfficeController.cs index 73e8d693..b2850e22 100644 --- a/web/Controllers/FrontOfficeController.cs +++ b/web/Controllers/FrontOfficeController.cs @@ -46,7 +46,6 @@ namespace Yavsc.Controllers && username != model.Client && !Roles.IsUserInRole ("FrontOffice")) throw new UnauthorizedAccessException ("You're not allowed to view this estimate"); - } } else { string username = HttpContext.User.Identity.Name; @@ -64,16 +63,15 @@ namespace Yavsc.Controllers model = WorkFlowManager.CreateEstimate ( username, model.Client, model.Title, model.Description); - else + else { WorkFlowManager.UpdateEstimate (model); - + model = WorkFlowManager.GetEstimate (model.Id); + } } } return View(model); } - - [AcceptVerbs("GET")] public ActionResult Catalog () { @@ -81,6 +79,7 @@ namespace Yavsc.Controllers CatalogManager.GetCatalog () ); } + /// /// Catalog this instance. /// @@ -136,7 +135,6 @@ namespace Yavsc.Controllers p.CommandForm = b.DefaultForm; return View ((p is Service)?"Service":"Product", p); - } public ActionResult Command() @@ -178,12 +176,11 @@ namespace Yavsc.Controllers // Add specified product command to the basket, basket.Add(new Commande(0,0,collection)); return View (collection); - } catch (Exception e) { + } catch (Exception e) + { ViewData ["Message"] = "Exception:"+e.Message; return View (collection); } } - } } -