Free cookie consent management tool by TermsFeed Policy Generator

Changeset 6218 for branches


Ignore:
Timestamp:
05/17/11 11:34:35 (14 years ago)
Author:
gschwarz
Message:

#1433 Updated Problem Control/View; Added Algorithm Control/View => bug still exist in SortDesc

Location:
branches/WebApplication/MVC2/HLWebOKBAdminPlugin
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/WebApplication/MVC2/HLWebOKBAdminPlugin/Controllers/AdminController.cs

    r6142 r6218  
    1212using HLWebOKBAdminPlugin.Models;
    1313
    14 namespace HLWebOKBAdminPlugin.Controllers
    15 {
    16     public class AdminController : Controller
    17     {
     14namespace HLWebOKBAdminPlugin.Controllers {
     15    public class AdminController : Controller {
    1816        private AdministrationServiceClient CertificateValidator() {
    1917            AdministrationServiceClient asc = new AdministrationServiceClient();
     
    3937            AdminModel am = new AdminModel();
    4038            Session["SelectedSubMenu"] = "AlgorithmClass";
    41             var algorithmClasses = am.AlgorithmClassGetAll();           
     39            var algorithmClasses = am.AlgorithmClassProp;
    4240
    4341            return View(algorithmClasses);
  • branches/WebApplication/MVC2/HLWebOKBAdminPlugin/HLWebOKBAdminPlugin.csproj

    r6156 r6218  
    5050  </PropertyGroup>
    5151  <ItemGroup>
    52     <Reference Include="HLWebPluginHost, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
    53       <SpecificVersion>False</SpecificVersion>
     52    <Reference Include="HLWebPluginHost">
    5453      <HintPath>..\HeuristicLabWeb.PluginHost\HLWebPluginHost\bin\HLWebPluginHost.dll</HintPath>
    5554    </Reference>
     
    8988  <ItemGroup>
    9089    <Compile Include="Controllers\AdminController.cs" />
     90    <Compile Include="Controllers\AlgorithmController.cs" />
    9191    <Compile Include="Controllers\HomeController.cs" />
    9292    <Compile Include="Controllers\ProblemController.cs" />
     
    9999    <Compile Include="Models\AdminModel.cs" />
    100100    <Compile Include="Models\AlgorithmClassModel.cs" />
     101    <Compile Include="Models\AlgorithmModel.cs" />
    101102    <Compile Include="Models\ProblemModel.cs" />
    102103    <Compile Include="Properties\AssemblyInfo.cs" />
     
    142143    <Content Include="Views\Admin\Problem.aspx" />
    143144    <Content Include="Views\Admin\ProblemClass.aspx" />
     145    <Content Include="Views\Algorithm\Detail.aspx" />
     146    <Content Include="Views\Algorithm\Index.aspx" />
    144147    <Content Include="Views\Home\About.aspx" />
    145148    <Content Include="Views\Home\Index.aspx" />
  • branches/WebApplication/MVC2/HLWebOKBAdminPlugin/Models/AdminModel.cs

    r6161 r6218  
    1515        public IList<AlgorithmClass> AlgorithmClassProp { get { return AlgorithmClassGetAll(); } set { ;} }
    1616
    17        
     17
    1818        //***************************************Algorithm Class********************************************
    1919        //get all algorithm classes
     
    2323            algorithmClassList = new List<AlgorithmClass>();
    2424
    25             if (adminClient != null) {
     25            if(adminClient != null) {
    2626                AlgorithmClass[] algorithmClasses = adminClient.GetAlgorithmClasses();
    27                 foreach (AlgorithmClass ac in algorithmClasses) {
     27                foreach(AlgorithmClass ac in algorithmClasses) {
    2828                    algorithmClassList.Add(ac);
    2929
     
    3737            AdministrationServiceClient adminClient = Admin.GetClientFactory();
    3838
    39             if (adminClient != null) {
     39            if(adminClient != null) {
    4040                return adminClient.AddAlgorithmClass(algorithmClass);
    4141            }
     
    4747            AdministrationServiceClient adminClient = Admin.GetClientFactory();
    4848
    49             if (adminClient != null){
     49            if(adminClient != null) {
    5050                adminClient.DeleteAlgorithmClass(id);
    5151            }
     
    5555            AdministrationServiceClient adminClient = Admin.GetClientFactory();
    5656
    57             if (adminClient != null) {
    58                 if (algorithmClass.Id == 0) {
     57            if(adminClient != null) {
     58                if(algorithmClass.Id == 0) {
    5959                    return AddAlgorithmClass(algorithmClass);
    60                 }
    61                 else {
     60                } else {
    6261                    AlgorithmClass ac = adminClient.GetAlgorithmClass(algorithmClass.Id);
    6362
    64                     if (ac != null) {
     63                    if(ac != null) {
    6564                        adminClient.UpdateAlgorithmClass(algorithmClass);
    6665                        return algorithmClass.Id;
     
    7978            IList<Algorithm> algorithmList = new List<Algorithm>();
    8079
    81             if (adminClient != null) {
     80            if(adminClient != null) {
    8281                Algorithm[] algorithm = adminClient.GetAlgorithms();
    83                 foreach (Algorithm al in algorithm) {
     82                foreach(Algorithm al in algorithm) {
    8483                    algorithmList.Add(al);
    8584
     
    9392            AdministrationServiceClient adminClient = Admin.GetClientFactory();
    9493
    95             if (adminClient != null) {
     94            if(adminClient != null) {
    9695                return adminClient.AddAlgorithm(algorithm);
    9796            }
     
    103102            AdministrationServiceClient adminClient = Admin.GetClientFactory();
    104103
    105             if (adminClient != null) {
     104            if(adminClient != null) {
    106105                adminClient.DeleteAlgorithm(id);
    107106            }
     
    111110            AdministrationServiceClient adminClient = Admin.GetClientFactory();
    112111
    113             if (adminClient != null) {
    114                 if (algorithm.Id == 0) {
     112            if(adminClient != null) {
     113                if(algorithm.Id == 0) {
    115114                    return AddAlgorithm(algorithm);
    116                 }
    117                 else {
     115                } else {
    118116                    Algorithm al = adminClient.GetAlgorithm(algorithm.Id);
    119117
    120                     if (al != null) {
     118                    if(al != null) {
    121119                        adminClient.UpdateAlgorithm(algorithm);
    122120                        return algorithm.Id;
     
    134132            IList<ProblemClass> problemClassList = new List<ProblemClass>();
    135133
    136             if (adminClient != null) {
     134            if(adminClient != null) {
    137135                ProblemClass[] problemClasses = adminClient.GetProblemClasses();
    138                 foreach (ProblemClass pc in problemClasses) {
     136                foreach(ProblemClass pc in problemClasses) {
    139137                    problemClassList.Add(pc);
    140138                }
     
    147145            AdministrationServiceClient adminClient = Admin.GetClientFactory();
    148146
    149             if (adminClient != null) {
     147            if(adminClient != null) {
    150148                return adminClient.AddProblemClass(problemClass);
    151149            }
     
    157155            AdministrationServiceClient adminClient = Admin.GetClientFactory();
    158156
    159             if (adminClient != null) {
     157            if(adminClient != null) {
    160158                adminClient.DeleteProblemClass(id);
    161159            }
     
    165163            AdministrationServiceClient adminClient = Admin.GetClientFactory();
    166164
    167             if (adminClient != null) {
    168                 if (problemClass.Id == 0) {
     165            if(adminClient != null) {
     166                if(problemClass.Id == 0) {
    169167                    return AddProblemClass(problemClass);
    170                 }
    171                 else {
     168                } else {
    172169                    ProblemClass pc = adminClient.GetProblemClass(problemClass.Id);
    173170
    174                     if (pc != null) {
     171                    if(pc != null) {
    175172                        adminClient.UpdateProblemClass(problemClass);
    176173                        return problemClass.Id;
     
    188185            IList<Problem> problemList = new List<Problem>();
    189186
    190             if (adminClient != null) {
     187            if(adminClient != null) {
    191188                Problem[] problem = adminClient.GetProblems();
    192                 foreach (Problem pr in problem) {
     189                foreach(Problem pr in problem) {
    193190                    problemList.Add(pr);
    194191
     
    202199            AdministrationServiceClient adminClient = Admin.GetClientFactory();
    203200
    204             if (adminClient != null) {
     201            if(adminClient != null) {
    205202                return adminClient.AddProblem(problem);
    206203            }
     
    212209            AdministrationServiceClient adminClient = Admin.GetClientFactory();
    213210
    214             if (adminClient != null) {
     211            if(adminClient != null) {
    215212                adminClient.DeleteProblem(id);
    216213            }
     
    220217            AdministrationServiceClient adminClient = Admin.GetClientFactory();
    221218
    222             if (adminClient != null) {
    223                 if (problem.Id == 0) {
     219            if(adminClient != null) {
     220                if(problem.Id == 0) {
    224221                    return AddProblem(problem);
    225                 }
    226                 else {
     222                } else {
    227223                    Problem pr = adminClient.GetProblem(problem.Id);
    228224
    229                     if (pr != null) {
     225                    if(pr != null) {
    230226                        adminClient.UpdateProblem(problem);
    231227                        return problem.Id;
    232228                    }
    233                 }               
     229                }
    234230            }
    235231
  • branches/WebApplication/MVC2/HLWebOKBAdminPlugin/Web.config

    r6050 r6218  
    110110          </security>
    111111        </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>
    112128      </wsHttpBinding>
    113129    </bindings>
     
    127143        </identity>
    128144      </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>
    129152    </client>
    130153  </system.serviceModel>
Note: See TracChangeset for help on using the changeset viewer.