public static int RankReturn(int id)
            {
                DataDB db = new DataDB();

                var u = db.Users.FirstOrDefault(i => i.Id == id);
                if(u != null)
                {
                    return u.roll;
                }
                return 0;
            }
        public static string titleKategori(int id)
        {
            DataDB db = new DataDB();

            var title = db.kategoris.FirstOrDefault(i => i.id == id);
            if(title != null)
            {
                return title.navn;
            }
            return "";
        }
        public static string titleVare(int id)
        {
            DataDB db = new DataDB();

            var title = db.produkters.FirstOrDefault(i => i.id == id);
            if (title != null)
            {
                return title.navn;
            }
            return "";
        }
 public static void AdminPanelSecurity(int BrugeridValue)
 {
     DataDB db = new DataDB();
     var userrank = db.Users.FirstOrDefault(i => i.Id == BrugeridValue);
     if(userrank != null)
     {
         if (userrank.roll >= 2)
         {
             HttpContext.Current.Response.Redirect("~/default.aspx?AdminError=true");
         }
     }
 }