public void SaveAppRole()
        {
            String appRoles = ctx.Post("appRole");

            AppRole.DeleteAll();

            if (strUtil.HasText(appRoles))
            {
                string[] values = appRoles.Split(',');
                foreach (String str in values)
                {
                    if (strUtil.IsNullOrEmpty(str))
                    {
                        continue;
                    }
                    string[] arrItem = str.Split('_');
                    if (arrItem.Length != 3)
                    {
                        continue;
                    }

                    int appId  = cvt.ToInt(arrItem[0]);
                    int roleId = cvt.ToInt(arrItem[1]);
                    if (appId <= 0 || roleId < 0)
                    {
                        continue;
                    }

                    String roleType = arrItem[2];

                    AppRole ar = new AppRole();
                    ar.AppId    = appId;
                    ar.RoleId   = roleId;
                    ar.RoleType = roleType;

                    ar.insert();
                }
            }
            log(SiteLogString.UpdateFrontPermission());

            echoRedirect(lang("saved"));
        }