Changeset 6218 for branches/WebApplication
- Timestamp:
- 05/17/11 11:34:35 (14 years ago)
- Location:
- branches/WebApplication/MVC2/HLWebOKBAdminPlugin
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/WebApplication/MVC2/HLWebOKBAdminPlugin/Controllers/AdminController.cs
r6142 r6218 12 12 using HLWebOKBAdminPlugin.Models; 13 13 14 namespace HLWebOKBAdminPlugin.Controllers 15 { 16 public class AdminController : Controller 17 { 14 namespace HLWebOKBAdminPlugin.Controllers { 15 public class AdminController : Controller { 18 16 private AdministrationServiceClient CertificateValidator() { 19 17 AdministrationServiceClient asc = new AdministrationServiceClient(); … … 39 37 AdminModel am = new AdminModel(); 40 38 Session["SelectedSubMenu"] = "AlgorithmClass"; 41 var algorithmClasses = am.AlgorithmClass GetAll();39 var algorithmClasses = am.AlgorithmClassProp; 42 40 43 41 return View(algorithmClasses); -
branches/WebApplication/MVC2/HLWebOKBAdminPlugin/HLWebOKBAdminPlugin.csproj
r6156 r6218 50 50 </PropertyGroup> 51 51 <ItemGroup> 52 <Reference Include="HLWebPluginHost, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> 53 <SpecificVersion>False</SpecificVersion> 52 <Reference Include="HLWebPluginHost"> 54 53 <HintPath>..\HeuristicLabWeb.PluginHost\HLWebPluginHost\bin\HLWebPluginHost.dll</HintPath> 55 54 </Reference> … … 89 88 <ItemGroup> 90 89 <Compile Include="Controllers\AdminController.cs" /> 90 <Compile Include="Controllers\AlgorithmController.cs" /> 91 91 <Compile Include="Controllers\HomeController.cs" /> 92 92 <Compile Include="Controllers\ProblemController.cs" /> … … 99 99 <Compile Include="Models\AdminModel.cs" /> 100 100 <Compile Include="Models\AlgorithmClassModel.cs" /> 101 <Compile Include="Models\AlgorithmModel.cs" /> 101 102 <Compile Include="Models\ProblemModel.cs" /> 102 103 <Compile Include="Properties\AssemblyInfo.cs" /> … … 142 143 <Content Include="Views\Admin\Problem.aspx" /> 143 144 <Content Include="Views\Admin\ProblemClass.aspx" /> 145 <Content Include="Views\Algorithm\Detail.aspx" /> 146 <Content Include="Views\Algorithm\Index.aspx" /> 144 147 <Content Include="Views\Home\About.aspx" /> 145 148 <Content Include="Views\Home\Index.aspx" /> -
branches/WebApplication/MVC2/HLWebOKBAdminPlugin/Models/AdminModel.cs
r6161 r6218 15 15 public IList<AlgorithmClass> AlgorithmClassProp { get { return AlgorithmClassGetAll(); } set { ;} } 16 16 17 17 18 18 //***************************************Algorithm Class******************************************** 19 19 //get all algorithm classes … … 23 23 algorithmClassList = new List<AlgorithmClass>(); 24 24 25 if 25 if(adminClient != null) { 26 26 AlgorithmClass[] algorithmClasses = adminClient.GetAlgorithmClasses(); 27 foreach 27 foreach(AlgorithmClass ac in algorithmClasses) { 28 28 algorithmClassList.Add(ac); 29 29 … … 37 37 AdministrationServiceClient adminClient = Admin.GetClientFactory(); 38 38 39 if 39 if(adminClient != null) { 40 40 return adminClient.AddAlgorithmClass(algorithmClass); 41 41 } … … 47 47 AdministrationServiceClient adminClient = Admin.GetClientFactory(); 48 48 49 if (adminClient != null){49 if(adminClient != null) { 50 50 adminClient.DeleteAlgorithmClass(id); 51 51 } … … 55 55 AdministrationServiceClient adminClient = Admin.GetClientFactory(); 56 56 57 if 58 if 57 if(adminClient != null) { 58 if(algorithmClass.Id == 0) { 59 59 return AddAlgorithmClass(algorithmClass); 60 } 61 else { 60 } else { 62 61 AlgorithmClass ac = adminClient.GetAlgorithmClass(algorithmClass.Id); 63 62 64 if 63 if(ac != null) { 65 64 adminClient.UpdateAlgorithmClass(algorithmClass); 66 65 return algorithmClass.Id; … … 79 78 IList<Algorithm> algorithmList = new List<Algorithm>(); 80 79 81 if 80 if(adminClient != null) { 82 81 Algorithm[] algorithm = adminClient.GetAlgorithms(); 83 foreach 82 foreach(Algorithm al in algorithm) { 84 83 algorithmList.Add(al); 85 84 … … 93 92 AdministrationServiceClient adminClient = Admin.GetClientFactory(); 94 93 95 if 94 if(adminClient != null) { 96 95 return adminClient.AddAlgorithm(algorithm); 97 96 } … … 103 102 AdministrationServiceClient adminClient = Admin.GetClientFactory(); 104 103 105 if 104 if(adminClient != null) { 106 105 adminClient.DeleteAlgorithm(id); 107 106 } … … 111 110 AdministrationServiceClient adminClient = Admin.GetClientFactory(); 112 111 113 if 114 if 112 if(adminClient != null) { 113 if(algorithm.Id == 0) { 115 114 return AddAlgorithm(algorithm); 116 } 117 else { 115 } else { 118 116 Algorithm al = adminClient.GetAlgorithm(algorithm.Id); 119 117 120 if 118 if(al != null) { 121 119 adminClient.UpdateAlgorithm(algorithm); 122 120 return algorithm.Id; … … 134 132 IList<ProblemClass> problemClassList = new List<ProblemClass>(); 135 133 136 if 134 if(adminClient != null) { 137 135 ProblemClass[] problemClasses = adminClient.GetProblemClasses(); 138 foreach 136 foreach(ProblemClass pc in problemClasses) { 139 137 problemClassList.Add(pc); 140 138 } … … 147 145 AdministrationServiceClient adminClient = Admin.GetClientFactory(); 148 146 149 if 147 if(adminClient != null) { 150 148 return adminClient.AddProblemClass(problemClass); 151 149 } … … 157 155 AdministrationServiceClient adminClient = Admin.GetClientFactory(); 158 156 159 if 157 if(adminClient != null) { 160 158 adminClient.DeleteProblemClass(id); 161 159 } … … 165 163 AdministrationServiceClient adminClient = Admin.GetClientFactory(); 166 164 167 if 168 if 165 if(adminClient != null) { 166 if(problemClass.Id == 0) { 169 167 return AddProblemClass(problemClass); 170 } 171 else { 168 } else { 172 169 ProblemClass pc = adminClient.GetProblemClass(problemClass.Id); 173 170 174 if 171 if(pc != null) { 175 172 adminClient.UpdateProblemClass(problemClass); 176 173 return problemClass.Id; … … 188 185 IList<Problem> problemList = new List<Problem>(); 189 186 190 if 187 if(adminClient != null) { 191 188 Problem[] problem = adminClient.GetProblems(); 192 foreach 189 foreach(Problem pr in problem) { 193 190 problemList.Add(pr); 194 191 … … 202 199 AdministrationServiceClient adminClient = Admin.GetClientFactory(); 203 200 204 if 201 if(adminClient != null) { 205 202 return adminClient.AddProblem(problem); 206 203 } … … 212 209 AdministrationServiceClient adminClient = Admin.GetClientFactory(); 213 210 214 if 211 if(adminClient != null) { 215 212 adminClient.DeleteProblem(id); 216 213 } … … 220 217 AdministrationServiceClient adminClient = Admin.GetClientFactory(); 221 218 222 if 223 if 219 if(adminClient != null) { 220 if(problem.Id == 0) { 224 221 return AddProblem(problem); 225 } 226 else { 222 } else { 227 223 Problem pr = adminClient.GetProblem(problem.Id); 228 224 229 if 225 if(pr != null) { 230 226 adminClient.UpdateProblem(problem); 231 227 return problem.Id; 232 228 } 233 } 229 } 234 230 } 235 231 -
branches/WebApplication/MVC2/HLWebOKBAdminPlugin/Web.config
r6050 r6218 110 110 </security> 111 111 </binding> 112 <binding name="AdministrationService2" closeTimeout="00:01:00" 113 openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" 114 bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" 115 maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" 116 textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false"> 117 <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" 118 maxBytesPerRead="4096" maxNameTableCharCount="16384" /> 119 <reliableSession ordered="true" inactivityTimeout="00:10:00" 120 enabled="false" /> 121 <security mode="Message"> 122 <transport clientCredentialType="Windows" proxyCredentialType="None" 123 realm="" /> 124 <message clientCredentialType="UserName" negotiateServiceCredential="true" 125 algorithmSuite="Default" /> 126 </security> 127 </binding> 112 128 </wsHttpBinding> 113 129 </bindings> … … 127 143 </identity> 128 144 </endpoint> 145 <endpoint address="http://services.heuristiclab.com/OKB.SPR-3.3/AdministrationService.svc" 146 binding="wsHttpBinding" bindingConfiguration="AdministrationService2" 147 contract="OKBAdministrationService.IAdministrationService" name="AdministrationService2"> 148 <identity> 149 <certificate encodedValue="AwAAAAEAAAAUAAAAwK1+2oAmcy/mI2P2QjyiJRh0y60gAAAAAQAAACoCAAAwggImMIIBj6ADAgECAhAIkseQ2EEhgU720qJA61gqMA0GCSqGSIb3DQEBBAUAMCQxIjAgBgNVBAMTGXNlcnZpY2VzLmhldXJpc3RpY2xhYi5jb20wHhcNMTAwNTExMTExNDAyWhcNMzkxMjMxMjM1OTU5WjAkMSIwIAYDVQQDExlzZXJ2aWNlcy5oZXVyaXN0aWNsYWIuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCq26Bwmwc7k+4W30qLQ2j+FInEL5BuH6opDY6CSlrtt3xQS/anrhvpbf3QghLDVINzcHkzbPmm/SguG4F85QLB6xO+tJaOvRo0iEK5g3c307vMIru7FJwk/OhplEQ5J1hbDgL3zOJlrWlgtqRVxCtVdF3XroI9BctOt1NkeKv9ewIDAQABo1kwVzBVBgNVHQEETjBMgBCjbgdYd4j5JgUuJ1Wo/GxroSYwJDEiMCAGA1UEAxMZc2VydmljZXMuaGV1cmlzdGljbGFiLmNvbYIQCJLHkNhBIYFO9tKiQOtYKjANBgkqhkiG9w0BAQQFAAOBgQAb/2xk2uQad68shSPl/uixWgvFI8WkxOTBopOLaLtDxwCeZ3mWVHdV9VnixHtThubnEBXAhYOCQSIXWtQuXFWO+gH3YyjTRJY5kTmXyuvBRTn3/so5SrQ7Rdlm9hf6E5YVX3tCjAy7ybUyaDUkQfmH5vmvgvpMzRfsJ1qhnUpJiQ==" /> 150 </identity> 151 </endpoint> 129 152 </client> 130 153 </system.serviceModel>
Note: See TracChangeset
for help on using the changeset viewer.