- Timestamp:
- 05/26/11 23:53:57 (14 years ago)
- Location:
- branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Controllers
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Controllers/ChartController.cs
r6242 r6303 31 31 32 32 // Later, we will get the runs from the session ... 33 QueryServiceClient client = Query.GetClientFactory("okbtester", "okbtester"); 34 35 long[] runIds = new long[104]; 36 for (int i = 0; i < 104; i++) { 37 runIds[i] = i; 38 } 39 Run[] runs = client.GetRuns(runIds, false); 40 //cm.Runs = runs; 33 QueryServiceClient client = Query.GetClientFactory(); 34 35 //long[] runIds = new long[104]; 36 //for (int i = 0; i < 104; i++) { 37 // runIds[i] = i; 38 //} 39 long[] runIds = client.GetRunIds((CombinedFilter)Session["Content"]); 40 Run[] runs = client.GetRuns(runIds,false); 41 // Run[] runs = Session[""]; 42 cm.Runs = runs; 41 43 cm.UpdateRunCollection(runs); 42 44 cm.UpdateBubbleChart(selectedAxisY, selectedAxisX, selectedBubbleSize); -
branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Controllers/FilterController.cs
r6247 r6303 8 8 using HLWebOKBQueryPlugin.OKBQueryService; 9 9 using System.Web.Routing; 10 using HLWebOKBQueryPlugin.Models; 10 11 11 12 namespace HLWebOKBQueryPlugin.Controllers … … 20 21 /// </summary> 21 22 /// <returns></returns> 22 public void GetRuns() 23 { 24 FilterModel qm = new FilterModel(); 25 qm.Content = (CombinedFilter)Session["Content"]; 26 27 QueryServiceClient client = Query.GetClientFactory("okbtester", "okbtester"); 28 29 30 long[] ids = client.GetRunIds(qm.Content); 23 public ActionResult GetRuns() 24 { 25 Session["SelectedSubMenu"] = "Filter"; 26 27 FilterModel fm = new FilterModel(); 28 fm.Content = (CombinedFilter)Session["Content"]; 29 30 QueryServiceClient client = Query.GetClientFactory(); 31 32 33 long[] ids = client.GetRunIds(fm.Content); 31 34 32 35 Response.Write("Found <" + ids.Count() + "> Runs."); 33 34 // return View("Index", qm); // name of usercontrol 36 QueryModel qm = new QueryModel(); 37 qm.Runs = ids; 38 return View("Results", qm); // name of usercontrol 35 39 } 36 40 … … 51 55 /// <param name="collection"></param> 52 56 /// <returns></returns> 53 public ActionResult AddFilter And(string submitButton,FormCollection collection)57 public ActionResult AddFilter(FormCollection collection) 54 58 { 55 59 FilterModel fm = new FilterModel((CombinedFilter)Session["Content"]); 56 57 Response.Write("Submit:" + submit Button);60 string submitAction = collection.Get("action"); 61 Response.Write("Submit:" + submitAction); 58 62 59 63 //update model with form data 60 64 UpdateModel(collection, fm); 61 65 62 if (submitButton.StartsWith("+")) 63 { 64 string stringid = submitButton.Substring(2); 66 if ("add".Equals(submitAction)) 67 { 68 // string stringid = submitButton.Substring(2); 69 string stringid = collection.Get("selectedFilter"); 65 70 AddNewFilter(collection, fm, stringid); 66 71 } 67 else if (submitButton.StartsWith("-")) 68 { 69 string stringid = submitButton.Substring(2); 72 else if ("delete".Equals(submitAction)) 73 { 74 string stringid= collection.Get("selectedFilter"); 75 // string stringid = submitButton.Substring(2); 70 76 DeleteFilter(new Guid(stringid)); 71 77 } 72 else if ( submitButton.Equals("runs"))73 { 74 GetRuns();75 } 76 else if ( submitButton.Equals("or"))78 else if ("runs".Equals(submitAction)) 79 { 80 return GetRuns(); 81 } 82 else if ("or".Equals(submitAction)) 77 83 { 78 84 AddFilterOr( fm); -
branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Controllers/QueryController.cs
r6253 r6303 11 11 using System.Reflection; 12 12 using System.Text; 13 using HLWeb PluginHost.Models;13 using HLWebOKBQueryPlugin.Models; 14 14 using HLWebOKBQueryPlugin.OKBQueryService; 15 15 using HLWebOKBQueryPlugin.Helpers; … … 43 43 44 44 public ActionResult RunCollectionTable() { 45 46 // Get runs from filter 47 48 49 QueryServiceClient client = Query.GetClientFactory(); 50 51 52 long[] ids = client.GetRunIds((CombinedFilter)Session["Content"]); 53 45 54 QueryModel qm = new QueryModel(); 46 Session["QueryRuns"] = qm.getTestRuns(); 55 qm.Runs = ids; 56 Session["QueryRuns"] = qm.RunCollection; 47 57 return View(qm); 48 58 }
Note: See TracChangeset
for help on using the changeset viewer.