Changeset 9556 for branches/OaaS
- Timestamp:
- 05/29/13 15:01:23 (11 years ago)
- Location:
- branches/OaaS
- Files:
-
- 12 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OaaS/HeuristicLab 3.3 Services.sln
r9550 r9556 39 39 Release.AspNetCompiler.FixedNames = "false" 40 40 Release.AspNetCompiler.Debug = "False" 41 VWDPort = " 25129"41 VWDPort = "19288" 42 42 VWDVirtualPath = "/Hive-3.3" 43 43 DefaultWebSiteLanguage = "Visual C#" -
branches/OaaS/HeuristicLab.Services.Optimization.Billing/HeuristicLab.Services.Optimization.Billing.csproj
r9550 r9556 43 43 <ItemGroup> 44 44 <Compile Include="Interfaces\IOptimizationBilling.cs" /> 45 <Compile Include="MockupOptimizationBilling.cs" /> 45 46 <Compile Include="Model\Model.cs" /> 46 47 <Compile Include="Properties\AssemblyInfo.cs" /> -
branches/OaaS/HeuristicLab.Services.Optimization.Billing/Model/Model.cs
r9550 r9556 34 34 35 35 public class User { 36 public string Name { get; set; } 36 37 } 37 38 … … 53 54 public DateTime ActiveUntil { get; set; } 54 55 public IList<Invoice> Invoices { get; set; } 56 public IList<OrderLine> OrderLines { get; set; } 55 57 } 56 58 -
branches/OaaS/HeuristicLab.Services.Optimization.ControllerService.Tests/HeuristicLab.Services.Optimization.ControllerService.Tests.csproj
r9166 r9556 182 182 </ItemGroup> 183 183 <ItemGroup> 184 <None Include=" app.config">184 <None Include="mappings\app.config"> 185 185 <SubType>Designer</SubType> 186 186 </None> -
branches/OaaS/HeuristicLab.Services.Optimization.Web/Controllers/AccountController.cs
r8384 r9556 56 56 } 57 57 58 59 ////60 //// GET: /Account/Register61 58 62 //public ActionResult Register() { 63 // return View(); 64 //} 59 // 60 // GET: /Account/Register 65 61 66 //// 67 //// POST: /Account/Register 62 public ActionResult Register() { 63 return View(); 64 } 68 65 69 //[HttpPost] 70 //public ActionResult Register(RegisterModel model) { 71 // if (ModelState.IsValid) { 72 // // Attempt to register the user 73 // MembershipCreateStatus createStatus; 74 // Membership.CreateUser(model.UserName, model.Password, model.Email, null, null, true, null, out createStatus); 66 // 67 // POST: /Account/Register 75 68 76 // if (createStatus == MembershipCreateStatus.Success) { 77 // FormsAuthentication.SetAuthCookie(model.UserName, false /* createPersistentCookie */); 78 // return RedirectToAction("Index", "Home"); 79 // } 80 // else { 81 // ModelState.AddModelError("", ErrorCodeToString(createStatus)); 82 // } 83 // } 69 [HttpPost] 70 public ActionResult Register(RegisterModel model) { 71 if (ModelState.IsValid) { 72 // Attempt to register the user 73 MembershipCreateStatus createStatus; 74 Membership.CreateUser(model.UserName, model.Password, model.Email, null, null, true, null, out createStatus); 75 if (createStatus == MembershipCreateStatus.Success) { 76 Roles.AddUserToRole(model.UserName, "Web User"); 77 Roles.AddUserToRole(model.UserName, "Hive User"); 78 FormsAuthentication.SetAuthCookie(model.UserName, false /* createPersistentCookie */); 79 return RedirectToAction("Index", "Home"); 80 } 81 else { 82 ModelState.AddModelError("", ErrorCodeToString(createStatus)); 83 } 84 } 84 85 85 //// If we got this far, something failed, redisplay form86 //return View(model);87 //}86 // If we got this far, something failed, redisplay form 87 return View(model); 88 } 88 89 89 // //90 // //GET: /Account/ChangePassword90 // 91 // GET: /Account/ChangePassword 91 92 92 //[Authorize]93 //public ActionResult ChangePassword() {94 //return View();95 //}93 [Authorize] 94 public ActionResult ChangePassword() { 95 return View(); 96 } 96 97 97 // //98 // //POST: /Account/ChangePassword98 // 99 // POST: /Account/ChangePassword 99 100 100 //[Authorize]101 //[HttpPost]102 //public ActionResult ChangePassword(ChangePasswordModel model) {103 //if (ModelState.IsValid) {101 [Authorize] 102 [HttpPost] 103 public ActionResult ChangePassword(ChangePasswordModel model) { 104 if (ModelState.IsValid) { 104 105 105 //// ChangePassword will throw an exception rather106 //// than return false in certain failure scenarios.107 //bool changePasswordSucceeded;108 //try {109 //MembershipUser currentUser = Membership.GetUser(User.Identity.Name, true /* userIsOnline */);110 //changePasswordSucceeded = currentUser.ChangePassword(model.OldPassword, model.NewPassword);111 //}112 //catch (Exception) {113 //changePasswordSucceeded = false;114 //}106 // ChangePassword will throw an exception rather 107 // than return false in certain failure scenarios. 108 bool changePasswordSucceeded; 109 try { 110 MembershipUser currentUser = Membership.GetUser(User.Identity.Name, true /* userIsOnline */); 111 changePasswordSucceeded = currentUser.ChangePassword(model.OldPassword, model.NewPassword); 112 } 113 catch (Exception) { 114 changePasswordSucceeded = false; 115 } 115 116 116 //if (changePasswordSucceeded) {117 //return RedirectToAction("ChangePasswordSuccess");118 //}119 //else {120 //ModelState.AddModelError("", "The current password is incorrect or the new password is invalid.");121 //}122 //}117 if (changePasswordSucceeded) { 118 return RedirectToAction("ChangePasswordSuccess"); 119 } 120 else { 121 ModelState.AddModelError("", "The current password is incorrect or the new password is invalid."); 122 } 123 } 123 124 124 //// If we got this far, something failed, redisplay form125 //return View(model);126 //}125 // If we got this far, something failed, redisplay form 126 return View(model); 127 } 127 128 128 // //129 // //GET: /Account/ChangePasswordSuccess129 // 130 // GET: /Account/ChangePasswordSuccess 130 131 131 //public ActionResult ChangePasswordSuccess() {132 //return View();133 //}132 public ActionResult ChangePasswordSuccess() { 133 return View(); 134 } 134 135 135 136 #region Status Codes -
branches/OaaS/HeuristicLab.Services.Optimization.Web/HeuristicLab.Services.Optimization.Web.csproj
r9549 r9556 127 127 <Compile Include="Controllers\HomeController.cs" /> 128 128 <Compile Include="Controllers\JobController.cs" /> 129 <Compile Include="Controllers\OrderAdminController.cs" /> 130 <Compile Include="Controllers\OrderController.cs" /> 129 131 <Compile Include="Global.asax.cs"> 130 132 <DependentUpon>Global.asax</DependentUpon> … … 135 137 <Compile Include="Models\AdminModels.cs" /> 136 138 <Compile Include="Models\ChartModels.cs" /> 139 <Compile Include="Models\OrderAdminModel.cs" /> 137 140 <Compile Include="Models\ExperimentModel.cs" /> 138 141 <Compile Include="Models\OptimizationModels.cs" /> 142 <Compile Include="Models\OrderModel.cs" /> 139 143 <Compile Include="Models\StatusModel.cs" /> 140 144 <Compile Include="Properties\AssemblyInfo.cs" /> … … 364 368 </ItemGroup> 365 369 <ItemGroup> 370 <ProjectReference Include="..\HeuristicLab.Services.Optimization.Billing\HeuristicLab.Services.Optimization.Billing.csproj"> 371 <Project>{5DC3E4F1-E21B-4C18-8921-88058E86FB07}</Project> 372 <Name>HeuristicLab.Services.Optimization.Billing</Name> 373 </ProjectReference> 366 374 <ProjectReference Include="..\HeuristicLab.Services.Optimization.Controller\HeuristicLab.Services.Optimization.ControllerService.csproj"> 367 375 <Project>{E0095F29-604B-4EE8-9EE8-8187DA3B24F1}</Project> … … 380 388 <Content Include="Views\Experiment\NewEdit.cshtml" /> 381 389 <Content Include="Views\Job\Index.cshtml" /> 390 <Content Include="Views\Order\Index.cshtml" /> 391 <Content Include="Views\Order\AddProduct.cshtml" /> 392 <Content Include="Views\Order\SaveOrder.cshtml" /> 393 <Content Include="Views\Order\OrderSaved.cshtml" /> 394 <Content Include="Views\OrderAdmin\Index.cshtml" /> 382 395 </ItemGroup> 383 396 <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
Note: See TracChangeset
for help on using the changeset viewer.