public ActionResult Index() { ViewBag.logUser = WebSecurity.CurrentUserId; Screen model = new Screen(); IEnumerable <ModelType> actionTypes = Enum.GetValues(typeof(ModelType)) .Cast <ModelType>(); model.ModuleIdList = from action in actionTypes select new SelectListItem { Text = action.ToString(), Value = ((int)action).ToString(), }; ViewBag.ActionType = model.ModuleIdList; model = _screenService.GetDropDown(); // return View(obj); ViewBag.moduleList = model.ModuleList; //model.ModuleIdList; long UID = Convert.ToInt64(WebSecurity.CurrentUserId); bool lastResult = _userService.IsUserPermitedtoDelete(UID); if (lastResult == false) { return(View("NoPermissionUser")); } else { return(View(model)); } }