Example #1
0
        public ActionResult CreateOrUpdateSkill(DogSkill dogSkill)
        {
            IRepository <DogSkill> repo = RepoResolver.GetRepository <DogSkill>();

            repo.Update(dogSkill);
            return(RedirectToAction("GetSkill", "Skills"));
        }
Example #2
0
        public ActionResult CreateOrUpdateDogSkill(DogSkill dogSkill)
        {
            var user = _userRepo.Where(u => u.Email == this.HttpContext.User.Identity.Name).FirstOrDefault();

            if (user.IsUserAdminOrTrainer())
            {
                if (dogSkill.DogSkilID == 0)
                {
                    _dogSkillRepo.Insert(dogSkill);
                }
                else
                {
                    _dogSkillRepo.Update(dogSkill);
                }
                return(RedirectToAction("ReadDog", new { id = dogSkill.DogProfileID }));
            }

            return(RedirectToAction("Error403", "Error"));
        }
 public ActionResult CreateOrUpdateSkill(DogSkill dogSkill)
 {
     throw new NotImplementedException();
 }
Example #4
0
 public ActionResult CreateOrUpdateSkill(DogSkill dogSkill)
 {
     _dogSkillRepo.Update(dogSkill);
     return(RedirectToAction("GetSkill", "Skills"));
 }