Esempio n. 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());
        }
Esempio n. 2
0
        /// <summary>
        /// 资源编码——资源编码数量
        /// </summary>
        /// <returns></returns>
        public JsonResult ZYApi()
        {
            var sReturnModel = new ReturnDetailModel();

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

            list = list.OrderByDescending(o => o.ID).Distinct().ToList();

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