//[Authorize(Roles = "Employee")] public ActionResult SkillDetails(string ProfileName, string SkillName, string result, bool status = false, string useraction = "Add", long ProfileId = 0, short YearofExperience = 0) { ViewBag.SkillName = SkillName; ViewBag.Action = useraction; ViewBag.Result = "Failed"; if (status == true) { ViewBag.Result = "Succeeded"; } if (result == "Deleted") { ViewBag.Data = "Deleted"; } string UserId = User.Identity.GetUserId(); var userdetails = generic.GetUserDetail(UserId); ViewData["UserProfile"] = userdetails; ViewData["EmpDetails"] = ems.GetEmployeeBasicDetails(UserId).FirstOrDefault(); ViewData["CompanyLogo"] = cms.GetCompanyLogo(userdetails.SubscriberId).FirstOrDefault(); if (ProfileId == 0 && !string.IsNullOrEmpty(ProfileName)) { ProfileId = (from p in udb.UserProfileTypeDetails.Where(p => p.UserId == UserId && p.ProfileName == ProfileName) select p).FirstOrDefault().ProfileId; } PopulateProfileType(UserId, ProfileId); ViewBag.ProfileTypeId = ProfileId; ViewData["Profile"] = ems.GetProfileTypeDetails(UserId); ViewBag.UserName = ems.GetUserName(UserId); var EmpSkilldetails = ems.GetEmployeeSkillDetails(UserId); ViewData["EmpSkills"] = EmpSkilldetails; var employeeSkill = EmpSkilldetails.Where(s => s.ProfileId == ProfileId && s.SkillName == SkillName).FirstOrDefault(); if (employeeSkill != null) { PopulateYearOfExp(employeeSkill.YearofExperience); } else { PopulateYearOfExp(); } return(View(employeeSkill)); }