Ejemplo n.º 1
0
 /****
 Adding a row to the Memeber table in the Registration DB
 ****/
 public virtual void Init(Member Table)
 {
     db.memberTableV2.Add(new memberTableV2
         {
             UserName = Table.UserName,
             Email = Table.Email,
             ConfirmEmail = Table.ConfirmEmail,
             OptionalPhoneNumber = Table.OptionalPhoneNumber,
             Password = vf.Encrypt(Table.Password),
             Address = Table.Address,
             BirthDate = Table.Birthdate,
             Gender = Table.Gender,
             FirstName = Table.FirstName,
             MiddleName = Table.MiddleName,
             LastName = Table.LastName,
             PhoneNumber = Table.PhoneNumber
         });
         db.SaveChanges();
 }
        public ActionResult CreateMember(Member possibleMem)
        {
            possibleMem.ConfirmEmail = false;
            string Member = possibleMem.isValid(possibleMem);

            if (Member != "Valid")
            {
                ViewData["isValid"] = Member;
                return View("SignUpMember");
            }
            else
            {
                Member ConfirmedMem = possibleMem;
                ViewData["Email"] = ConfirmedUser.sendEmail(ConfirmedMem.Email, ConfirmedMem.UserName);
                ConfirmedMem.Init(possibleMem);
                return View("EmailConfirmationPage");
            }
        }
Ejemplo n.º 3
0
 public string isValid(Member Self)
 {
     if (FindMember(Self.UserName, Self.Email))
        return "Exist";
     else if (IsNullMember(Self))
        return "NullFields";
     else
        return vf.PasswordCheck(Self.Password);
 }
Ejemplo n.º 4
0
 public Boolean IsNullMember(Member Table)
 {
     if (vf.IsNull(Table.UserName) ||
              vf.IsNull(Table.Email) ||
              vf.IsNull(Table.Password) ||
              vf.IsNull(Table.Address) ||
              vf.IsNull(Table.Birthdate) ||
              vf.IsNull(Table.Gender) ||
              vf.IsNull(Table.FirstName) ||
              vf.IsNull(Table.LastName) ||
              vf.IsNull(Table.PhoneNumber))
     {
         return true;
     }
     else return false;
 }