Exemplo n.º 1
0
        public string LoadNavigationPage(string ANavigationPage)
        {
            Dictionary <string, object> result = new Dictionary <string, object>();

            if (UserInfo.GetUserInfo() == null)
            {
                result.Add("resultcode", "error");
                result.Add("error", "invalid user");
                return(JsonConvert.SerializeObject(result));
            }

            string htmlcode = new TUINavigation().LoadNavigationPage(ANavigationPage);

            if (htmlcode.StartsWith("error:"))
            {
                result.Add("resultcode", "error");
                result.Add("message", htmlcode);
            }
            else
            {
                result.Add("resultcode", "success");
                result.Add("htmlpage", htmlcode);
            }

            return(JsonConvert.SerializeObject(result));
        }
Exemplo n.º 2
0
        public string GetNavigationMenu()
        {
            Dictionary <string, object> result = new Dictionary <string, object>();

            if (UserInfo.GUserInfo == null)
            {
                result.Add("resultcode", "error");
                result.Add("error", "invalid user");
                return(JsonConvert.SerializeObject(result));
            }

            result.Add("resultcode", "success");
            result.Add("navigation", TUINavigation.LoadNavigationUI());
            return(JsonConvert.SerializeObject(result));
        }