示例#1
0
        public ActionResult TreeView(string uID)
        {
            if (!String.IsNullOrWhiteSpace(uID))
            {
                BTreeHelpers bHelper = new BTreeHelpers();

                NodeView root     = new NodeView(uID);
                var      jsonData = bHelper.BuildMemberTreeBFS(root, 30);
                ViewBag.JsonData = jsonData;
            }
            else
            {
                ViewBag.JsonData = "{}";
            }


            return(View());
        }
示例#2
0
        public ActionResult Tree()
        {
            string userName  = User.Identity.Name;
            var    getMember = db.tbl_members.FirstOrDefault(x => x.Phone1 == userName);

            if (!String.IsNullOrWhiteSpace(getMember.PlacementID))
            {
                BTreeHelpers bHelper = new BTreeHelpers();

                NodeView root     = new NodeView(getMember.PlacementID);
                var      jsonData = bHelper.BuildMemberTreeBFS(root, 5);
                ViewBag.JsonData = jsonData;
            }
            else
            {
                ViewBag.JsonData = "{}";
            }

            return(View());
        }