public JsonResult DeletePreference(string name) { MembershipUser mu = Membership.GetUser(); int userId = 0; //userId = Convert.ToInt32(mu.ProviderUserKey); userId = SessionManager.LoggedInUser.UserID; int IndustryId = SessionManager.LoggedInUser.IndustryId; int ImpersonateUserId = SessionManager.LoggedInUser.ImpersonateUserId; bool status = true; if (name != "All") { status = _preferenceAPIController.DeletePreference(name, userId, ImpersonateUserId); } else { List <smSubIndustry> listSubIndustry = _manageCategoryService.GetSubCategoryList(IndustryId).Where(x => x.IsDeleted == false).ToList(); status = _preferenceService.DeleteAllPreference(listSubIndustry, userId, ImpersonateUserId); } return(Json(new { status = status }, JsonRequestBehavior.AllowGet)); }
public List <smSubIndustry> GetSubCategoryList(int id) { return(_manageCategoryService.GetSubCategoryList(id)); }