예제 #1
0
        /// <summary>
        /// 业主信息添加页面
        /// </summary>
        /// <returns></returns>
        public ActionResult UserAdd()
        {
            List <HouseInfo> houseInfos = HouseInfoService.GetTrueList();

            ViewBag.houseInfo = houseInfos;
            return(View());
        }
예제 #2
0
        /// <summary>
        /// 业主信息修改页面
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ActionResult UserUpdate(int id)
        {
            //根据传过来的id获取选中账号的信息,并把查到的数据赋值给viewbag,以便页面绑定数据
            UserInfo         model      = UserInfoService.GetUserByID(id);
            List <HouseInfo> houseInfos = HouseInfoService.GetTrueList();

            ViewBag.houseInfo = houseInfos;
            if (model != null)
            {
                ViewBag.model = model;
            }
            return(View());
        }