Example #1
0
        public ActionResult Home()
        {
            //if (!Utits.IsLogin)
            //{
            //    return RedirectPermanent("/Login/Index");
            //}
            //var currentUser = Utits.CurrentUser;
            //ViewBag.LogPerson = currentUser.user_TrueName;
            ViewBag.LogPerson = "管理员";// currentUser.user_TrueName;

            var cNetBll  = new BLL_Network();
            var cRoomBll = new BLL_ComputerRoom();
            var cTerBll  = new BLL_Terminal();
            var cSecuBll = new BLL_Security();
            var cCproBll = new BLL_ConstructionProject();
            var cResBll  = new BLL_ResourceCatalog();
            var cGSoft   = new BLL_GenuineSoftware();


            var Netlist   = cNetBll.GetObjectAll();
            var Roomlist  = cNetBll.GetObjectAll();
            var Terlist   = cTerBll.GetObjectAll();
            var Seculist  = cSecuBll.GetObjectAll();
            var Cprolist  = cCproBll.GetObjectAll();
            var Reslist   = cResBll.GetObjectAll();
            var GSoftlist = cGSoft.GetObjectAll();

            ViewBag.jhj   = Netlist.Sum(c => c.scjhj);
            ViewBag.gx    = Netlist.Sum(c => c.gx);
            ViewBag.wxjrd = Netlist.Sum(c => c.wxjrd);

            ViewBag.jfsl = Roomlist.Count();

            ViewBag.zd    = Terlist.Sum(c => c.zdsl);
            ViewBag.jrww  = Terlist.Sum(c => c.jrzwwwsl);
            ViewBag.az360 = Terlist.Sum(c => c.az360tysl);

            ViewBag.fwq = Seculist.Sum(c => c.fhq);
            ViewBag.VPN = Seculist.Sum(c => c.VPNsb);

            ViewBag.xxm = Cprolist.Count();

            ViewBag.zyml = Reslist.Sum(c => c.zymlsl);
            ViewBag.ysj  = Reslist.Sum(c => c.ysjzyl);
            ViewBag.gxzy = Reslist.Sum(c => c.gxcs);
            ViewBag.fwzy = Reslist.Sum(c => c.fwl);

            ViewBag.czxt = GSoftlist.Count();

            return(View());
        }
Example #2
0
        /// <summary>
        /// 终端情况
        /// </summary>
        /// <returns></returns>
        public JsonResult ZDApi()
        {
            var sReturnModel = new ReturnDetailModel();

            var cBll = new BLL_Terminal();
            var list = cBll.GetObjectAll();

            list = list.OrderByDescending(o => o.zdsl).Take(5).ToList();

            sReturnModel.ErrorType = 1;
            if (list != null)
            {
                sReturnModel.Entity = from a in list
                                      select new
                {
                    name  = a.Dept_Name,
                    value = a.zdsl
                };
            }
            return(Json(sReturnModel));
        }
Example #3
0
        /// <summary>
        /// 接入外网数量排行
        /// </summary>
        /// <returns></returns>
        public JsonResult JrwwsjphApi()
        {
            var sReturnModel = new ReturnDetailModel();

            var cBll = new BLL_Terminal();
            var list = cBll.GetObjectAll();

            list = list.OrderByDescending(o => o.jrzwwwsl).Take(10).ToList();

            sReturnModel.ErrorType = 1;
            if (list != null)
            {
                sReturnModel.Entity = from a in list
                                      select new
                {
                    jrwwsjphAxisData   = a.Dept_Name,
                    jrwwsjphseriesData = a.jrzwwwsl
                };
            }
            return(Json(sReturnModel));
        }