コード例 #1
0
ファイル: MemberController.cs プロジェクト: Daskul/BIG
        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 });
        }
コード例 #2
0
ファイル: MemberController.cs プロジェクト: Daskul/BIG
        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);
        }