Esempio n. 1
0
File: User.cs Progetto: nhtera/Home
        public WebsiteSecurity Website(int websiteId)
        {
            if (websiteSecurity.Count > 0)
            {
                for (int x = 0; x <= websiteSecurity.Count - 1; x++)
                {
                    if (websiteSecurity[x].websiteId == websiteId)
                    {
                        websiteSecurity[x].Init(this);
                        return(websiteSecurity[x]);
                    }
                }
            }

            //last resort, create a new website security object
            WebsiteSecurity ws = new WebsiteSecurity(this);

            ws.websiteId = websiteId;
            websiteSecurity.Add(ws);
            return(websiteSecurity[websiteSecurity.Count - 1]);
        }
Esempio n. 2
0
File: User.cs Progetto: nhtera/Home
        public WebsiteSecurity Website(int websiteId)
        {
            if (websiteSecurity.Count > 0)
            {
                for (int x = 0; x <= websiteSecurity.Count - 1; x++)
                {
                    if (websiteSecurity[x].websiteId == websiteId)
                    {
                        websiteSecurity[x].Init(this);
                        return websiteSecurity[x];
                    }

                }
            }

            //last resort, create a new website security object
            WebsiteSecurity ws = new WebsiteSecurity(this);
            ws.websiteId = websiteId;
            websiteSecurity.Add(ws);
            return websiteSecurity[websiteSecurity.Count - 1];
        }