//testcase pipeline stages report for Google charts public JsonResult PipelineStageTestcaseDetails() { ValidationMapper <TestCase, Models.TestCase> mapperObj = new ValidationMapper <TestCase, Models.TestCase>(); ValidationMapper <PipelineStage, Models.PipeLineStage> mapperObjForPipelineStage = new ValidationMapper <PipelineStage, Models.PipeLineStage>(); var dalObj = new DALRepository(); var TestCaseListList = dalObj.GetTestCaseDetails(); var PipelineList = dalObj.GetPipeLineStage(); var testcaseTableRows = new List <Models.TestCase>(); if (TestCaseListList.Any()) { foreach (var ts in TestCaseListList) { testcaseTableRows.Add(mapperObj.Translate(ts)); } } List <Models.TwoArgumentStringInt> dataPoint = new List <Models.TwoArgumentStringInt>(); foreach (var onepipe in PipelineList) { var count = 0; foreach (var onetest in TestCaseListList) { if (onepipe.PipelineStageId == onetest.PipelineStageId) { count += 1; } } dataPoint.Add(new Models.TwoArgumentStringInt(onepipe.PipelineStage1, count)); } return(Json(dataPoint, JsonRequestBehavior.AllowGet)); }
public virtual ActionResult Update() { var tasks = this.DeserializeObject <IEnumerable <Models.TaskViewModel> >("models").FirstOrDefault(); if (tasks != null) { int result = 0; bool status = false; try { ValidationMapper <Models.TaskViewModel, Scheduler> mapperObj = new ValidationMapper <Models.TaskViewModel, Scheduler>(); var dalObj = new DALRepository(); result = dalObj.UpdateSchedularEvent(mapperObj.Translate(tasks)); if (result == 1) { return(this.Jsonp(tasks)); } else { return(Content("<script language='javascript' type='text/javascript'>alert('Error Occured');</script>")); } } catch { return(Json(new { success = status })); } } return(this.Jsonp(tasks)); }
public JsonResult RegisterAdmin(Models.Admin admin) { int status; admin.UserName = admin.FullName; if (ModelState.IsValid) { ValidationMapper <Models.Admin, Admin> mapperObj = new ValidationMapper <Models.Admin, Admin>(); var dalObj = new DALRepository(); status = dalObj.RegisterAdmin(mapperObj.Translate(admin)); if (status == 1) { Session["userName"] = admin.UserName; Session["Role"] = "Admin"; status = 1; } else { status = 0; } } else { status = -1; } return(Json(status, JsonRequestBehavior.AllowGet)); }
public ActionResult GetPipelineStageById(int id) { ValidationMapper <PipelineStage, Models.PipeLineStage> mapperObj = new ValidationMapper <PipelineStage, Models.PipeLineStage>(); var dalObj = new DALRepository(); var pipelist = dalObj.GetPipelineById(id); var mpipelist = new List <Models.PipeLineStage>(); if (pipelist != null) { mpipelist.Add(mapperObj.Translate(pipelist)); return(Json(mpipelist, JsonRequestBehavior.AllowGet)); } return(null); }
public ActionResult GetTestSuiteById(int id) { ValidationMapper <TestSuite, Models.TestSuites> mapperObj = new ValidationMapper <TestSuite, Models.TestSuites>(); var dalObj = new DALRepository(); var tstSuite = dalObj.GetTestSuiteById(id); var testSuite = new Models.TestSuites(); if (tstSuite != null) { testSuite = mapperObj.Translate(tstSuite); return(Json(testSuite, JsonRequestBehavior.AllowGet)); } return(null); }
public ActionResult GetTestCaseById(int id) { ValidationMapper <TestCase, Models.TestCase> mapperObj = new ValidationMapper <TestCase, Models.TestCase>(); var dalObj = new DALRepository(); var tstCase = dalObj.GetTestCasesById(id); var tstCasem = new Models.TestCase(); if (tstCase != null) { tstCasem = mapperObj.Translate(tstCase); return(Json(tstCasem, JsonRequestBehavior.AllowGet)); } return(null); }
public JsonResult LoginAdmin(Models.Admin user) { int status = 0; ValidationMapper <Models.Admin, Admin> mapperObj = new ValidationMapper <Models.Admin, Admin>(); var dalObj = new DALRepository(); var loginData = dalObj.GetAdminCredentials(mapperObj.Translate(user)); if (loginData != null) { Session["userName"] = loginData.UserName; Session["Role"] = "Admin"; status = 1; } return(Json(status, JsonRequestBehavior.AllowGet)); }
public JsonResult GetTestCaseDetails() { ValidationMapper <TestCase, Models.TestCase> mapperObj = new ValidationMapper <TestCase, Models.TestCase>(); var dalObj = new DALRepository(); var testCaseList = dalObj.GetTestCases(); var testCases = new List <Models.TestCase>(); if (testCaseList.Any()) { foreach (var ts in testCaseList) { testCases.Add(mapperObj.Translate(ts)); } return(Json(testCases.ToList(), JsonRequestBehavior.AllowGet)); } return(null); }
public JsonResult GetCalendarEvents() { ValidationMapper <Scheduler, Models.TaskViewModel> mapperObj = new ValidationMapper <Scheduler, Models.TaskViewModel>(); var dalObj = new DALRepository(); var testSuiteList = dalObj.GetSchedulerEvents(); var testSuites = new List <Models.TaskViewModel>(); if (testSuiteList.Any()) { foreach (var ts in testSuiteList) { testSuites.Add(mapperObj.Translate(ts)); } var data = testSuites.ToList(); return(this.Jsonp(data)); } return(null); }
public ActionResult SaveValueCheckParams(Models.TestCaseParameterValueCheck vc) { int result = 0; bool status = false; try { ValidationMapper <Models.TestCaseParameterValueCheck, TestCaseParameterValueCheck> mapperObj = new ValidationMapper <Models.TestCaseParameterValueCheck, TestCaseParameterValueCheck>(); var dalObj = new DALRepository(); result = dalObj.SaveValueCheckParams(mapperObj.Translate(vc)); if (result == 1) { status = true; } return(Json(new { success = status })); } catch { return(Json(new { success = status })); } }
public ActionResult SaveFKParameters(Models.TestCaseParameterForeignKey ppk) { int result = 0; bool status = false; try { ValidationMapper <Models.TestCaseParameterForeignKey, TestCaseParameterForeignKey> mapperObj = new ValidationMapper <Models.TestCaseParameterForeignKey, TestCaseParameterForeignKey>(); var dalObj = new DALRepository(); result = dalObj.SaveFKParams(mapperObj.Translate(ppk)); if (result == 1) { status = true; } return(Json(new { success = status })); } catch { return(Json(new { success = status })); } }
public JsonResult GetTestCaseTypeDetails() { ValidationMapper <TestCaseType, Models.TestCaseType> mapperObj = new ValidationMapper <TestCaseType, Models.TestCaseType>(); var dalObj = new DALRepository(); var lst = dalObj.GetTestCaseTypes(); var typelst = new List <Models.TestCaseType>(); if (lst.Any()) { foreach (var ts in lst) { typelst.Add(mapperObj.Translate(ts)); } var data = typelst.ToList(); ViewBag.testCasetypelist = data; var pageSize = data.Count(); return(Json(new { data, pageSize }, JsonRequestBehavior.AllowGet)); } return(null); }
public JsonResult kendoGettestcases() { ValidationMapper <TestCase, Models.TestCase> mapperObj = new ValidationMapper <TestCase, Models.TestCase>(); var dalObj = new DALRepository(); var testSuiteList = dalObj.Gettestsuitechilds(); var records = new List <Models.TestCase>(); if (testSuiteList.Any()) { foreach (var ts in testSuiteList) { records.Add(mapperObj.Translate(ts)); } } var data = records.ToList(); var pageSize = data.Count(); return(Json(new { data, pageSize }, JsonRequestBehavior.AllowGet)); }
public JsonResult UpdatePipeline(Models.PipeLineStage pipeline) { int result = 0; bool status = false; try { ValidationMapper <Models.PipeLineStage, PipelineStage> mapperObj = new ValidationMapper <Models.PipeLineStage, PipelineStage>(); var dalObj = new DALRepository(); result = dalObj.SavePipeline(mapperObj.Translate(pipeline)); if (result == 1) { status = true; } return(Json(new { success = status })); } catch { return(Json(new { success = status })); } }
public JsonResult UpdateTestCase(Models.TestCase testcase) { int result = 0; bool status = false; try { ValidationMapper <Models.TestCase, TestCase> mapperObj = new ValidationMapper <Models.TestCase, TestCase>(); var dalObj = new DALRepository(); result = dalObj.UpdatedTestcase(mapperObj.Translate(testcase)); if (result == 1) { status = true; } return(Json(new { success = status })); } catch { return(Json(new { success = status })); } }
public JsonResult SaveCalendarEvent(Models.Event eve) { int result = 0; bool status = false; try { ValidationMapper <Models.Event, Event> mapperObj = new ValidationMapper <Models.Event, Event>(); var dalObj = new DALRepository(); result = dalObj.SaveEvent(mapperObj.Translate(eve)); if (result == 1) { status = true; } return(Json(new { success = status })); } catch { return(Json(new { success = status })); } }
public JsonResult GetPipeLinestageDetails() { ValidationMapper <PipelineStage, Models.PipeLineStage> mapperObj = new ValidationMapper <PipelineStage, Models.PipeLineStage>(); var dalObj = new DALRepository(); var pipelineStageList = dalObj.GetPipeLineStage(); var stages = new List <Models.PipeLineStage>(); if (pipelineStageList.Any()) { foreach (var ts in pipelineStageList) { stages.Add(mapperObj.Translate(ts)); } var data = stages.ToList(); ViewBag.pipelinelist = data; var pageSize = data.Count(); return(Json(new { data, pageSize }, JsonRequestBehavior.AllowGet)); } return(null); }