Index: branches/WebApplication/MVC2/HLWebOKBAdminPlugin/Models/AdminModel.cs
===================================================================
--- branches/WebApplication/MVC2/HLWebOKBAdminPlugin/Models/AdminModel.cs	(revision 6160)
+++ branches/WebApplication/MVC2/HLWebOKBAdminPlugin/Models/AdminModel.cs	(revision 6161)
@@ -13,9 +13,10 @@
 
         public String SelectedSubMenu { get; set; }
-        public IList<AlgorithmClass> AlgorithmClassProp { get { return algorithmClassList; } set { ;} }
-
+        public IList<AlgorithmClass> AlgorithmClassProp { get { return AlgorithmClassGetAll(); } set { ;} }
+
+       
         //***************************************Algorithm Class********************************************
         //get all algorithm classes
-        public IList<AlgorithmClass> AlgorithmClassGetAll() {
+        private IList<AlgorithmClass> AlgorithmClassGetAll() {
             AdministrationServiceClient adminClient = Admin.GetClientFactory();
 
@@ -33,13 +34,9 @@
         }//AlgorithmClassGetAll
 
-        public long AddAlgorithmClass(string name, string description) {
-            AdministrationServiceClient adminClient = Admin.GetClientFactory();
-
-            if (adminClient != null) {
-                AlgorithmClass ac = new AlgorithmClass();
-                ac.Description = description;
-                ac.Name = name;
-
-                return adminClient.AddAlgorithmClass(ac);
+        private long AddAlgorithmClass(AlgorithmClass algorithmClass) {
+            AdministrationServiceClient adminClient = Admin.GetClientFactory();
+
+            if (adminClient != null) {
+                return adminClient.AddAlgorithmClass(algorithmClass);
             }
 
@@ -55,19 +52,23 @@
         }//DeleteAlgorithmClass
 
-        public void UpdateAlgorithmClass(long id, string name, string description) {
-            AdministrationServiceClient adminClient = Admin.GetClientFactory();
-
-            if (adminClient != null) {
-                AlgorithmClass ac = adminClient.GetAlgorithmClass(id);
-
-                if (ac != null) {
-                    ac.Id = id;
-                    ac.Name = name;
-                    ac.Description = description;
-
-                    adminClient.UpdateAlgorithmClass(ac);
-                }
-            }
-        }//UpdateAlgorithmClass
+        public long SaveAlgorithmClass(AlgorithmClass algorithmClass) {
+            AdministrationServiceClient adminClient = Admin.GetClientFactory();
+
+            if (adminClient != null) {
+                if (algorithmClass.Id == 0) {
+                    return AddAlgorithmClass(algorithmClass);
+                }
+                else {
+                    AlgorithmClass ac = adminClient.GetAlgorithmClass(algorithmClass.Id);
+
+                    if (ac != null) {
+                        adminClient.UpdateAlgorithmClass(algorithmClass);
+                        return algorithmClass.Id;
+                    }
+                }
+            }
+
+            return 0;
+        }//SaveAlgorithmClass       
 
         //***************************************Algorithms*************************************************
@@ -89,15 +90,9 @@
         }//AlgorithmsGetAll
 
-        public long AddAlgorithm(string name, string description, string dataTypeName, string dataTypeTypeName) {
-            AdministrationServiceClient adminClient = Admin.GetClientFactory();
-
-            if (adminClient != null) {
-                Algorithm al = new Algorithm();
-                al.DataTypeName = dataTypeName;
-                al.DataTypeTypeName = dataTypeTypeName; 
-                al.Description = description; 
-                al.Name = name;
-
-                return adminClient.AddAlgorithm(al);
+        private long AddAlgorithm(Algorithm algorithm) {
+            AdministrationServiceClient adminClient = Admin.GetClientFactory();
+
+            if (adminClient != null) {
+                return adminClient.AddAlgorithm(algorithm);
             }
 
@@ -113,20 +108,23 @@
         }//DeleteAlgorithm
 
-        public void UpdateAlgorithm(long id, string name, string description, string dataTypeName, string dataTypeTypeName) {
-            AdministrationServiceClient adminClient = Admin.GetClientFactory();
-
-            if (adminClient != null) {
-                Algorithm al = adminClient.GetAlgorithm(id);
-
-                if (al != null){
-                    al.DataTypeName = dataTypeName;
-                    al.DataTypeTypeName = dataTypeTypeName;
-                    al.Description = description;
-                    al.Name = name;
-
-                    adminClient.UpdateAlgorithm(al);
-                }
-            }
-        }//UpdateAlgorithm
+        public long SaveAlgorithm(Algorithm algorithm) {
+            AdministrationServiceClient adminClient = Admin.GetClientFactory();
+
+            if (adminClient != null) {
+                if (algorithm.Id == 0) {
+                    return AddAlgorithm(algorithm);
+                }
+                else {
+                    Algorithm al = adminClient.GetAlgorithm(algorithm.Id);
+
+                    if (al != null) {
+                        adminClient.UpdateAlgorithm(algorithm);
+                        return algorithm.Id;
+                    }
+                }
+            }
+
+            return 0;
+        }//SaveAlgorithm
 
         //***************************************Problem Class**********************************************
@@ -146,13 +144,9 @@
         }//ProblemClassGetAll
 
-        public long AddProblemClass(string name, string description) {
-            AdministrationServiceClient adminClient = Admin.GetClientFactory();
-
-            if (adminClient != null) {
-                ProblemClass pc = new ProblemClass();
-                pc.Description = description;
-                pc.Name = name;
-
-                return adminClient.AddProblemClass(pc);
+        private long AddProblemClass(ProblemClass problemClass) {
+            AdministrationServiceClient adminClient = Admin.GetClientFactory();
+
+            if (adminClient != null) {
+                return adminClient.AddProblemClass(problemClass);
             }
 
@@ -168,19 +162,23 @@
         }//DeleteProblemClass
 
-        public void UpdateProblemClass(long id, string name, string description) {
-            AdministrationServiceClient adminClient = Admin.GetClientFactory();
-
-            if (adminClient != null) {
-                ProblemClass pc = adminClient.GetProblemClass(id);
-                
-                if (pc != null){
-                    pc.Id = id;
-                    pc.Name = name;
-                    pc.Description = description;
-
-                    adminClient.UpdateProblemClass(pc);
-                }
-            }
-        }//UpdateProblemClass
+        public long SaveProblemClass(ProblemClass problemClass) {
+            AdministrationServiceClient adminClient = Admin.GetClientFactory();
+
+            if (adminClient != null) {
+                if (problemClass.Id == 0) {
+                    return AddProblemClass(problemClass);
+                }
+                else {
+                    ProblemClass pc = adminClient.GetProblemClass(problemClass.Id);
+
+                    if (pc != null) {
+                        adminClient.UpdateProblemClass(problemClass);
+                        return problemClass.Id;
+                    }
+                }
+            }
+
+            return 0;
+        }//SaveProblemClass
 
         //***************************************Problems***************************************************
@@ -201,15 +199,9 @@
         }//ProblemsGetAll
 
-        public long AddProblem(string name, string description, string dataTypeName, string dataTypeTypeName) {
-            AdministrationServiceClient adminClient = Admin.GetClientFactory();
-
-            if (adminClient != null) {
-                Problem pr = new Problem();
-                pr.DataTypeName = dataTypeName;
-                pr.DataTypeTypeName = dataTypeTypeName;
-                pr.Description = description;
-                pr.Name = name;
-
-                return adminClient.AddProblem(pr);
+        private long AddProblem(Problem problem) {
+            AdministrationServiceClient adminClient = Admin.GetClientFactory();
+
+            if (adminClient != null) {
+                return adminClient.AddProblem(problem);
             }
 
@@ -225,20 +217,23 @@
         }//DeleteProblem
 
-        public void UpdateProblem(long id, string name, string description, string dataTypeName, string dataTypeTypeName) {
-            AdministrationServiceClient adminClient = Admin.GetClientFactory();
-
-            if (adminClient != null) {
-                Problem pr = adminClient.GetProblem(id);
-                
-                if (pr != null) {
-                    pr.DataTypeName = dataTypeName;
-                    pr.DataTypeTypeName = dataTypeTypeName;
-                    pr.Description = description;
-                    pr.Name = name;
-
-                    adminClient.UpdateProblem(pr);
-                }
-            }
-        }//UpdateProblem
+        public long SaveProblem(Problem problem) {
+            AdministrationServiceClient adminClient = Admin.GetClientFactory();
+
+            if (adminClient != null) {
+                if (problem.Id == 0) {
+                    return AddProblem(problem);
+                }
+                else {
+                    Problem pr = adminClient.GetProblem(problem.Id);
+
+                    if (pr != null) {
+                        adminClient.UpdateProblem(problem);
+                        return problem.Id;
+                    }
+                }                
+            }
+
+            return 0;
+        }//SaveProblem
     }
 }
Index: branches/WebApplication/MVC2/HLWebOKBAdminPlugin/Models/AlgorithmClassModel.cs
===================================================================
--- branches/WebApplication/MVC2/HLWebOKBAdminPlugin/Models/AlgorithmClassModel.cs	(revision 6160)
+++ branches/WebApplication/MVC2/HLWebOKBAdminPlugin/Models/AlgorithmClassModel.cs	(revision 6161)
@@ -16,5 +16,39 @@
         public AlgorithmClass AlgorithmClass { get; set; }
 
+        public AlgorithmClassModel() {
+            AlgorithmClass = new AlgorithmClass();
+        }//AlgorithmClassModel
+
         //***************************************Algorithm Class********************************************
+        private IList<Platform> PlatformsGetAll() {
+            AdministrationServiceClient adminClient = Admin.GetClientFactory();
+
+            IList<Platform> platformList = new List<Platform>();
+
+            if (adminClient != null) {
+                Platform[] platforms = adminClient.GetPlatforms();
+                foreach (Platform pl in platforms) {
+                    platformList.Add(pl);
+                }
+            }//if (adminClient != null)
+
+            return platformList;
+        }//ProblemClassGetAll
+
+        private IList<ProblemClass> ProblemClassGetAll() {
+            AdministrationServiceClient adminClient = Admin.GetClientFactory();
+
+            IList<ProblemClass> problemClassList = new List<ProblemClass>();
+
+            if (adminClient != null) {
+                ProblemClass[] problemClasses = adminClient.GetProblemClasses();
+                foreach (ProblemClass pc in problemClasses) {
+                    problemClassList.Add(pc);
+                }
+            }//if (adminClient != null)
+
+            return problemClassList;
+        }//ProblemClassGetAll
+
         //get all algorithm classes
         private IList<AlgorithmClass> AlgorithmClassGetAll() {
Index: branches/WebApplication/MVC2/HLWebOKBAdminPlugin/Models/AlgorithmModel.cs
===================================================================
--- branches/WebApplication/MVC2/HLWebOKBAdminPlugin/Models/AlgorithmModel.cs	(revision 6161)
+++ branches/WebApplication/MVC2/HLWebOKBAdminPlugin/Models/AlgorithmModel.cs	(revision 6161)
@@ -0,0 +1,107 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using HLWebOKBAdminPlugin.OKBAdministrationService;
+using HLWebOKBAdminPlugin.Helpers;
+
+namespace HLWebOKBAdminPlugin.Models {
+    public class AlgorithmModel {
+        
+        public String SelectedSubMenu { get; set; }
+        public IList<Algorithm> Algorithms { get { return AlgorithmsGetAll(); } }
+
+        public Algorithm Algorithm { get; set; }
+
+        public AlgorithmModel() {
+            Algorithm = new Algorithm();
+        }//AlgorithmModel
+
+        //***************************************Algorithms*************************************************
+        private IList<Platform> PlatformsGetAll() {
+            AdministrationServiceClient adminClient = Admin.GetClientFactory();
+
+            IList<Platform> platformList = new List<Platform>();
+
+            if (adminClient != null) {
+                Platform[] platforms = adminClient.GetPlatforms();
+                foreach (Platform pl in platforms) {
+                    platformList.Add(pl);
+                }
+            }//if (adminClient != null)
+
+            return platformList;
+        }//ProblemClassGetAll
+
+        private IList<ProblemClass> ProblemClassGetAll() {
+            AdministrationServiceClient adminClient = Admin.GetClientFactory();
+
+            IList<ProblemClass> problemClassList = new List<ProblemClass>();
+
+            if (adminClient != null) {
+                ProblemClass[] problemClasses = adminClient.GetProblemClasses();
+                foreach (ProblemClass pc in problemClasses) {
+                    problemClassList.Add(pc);
+                }
+            }//if (adminClient != null)
+
+            return problemClassList;
+        }//ProblemClassGetAll
+
+        //get all algorithms
+        private IList<Algorithm> AlgorithmsGetAll() {
+            AdministrationServiceClient adminClient = Admin.GetClientFactory();
+
+            IList<Algorithm> algorithmList = new List<Algorithm>();
+
+            if (adminClient != null) {
+                Algorithm[] algorithm = adminClient.GetAlgorithms();
+                foreach (Algorithm al in algorithm) {
+                    algorithmList.Add(al);
+
+                }
+            }//if (adminClient != null)
+
+            return algorithmList;
+        }//AlgorithmsGetAll
+
+        private long AddAlgorithm(Algorithm algorithm) {
+            AdministrationServiceClient adminClient = Admin.GetClientFactory();
+
+            if (adminClient != null) {
+                return adminClient.AddAlgorithm(algorithm);
+            }
+
+            return 0;
+        }//AddAlgorithm
+
+        public void DeleteAlgorithm(long id) {
+            AdministrationServiceClient adminClient = Admin.GetClientFactory();
+
+            if (adminClient != null) {
+                adminClient.DeleteAlgorithm(id);
+            }
+        }//DeleteAlgorithm
+
+        public long SaveAlgorithm(Algorithm algorithm) {
+            AdministrationServiceClient adminClient = Admin.GetClientFactory();
+
+            if (adminClient != null) {
+                if (algorithm.Id == 0) {
+                    return AddAlgorithm(algorithm);
+                }
+                else {
+                    Algorithm al = adminClient.GetAlgorithm(algorithm.Id);
+
+                    if (al != null) {
+                        adminClient.UpdateAlgorithm(algorithm);
+                        return algorithm.Id;
+                    }
+                }
+            }
+
+            return 0;
+        }//SaveAlgorithm
+        
+    }
+}
Index: branches/WebApplication/MVC2/HLWebOKBAdminPlugin/Models/ProblemClassModel.cs
===================================================================
--- branches/WebApplication/MVC2/HLWebOKBAdminPlugin/Models/ProblemClassModel.cs	(revision 6161)
+++ branches/WebApplication/MVC2/HLWebOKBAdminPlugin/Models/ProblemClassModel.cs	(revision 6161)
@@ -0,0 +1,89 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using HLWebOKBAdminPlugin.OKBAdministrationService;
+using HLWebOKBAdminPlugin.Helpers;
+
+namespace HLWebOKBAdminPlugin.Models {
+    public class ProblemClassModel {        
+
+        public String SelectedSubMenu { get; set; }
+        public IList<ProblemClass> ProblemClasses { get { return ProblemClassGetAll(); } }
+
+        public ProblemClass ProblemClass { get; set; }
+
+        public ProblemClassModel() {
+            ProblemClass = new ProblemClass();
+        }//ProblemClassModel
+
+        //***************************************Problem Class**********************************************
+        private IList<Platform> PlatformsGetAll() {
+            AdministrationServiceClient adminClient = Admin.GetClientFactory();
+
+            IList<Platform> platformList = new List<Platform>();
+
+            if (adminClient != null) {
+                Platform[] platforms = adminClient.GetPlatforms();
+                foreach (Platform pl in platforms) {
+                    platformList.Add(pl);
+                }
+            }//if (adminClient != null)
+
+            return platformList;
+        }//ProblemClassGetAll
+        
+        private IList<ProblemClass> ProblemClassGetAll() {
+            AdministrationServiceClient adminClient = Admin.GetClientFactory();
+
+            IList<ProblemClass> problemClassList = new List<ProblemClass>();
+
+            if (adminClient != null) {
+                ProblemClass[] problemClasses = adminClient.GetProblemClasses();
+                foreach (ProblemClass pc in problemClasses) {
+                    problemClassList.Add(pc);
+                }
+            }//if (adminClient != null)
+
+            return problemClassList;
+        }//ProblemClassGetAll
+
+        private long AddProblemClass(ProblemClass problemClass) {
+            AdministrationServiceClient adminClient = Admin.GetClientFactory();
+
+            if (adminClient != null) {
+                return adminClient.AddProblemClass(problemClass);
+            }
+
+            return 0;
+        }//AddProblemClass
+
+        public void DeleteProblemClass(long id) {
+            AdministrationServiceClient adminClient = Admin.GetClientFactory();
+
+            if (adminClient != null) {
+                adminClient.DeleteProblemClass(id);
+            }
+        }//DeleteProblemClass
+
+        public long SaveProblemClass(ProblemClass problemClass) {
+            AdministrationServiceClient adminClient = Admin.GetClientFactory();
+
+            if (adminClient != null) {
+                if (problemClass.Id == 0) {
+                    return AddProblemClass(problemClass);
+                }
+                else {
+                    ProblemClass pc = adminClient.GetProblemClass(problemClass.Id);
+
+                    if (pc != null) {
+                        adminClient.UpdateProblemClass(problemClass);
+                        return problemClass.Id;
+                    }
+                }
+            }
+
+            return 0;
+        }//SaveProblemClass        
+    }
+}
