示例#1
0
        public IActionResult Detail(int id)
        {
            UserProfile userProfile = _userProfileDatabase.GetById(id);

            ViewBag.lisBill = _billDatabase.Find(s => s.UserId == id).ToList();
            return(View(_userProfileDatabase.GetById(id)));
        }
        public IActionResult MyAccount()
        {
            UserProfile userPro = _database.UserProfiles.Where(s => s.UserName == User.Identity.Name).FirstOrDefault();

            ViewBag.lisBill = _billDatabase.Find(s => s.UserId == userPro.UserID).ToList();
            return(View(userPro));
        }
示例#3
0
        public IActionResult GetBillById(string id)
        {
            passport = CommonMethod.GetPassport(Request);
            var item = service.Find(passport, id);

            if (item == null)
            {
                return(NotFound());
            }
            ResultModel result = new ResultModel(true, item);

            return(new ObjectResult(result));
        }