public ActionResult EngagementType(Int64 EngagementTypeId = 0, Int16 SchemeId = 0, string UserAction = "Delete") { populateLeaveLimit(); PopulateLeaveScheme(); PopulateYearEndAction(); var userDetail = generic.GetUserDetail(User.Identity.GetUserId()); ViewData["UserProfile"] = userDetail; ViewData["CompanyLogo"] = cms.GetCompanyLogo(userDetail.SubscriberId).FirstOrDefault(); var engagementtype = ems.GetEngagementLeaveUnion(userDetail.SubscriberId); ViewData["Scheme"] = db.LeaveSchemeMaster.ToList(); ViewData["EngagementType"] = engagementtype; if (UserAction == "Delete" && EngagementTypeId > 0) { ems.DeleteEngagement(EngagementTypeId); ViewBag.Result = "Deleted"; return(View()); } return(View(udb.EngagementTypeMaster.Find(EngagementTypeId))); }