public ActionResult Register(RegisterMemberModel model) { if (!ModelState.IsValid) { return View(model); } var personalInformation = new PersonalInformation( new EmiratesId(model.EmiratesId), new FullName(model.FirstName, model.LastName), model.Gender, new Email(model.Email), new Mobile(model.Mobile), new Address(model.City, model.Country, model.Line1, model.Line2), model.DateOfBirth); Member member = this.membershipService .RegisterDownLine( model.Username, model.Position, new AccountNo(model.UplineAccountNo), personalInformation); return RedirectToRoute("admin.members.member", new { username = member.Username }); }
public ActionResult Register(int uplineAccountNo, Position position) { Member upline = this.membershipService.FindMemberByAccountNo(uplineAccountNo); if (upline == null) { return HttpNotFound("Upline does not exists"); } var model = new RegisterMemberModel() { UplineAccountNo = uplineAccountNo, Position = position }; return View(model); }