public JsonResult GetNav(int id)
        {
            B_Navigation b_nav = new B_Navigation();
            var          model = b_nav.GetNav(id);

            return(Json(model));
        }
        public JsonResult EditNav(int id, string txt_parent_id, string txt_icon_url, string txt_title, string txt_link_url, string txt_sort_id, string txt_is_lock, string txt_action_type)
        {
            Common.Json  json  = new Common.Json();
            B_Navigation b_nav = new B_Navigation();

            Domain.Navigation model = b_nav.GetNav(id);
            model.icon_url = txt_icon_url;
            model.title    = txt_title;
            model.link_url = txt_link_url;
            if (!string.IsNullOrEmpty(model.link_url) && model.link_url != "#")
            {
                model.controllerName = model.link_url.Substring(model.link_url.LastIndexOf("/") + 1);
            }
            else
            {
                model.controllerName = "";
            }
            model.sort_id     = Convert.ToInt32(txt_sort_id);
            model.is_lock     = txt_is_lock;
            model.parent_id   = Convert.ToInt32(txt_parent_id);
            model.action_type = txt_action_type;
            if (model.parent_id == 0)
            {
                model.channel_id = 1;
            }
            else
            {
                model.channel_id = 2;
            }
            b_nav.Update(model);
            json.msg = "修改成功!";
            return(Json(json));
        }