- Timestamp:
- 01/15/13 15:50:53 (12 years ago)
- Location:
- branches/OaaS/HeuristicLab.Services.Optimization.Web/Models
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OaaS/HeuristicLab.Services.Optimization.Web/Models/ChartModels.cs
r9062 r9166 18 18 } 19 19 } 20 21 public class RowNameContainer { 22 private IList<string> rowNames = new List<string>(); 23 24 public IList<string> RowNames { 25 get { return rowNames; } 26 set { rowNames = value; } 27 } 28 } 29 30 public class DatatableContainer { 31 public string[] Datatables { get; set; } 32 } 20 33 } -
branches/OaaS/HeuristicLab.Services.Optimization.Web/Models/OptimizationModels.cs
r9062 r9166 7 7 8 8 namespace HeuristicLab.Services.Optimization.Web.Models { 9 public class ScheduleJobModel { 10 public int Repetitions { get; set; } 11 public string Name { get; set; } 12 public string Group { get; set; } 13 } 9 14 10 15 public class OptimizationModel { … … 41 46 realValue += value.AttemptedValue; 42 47 } 43 var param = (from par in scenario. InputParameters.Items where par.Value.Name == realKey select par).FirstOrDefault();48 var param = (from par in scenario.FirstAlgorithm.Problem.Parameters.Items where par.Value.Name == realKey select par).FirstOrDefault(); 44 49 if (param != null && !param.Value.TrySetFromString(realValue)) { 45 50 bindingContext.ModelState.AddModelError(bindingContext.ModelName, new Exception(string.Format("Unable to parse {0} into destination type {1}", value, param.Type))); 46 51 } 47 52 } 48 return scenario. InputParameters;53 return scenario.FirstAlgorithm.Problem.Parameters; 49 54 } 50 55 } … … 55 60 foreach (var key in controllerContext.RequestContext.HttpContext.Request.Form.AllKeys) { 56 61 var value = bindingContext.ValueProvider.GetValue(key); 57 var param = (from par in scenario. AlgorithmParameters.Items where par.Value.Name == key select par).FirstOrDefault();62 var param = (from par in scenario.FirstAlgorithm.Parameters.Items where par.Value.Name == key select par).FirstOrDefault(); 58 63 if (param != null && !param.Value.TrySetFromString(value.AttemptedValue)) { 59 64 bindingContext.ModelState.AddModelError(bindingContext.ModelName, new Exception(string.Format("Unable to parse {0} into destination type {1}", value, param.Type))); 60 65 } 61 66 } 62 return scenario. AlgorithmParameters;67 return scenario.FirstAlgorithm.Parameters; 63 68 } 64 69 }
Note: See TracChangeset
for help on using the changeset viewer.