Ejemplo n.º 1
0
        public ActionResult RewardUser(IndexViewModel index)
        {
            User  user  = Repository.GetUserByID(index.User.UserID);
            Award award = Repository.GetAwardByID(index.AwardEdit.Id);

            if (user != null && award != null)
            {
                UserAward userAward = new UserAward
                {
                    Users  = user,
                    Awards = award
                };
                Repository.AddUserAward(userAward);
                Repository.Save();
            }
            return(RedirectToAction("Award", new { user.UserID }));
        }
Ejemplo n.º 2
0
 public ViewResult Details(int id)
 {
     return(View(Repository.GetAwardByID(id)));
 }