public async Task <ActionResult> TrainingReport() { InitializeServiceClient(); UserOnBoarding objUserOnBoarding = new UserOnBoarding(); List <Skill> skills = new List <Skill>(); Skill skAll = new Skill(); skAll.SkillId = 0; skAll.SkillName = "All Skills"; skills.Add(skAll); HttpResponseMessage response = await client.PostAsJsonAsync("Skill/GetAllSkills", req); List <Skill> academySkills = await response.Content.ReadAsAsync <List <Skill> >(); //objUserOnBoarding.Skills = await response.Content.ReadAsAsync<List<Skill>>(); for (int i = 0; i < academySkills.Count; i++) { skills.Add(academySkills[i]); } objUserOnBoarding.Skills = skills; HttpResponseMessage projectResponse = await client.PostAsJsonAsync("Project/GetAllProjects", req); List <Project> projects = await projectResponse.Content.ReadAsAsync <List <Project> >(); objUserOnBoarding.Projects = projects; return(View(objUserOnBoarding)); }
public ActionResult TrainingReport() { UserOnBoarding objUserOnBoarding = new UserOnBoarding(); IDAL dal = (new DALFactory()).GetInstance(); objUserOnBoarding.Skills = dal.GetAllSkills(); //Gets a list of all skills for Selection return(View(objUserOnBoarding)); }
public ActionResult Manage(int projectid) { try { IDAL dal = (new DALFactory()).GetInstance(); UserOnBoarding objOnBoarding = new UserOnBoarding(); objOnBoarding.Skills = dal.GetAllSkills(); //Fetches all skills return(View("ProjectSkills", objOnBoarding)); } catch (Exception ex) { UserManager user = (UserManager)Session["CurrentUser"]; LogHelper.AddLog(new LogEntity(AppConstant.PartitionError, user.EmailID.ToString(), AppConstant.ApplicationName, "ProjectSkills, Manage", ex.Message, ex.StackTrace)); return(View()); } }
public UserOnBoarding GetOnBoardingDetailsForUser(RequestBase req) { UserOnBoarding result = new UserOnBoarding(); try { UserManager userManager = new UserManager(); SqlSvrDAL dal = new SqlSvrDAL(req.ClientInfo); result = dal.GetOnBoardingDetailsForUser(req.ClientInfo); } catch (Exception ex) { //LogHelper.AddLog("OnBoardingController,GetOnBoardingDetailsForUser", ex.Message, ex.StackTrace, "HCL.Academy.Service", req.ClientInfo.emailId); TelemetryClient telemetry = new TelemetryClient(); telemetry.TrackException(ex); } return(result); }
// GET: ChecklistReport public async Task <ActionResult> Index() { InitializeServiceClient(); UserOnBoarding objUserOnBoarding = new UserOnBoarding(); HttpResponseMessage projectResponse = await client.PostAsJsonAsync("Project/GetAllProjects", req); List <Project> projects = await projectResponse.Content.ReadAsAsync <List <Project> >(); objUserOnBoarding.Projects = projects; HttpResponseMessage geoResponse = await client.PostAsJsonAsync("Geo/GetAllGEOs", req); objUserOnBoarding.GEOs = await geoResponse.Content.ReadAsAsync <List <GEO> >(); HttpResponseMessage roleResponse = await client.PostAsJsonAsync("User/GetAllRoles", req); objUserOnBoarding.Roles = await roleResponse.Content.ReadAsAsync <List <Role> >(); return(View(objUserOnBoarding)); }
public async Task <ActionResult> Manage(int projectid) { InitializeServiceClient(); try { UserOnBoarding objOnBoarding = new UserOnBoarding(); HttpResponseMessage response = await client.PostAsJsonAsync("Skill/GetAllSkills", req); objOnBoarding.Skills = await response.Content.ReadAsAsync <List <Skill> >(); client.Dispose(); return(View("ProjectSkills", objOnBoarding)); } catch (Exception ex) { // LogHelper.AddLog("ProjectSkillsController", ex.Message, ex.StackTrace, "HCL.Academy.Web", user.EmailID); TelemetryClient telemetry = new TelemetryClient(); telemetry.TrackException(ex); return(View()); } }
public void IndexTest() { UserOnBoarding objUserOnBoarding = new UserOnBoarding(); //var obj = new AdminController(dal); List <Skill> skills = new List <Skill>() { new Skill { SkillId = 1, SkillName = "C# Unleashed" }, new Skill { SkillId = 2, SkillName = "ASP.Net Unleashed" }, new Skill { SkillId = 3, SkillName = "Silverlight Unleashed" } }; userDAL.Setup(x => x.GetAllSkills()).Returns(skills); var Res = userDAL.Object.GetAllSkills(); //var actResult = obj.OnBoardAdmin() as ViewResult; //Assert.AreEqual(actResult.ViewName, "OnBoardAdmin"); }