public ActionResult CreateNewGuideline(GuidelineViewModel data) { data.TestCases = new List <TestCase>(); var Model = GetGuidelines(); data.Id = Model.Count + 1; Model.Add(data); SaveTestPlan(Model); ViewBag.TestCasesList = GetTestCaseList(); return(View("ValidationPlan", Model)); }
public ActionResult EditGuidelineData(GuidelineViewModel data) { data.TestCases = new List <TestCase>(); var Model = GetGuidelines(); Model.FirstOrDefault(x => x.Id == data.Id).Name = data.Name; Model.FirstOrDefault(x => x.Id == data.Id).Description = data.Description; Model.FirstOrDefault(x => x.Id == data.Id).Categories = data.Categories; Model.FirstOrDefault(x => x.Id == data.Id).Domain = data.Domain; Model.FirstOrDefault(x => x.Id == data.Id).Execute = data.Execute; SaveTestPlan(Model); ViewBag.TestCasesList = GetTestCaseList(); return(View("ValidationPlan", Model)); }
private static string GetCodeSnippetRecomendations(GuidelineViewModel guideline) { var codeSnippets = ActivityLibrary.Lucene.LuceneCodeSnippetService.Query(guideline.Name); var codeSnippet = string.Empty; codeSnippet += "<strong>Download Android Studio Live Templates from Umetrix Github Repo <a target='_blank' href='https://github.com/neerajmathur/UMETRIX/tree/master/Live%20Templates' >Click to Download</a></strong><br/><br/>"; if (codeSnippets.Count == 0) { codeSnippet += "Sorry, No code snippet recommentations were found in code snippet repository"; } foreach (var snippet in codeSnippets) { codeSnippet += "<br/>Live Template Name: " + snippet.Key; codeSnippet += "<br/>Snippet: <br/>" + HttpUtility.HtmlEncode(snippet.Value); codeSnippet += "<hr/>"; } return(codeSnippet); }
public IActionResult RegistrationJson([FromBody] GuidelineViewModel model) { return(Json(model)); }
public IActionResult Registration(GuidelineViewModel model) { return(View()); }