public ActionResult Index0() { if (Session["User"] == null) { Response.Redirect("/Login/chaoshi"); return(View()); } else { getIndexmodel model = new getIndexmodel(); model.mt = menuconfig.BuildMenuList(); model.username = (Session["User"] as EquipModel.Entities.Person_Info).Person_Name; model.userid = (Session["User"] as EquipModel.Entities.Person_Info).Person_Id; PersonManagment PM = new PersonManagment(); EquipBLL.AdminManagment.PersonManagment.P_viewModal pm_info = PM.Get_PersonModal(model.userid); model.belong_depart = pm_info.Department_Name; model.isManager = PM.is_Role_admin(model.username); //int a = mt.Count(); return(View(model)); } }