public async Task <PartialViewResult> GetReport(string projectid) { InitializeServiceClient(); HttpResponseMessage skillResponse = await client.PostAsJsonAsync("Skill/GetAllSkillResourceCount?projectId=" + projectid, req); List <SkillCompetencyResource> result = await skillResponse.Content.ReadAsAsync <List <SkillCompetencyResource> >(); AccountSkillHeatMapViewModel vm = new AccountSkillHeatMapViewModel(); vm.resources = result; //int cid = 0; //if (competencylevelid != null) //{ // cid = Convert.ToInt32(competencylevelid); //} //else // cid = 1; //vm.competencyLevel = cid; vm.projectId = Convert.ToInt32(projectid); //vm.competencies = new SelectList(new List<Object>{ // new { value = "1", text = "Novice" },new { value = "2" , text = "AdvancedBeginner" },new { value = "3" , text = "Competent"}, // new { value = "4" , text = "Proficient"},new { value = "5" , text = "Expert"}}, // "value", "text"); return(PartialView("Report", vm)); }
// GET: AccountLevelSkillMap public async Task <ActionResult> Index() { InitializeServiceClient(); HttpResponseMessage projectResponse = await client.PostAsJsonAsync("Project/GetAllProjects", req); List <Project> projects = await projectResponse.Content.ReadAsAsync <List <Project> >(); ViewBag.Projects = projects; //HttpResponseMessage skillResponse = await client.PostAsJsonAsync("Skill/GetAllSkillResourceCount", req); //List<SkillCompetencyResource> result = await skillResponse.Content.ReadAsAsync<List<SkillCompetencyResource>>(); AccountSkillHeatMapViewModel vm = new AccountSkillHeatMapViewModel(); // vm.competencies = new SelectList( new List<Object>{ // new { value = "1", text = "Novice" },new { value = "2" , text = "AdvancedBeginner" },new { value = "3" , text = "Competent"}, // new { value = "4" , text = "Proficient"},new { value = "5" , text = "Expert"}}, // "value","text"); //// vm.resources = result; // vm.competencyLevel = 1; return(View(vm)); }
public async Task <ActionResult> Index(FormCollection f) { InitializeServiceClient(); HttpResponseMessage projectResponse = await client.PostAsJsonAsync("Project/GetAllProjects", req); List <Project> projects = await projectResponse.Content.ReadAsAsync <List <Project> >(); ViewBag.Projects = projects; HCL.Academy.Model.AccountSkillHeatMapViewModel vm = new AccountSkillHeatMapViewModel(); //string compvalue = f["competencyLevel"]; //string[] parts = compvalue.Split(",".ToCharArray()); //vm.competencyLevel = Convert.ToInt32(parts[0]); vm.projectId = Convert.ToInt32(f["project"].ToString()); HttpResponseMessage skillResponse = await client.PostAsJsonAsync("Skill/GetAllSkillResourceCount?projectId=" + vm.projectId, req); List <SkillCompetencyResource> result = await skillResponse.Content.ReadAsAsync <List <SkillCompetencyResource> >(); vm.resources = result; //vm.competencies = new SelectList(new List<Object>{ // new { value = "1", text = "Novice" },new { value = "2" , text = "AdvancedBeginner" },new { value = "3" , text = "Competent"}, // new { value = "4" , text = "Proficient"},new { value = "5" , text = "Expert"}}, // "value", "text"); return(View(vm)); }