Esempio n. 1
0
 public static void replaceMember(Member target, Member source)
 {
     target.MemberId     = source.MemberId;
     target.MemberName   = source.MemberName;
     target.NickName     = source.NickName  ;
     target.Phone        = source.Phone     ;
     target.Salary       = source.Salary    ;
 }
Esempio n. 2
0
 public ActionResult CheckNickname(Member member)
 {
     if (member.NickName.Contains("a"))
     {
         return Json(string.Format("{0} is reserved, enter another nickname", member.NickName), JsonRequestBehavior.AllowGet);
     }
     else
     {
         return Json(true, JsonRequestBehavior.AllowGet);
     }
 }
Esempio n. 3
0
 public ActionResult Edit(Member member)
 {
     Member m1 = MemberRepository.Members.FirstOrDefault(m => m.MemberId == member.MemberId);
     MemberRepository.replaceMember(m1, member);
     return RedirectToAction("Index");
 }