예제 #1
0
        public ActionResult Edit(int rewardId)
        {
            var rewards       = rewardsBL;
            var currentReward = rewardsBL.GetList().FirstOrDefault(u => u.ID == rewardId);

            return(View(RewardViewModel.GetViewModel(currentReward, rewards.GetList())));
        }
예제 #2
0
파일: UserController.cs 프로젝트: yon28/VAV
        public ActionResult Add()
        {
            var rewards = new List <RewardViewModel>();

            foreach (var reward in rewardsBL.GetList())
            {
                rewards.Add(RewardViewModel.GetViewModel(reward, null));
            }
            return(View("Edit", new UserViewModel()
            {
                AvailableRewards = rewards
            }));
        }