Exemplo n.º 1
0
        public string Load()
        {
            //string userid = System.Web.HttpContext.Current.Request.Params["userid"];
            long userid = AppInfoBase.UserID;
            //string useridString = System.Web.HttpContext.Current.Request.Params["userid"];
            //int userid = int.Parse(useridString);

            string json = proxy.Load(userid);

            return(json);
        }
Exemplo n.º 2
0
        //系统功能树
        public ActionResult MainFrameView()
        {
            long   userid   = AppInfoBase.UserID;
            string usertype = AppInfoBase.UserType;
            //把用户自定义添加的管理对象,从数据库取出,以viewbag传到页面
            string ExistId = MenuConfigProxy.Load(userid);

            ViewBag.ExistId = ExistId;
            //把系统的全部管理对象,从配置文件取出,以viewbag传到页面
            string logid   = NG3.AppInfoBase.LoginID;
            string xmlFile = AppDomain.CurrentDomain.BaseDirectory + @"/NG3Config/TabPageChoose.xml";
            //string xmlFile = "TabPageChoose.xml";
            DataSet   ds = MenuConfigProxy.ConvertXMLToDataSet(xmlFile); //路径怎么破
            DataTable dt = ds.Tables[0];
            //i6s没有合同树套件
            string product = AppInfoBase.UP.Product;
            string series  = AppInfoBase.UP.Series;

            //i8 15.1 去掉合同和文档
            DataRow[] dr = dt.Select("TabPageID = 'TabPageContractManage'");
            if (dr.Length > 0)
            {
                dt.Rows.Remove(dr[0]);
            }
            dr = dt.Select("TabPageID = 'tabPageWmDocTree'");
            if (dr.Length > 0)
            {
                dt.Rows.Remove(dr[0]);
            }
            dr = dt.Select("TabPageID = 'tabPageNavigation'");
            if (dr.Length > 0)
            {
                dt.Rows.Remove(dr[0]);
            }

            ViewBag.ProductId = product + series;
            int    totalRecord = 0;
            string json        = DataConverterHelper.ToJson(dt, totalRecord);

            ViewBag.DT = json;
            //把企业功能树是否启用、是否显示,系统功能树是否显示,从数据库读出,以viewbag传到页面
            //系统管理员固定显示系统功能树和我的功能树
            if (String.Compare(usertype, UserType.System, true) == 0)
            {
                ViewBag.LoadEnFuncTreeRight = "001";
            }
            else
            {
                json = MenuConfigProxy.LoadEnFuncTreeRight();
                ViewBag.LoadEnFuncTreeRight = json;
            }


            //把页面隐藏与否的状态从数据库读出,以viewbag传到页面
            json = MenuConfigProxy.GetDockControl(userid);
            ViewBag.isDockControl = json;

            //把页面换肤的主题状态从数据库读出,以viewbag传到页面
            json            = MenuConfigProxy.GetUITheme(userid);
            ViewBag.UITheme = json;

            //把用户类型传到页面,控制是否显示管理对象栏
            ViewBag.UserType = AppInfoBase.UserType;
            return(View("MainFrameView"));
        }