public static MvcHtmlString RoleTextBoxFor <TModel, TProperty>
            (this HtmlHelper <TModel> helper, Expression <Func <TModel, TProperty> > expression,
            RoleManager roleManager, string htmlName, string moduleName, object htmlAttributes)
        {
            var attributes = new Dictionary <string, Object>();

            attributes = GetHtmlAttribute(htmlAttributes);

            HtmlRole role = roleManager.GetHtmlRole(htmlName);

            if (!role.IsView)
            {
                attributes.Add("style", "display: none");
            }
            else if (role.IsView && !role.IsEdit)
            {
                attributes.Add("disabled", "disabled");
            }
            else
            {
                attributes.Remove("disabled");
            }

            return(helper.TextBoxFor(expression, attributes));
        }
        public ActionResult EditPeribadi(RoleManagerByTab manager, string Command)
        {
            if (manager.HtmlRolesWithTabs != null && !string.IsNullOrEmpty(Command))
            {
                //convert tabId to int
                int tabIdint = Convert.ToInt32(Command);
                //save changes
                HtmlRole.EditList(manager.HtmlRolesWithTabs, tabIdint);
            }

            return(RedirectToAction("EditByModule",
                                    new { id = manager.RoleId, moduleId = manager.ModuleId }));
        }