Exemple #1
0
 public ActionResult Edit(int id)
 {
     var userId = WebSecurity.CurrentUserId;
     var userSkill = _skillRepository.GetUserSkill(id, userId);
     if (userSkill != null)
     {
         var editMark = new EditMark
                     {
                         Mark = userSkill.Mark,
                         SkillName = userSkill.Skill.SkillName,
                         SkillId = id
                     };
         return View(editMark);
     }
     return RedirectToAction("Index");
 }
Exemple #2
0
 public ActionResult Edit(EditMark editMark)
 {
     var userId = WebSecurity.CurrentUserId;
     _skillRepository.UpdateUserSkill(editMark.SkillId, userId, editMark.Mark);
     sendUpdateMsg();
     return RedirectToAction("Index");
 }