public ActionResult Index() { BL = new TestBL(); GetTestResponse response = BL.GetTestList(new GetTestRequest()); return(View(response.TestList)); }
private static GetTestResponse MapToResponse(List <TestResult> testResultList) { //counting test result metrics and clustering events var testResponse = new GetTestResponse() { TestId = testResultList.Select(e => e.Test.TestId).Distinct().SingleOrDefault(), }; if (testResultList.Count < 1) { return(testResponse); } testResponse.Languages = testResultList.Select(tr => MapToResponse(tr)).ToList(); return(testResponse); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { GetTestResponse response = new GetTestResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("test", targetDepth)) { var unmarshaller = TestUnmarshaller.Instance; response.Test = unmarshaller.Unmarshall(context); continue; } } return(response); }
public GetTestResponse PRC_GET_TESTS(GetTestRequest request) { GetTestResponse response = new GetTestResponse(); DataTable dt = new DataTable(); try { con.Open(); SqlCommand cmd = new SqlCommand("PRC_GET_TESTS", con); cmd.CommandType = CommandType.StoredProcedure; SqlDataAdapter DataAdapter = new SqlDataAdapter(cmd); DataAdapter.Fill(dt); } catch (Exception ex) { } response.TestList = Utility.DataTableToList <GetTestDTO>(dt); return(response); }