コード例 #1
0
        public FunctionPointList GetFunctionPointsByUserAndAddIn(string LogonName, string AddIn)
        {
            //string token = HttpContext.Current.Request.Headers[AuthenticationUtil.Dashboard365TokenName];
            EventLog log = new EventLog("MyEvent");

            //  首先应判断日志来源是否存在,一个日志来源只能同时与一个事件绑定s
            if (!EventLog.SourceExists("New Application"))
            {
                EventLog.CreateEventSource("New Application", "MyEvent");
            }

            log.Source = "New Application";
            //log.WriteEntry("token" + token, EventLogEntryType.Information);

            //if (!AuthenticationUtil.Verify(token))
            //{
            //    return null;
            //}
            FunctionPointList l = new FunctionPointList();

            if (AddIn.Equals("main", StringComparison.InvariantCultureIgnoreCase))
            {
                FunctionPoint s = new FunctionPoint();
                s.Title         = "Users Management";
                s.ImgUrl        = "/staticImages/users.png";
                s.AlertCount    = "3";
                s.Description   = "Users Management Component";
                s.NavigationUrl = "/users.htm";
                l.Add(s);

                FunctionPoint s2 = new FunctionPoint();
                s2.Title         = "Users Management";
                s2.ImgUrl        = "/staticImages/users.png";
                s2.AlertCount    = "3";
                s2.Description   = "Users Management Component";
                s2.NavigationUrl = "/rdps.htm";
                l.Add(s2);
            }
            else if (AddIn.Equals("users", StringComparison.InvariantCultureIgnoreCase))
            {
                FunctionPoint s = new FunctionPoint();
                s.Title         = "Add User";
                s.ImgUrl        = "/staticImages/AddUser.png";
                s.AlertCount    = "3";
                s.Description   = "Users Management Component";
                s.NavigationUrl = "/s.htm";
                l.Add(s);

                FunctionPoint s2 = new FunctionPoint();
                s2.Title         = "BacktoHome";
                s2.ImgUrl        = "/staticImages/back.png";
                s2.AlertCount    = "3";
                s2.Description   = "Users Management Component";
                s2.NavigationUrl = "/Default.html";
                l.Add(s2);
            }
            return(l);
        }
コード例 #2
0
        public FunctionPointList GetRoot()
        {
            string   token = HttpContext.Current.Request.Headers[AuthenticationUtil.Dashboard365TokenName];
            EventLog log   = new EventLog("MyEvent");

            //  首先应判断日志来源是否存在,一个日志来源只能同时与一个事件绑定s
            if (!EventLog.SourceExists("New Application"))
            {
                EventLog.CreateEventSource("New Application", "MyEvent");
            }

            log.Source = "New Application";
            log.WriteEntry("token" + token, EventLogEntryType.Information);

            if (!AuthenticationUtil.Verify(token))
            {
                return(null);
            }

            FunctionPointList l = new FunctionPointList();
            FunctionPoint     s = new FunctionPoint();

            s.Title         = "Users Management";
            s.ImgUrl        = "/staticImages/users.png";
            s.AlertCount    = "3";
            s.Description   = "Users Management Component";
            s.NavigationUrl = "/s.htm";
            l.Add(s);

            FunctionPoint s2 = new FunctionPoint();

            s2.Title         = "Users Management";
            s2.ImgUrl        = "/staticImages/users.png";
            s2.AlertCount    = "3";
            s2.Description   = "Users Management Component";
            s2.NavigationUrl = "/s.htm";
            l.Add(s2);

            return(l);
        }
コード例 #3
0
        public FunctionPointList GetFunctionPointsByUser(string LogonName)
        {
            FunctionPointList l = new FunctionPointList();
            FunctionPoint     s = new FunctionPoint();

            s.Title         = "Users Management";
            s.ImgUrl        = "/staticImages/users.png";
            s.AlertCount    = "3";
            s.Description   = "Users Management Component";
            s.NavigationUrl = "/users.htm";
            l.Add(s);

            FunctionPoint s2 = new FunctionPoint();

            s2.Title         = "Users Management";
            s2.ImgUrl        = "/staticImages/users.png";
            s2.AlertCount    = "3";
            s2.Description   = "Users Management Component";
            s2.NavigationUrl = "/rdps.htm";
            l.Add(s2);

            return(l);
        }