// GET: Index public ActionResult Index() { //查询房屋信息,并放到viewbag中 List <HouseInfo> list = HouseInfoService.GetAllHouseList(); if (list != null) { ViewBag.Hous = list.Count; } List <UserInfo> userInfos = UserInfoService.GetUserInfo(); if (userInfos != null) { ViewBag.UserInfo = userInfos.Count; } List <ComplaInfo> complaInfos = ComplaInfoService.GetAllComplaInfo(); if (complaInfos != null) { ViewBag.ComplaList = complaInfos.Count; } List <RepairInfo> repairInfoList = RepairInfoService.GetAllRepairInfo(); if (repairInfoList != null) { ViewBag.RepairList = repairInfoList.Count; } return(View()); }
/// <summary> /// 物业费修改 视图 /// </summary> /// <returns></returns> public ActionResult PropertyUpdate(string PropertyID) { //根据传过来的id获取选中账号的信息,并把查到的数据赋值给viewbag,以便页面绑定数据 PropertyInfoOutput model = PropertyInfoService.GetModelByID(PropertyID); if (model != null) { ViewBag.model = model; } //查询房屋信息,并放到viewbag中 List <HouseInfo> list = HouseInfoService.GetAllHouseList(); ViewBag.Hous = list; ViewBag.userName = Session["userName"].ToString(); return(View()); }