Beispiel #1
0
        public MailUsers SignIn(string Uname, string Password)
        {
            MailUsers user = null;

            user = (MailUsers)mailUsers.Where(c => c.MailUserName == Uname).FirstOrDefault(m => m.MailUserPwd == Password);
            return(user);
        }
Beispiel #2
0
 public bool SignUp(string mailUserName, string mailUserPwd, List <string> hobbies)
 {
     try
     {
         MailUsers newUser = new MailUsers();
         newUser.MailUserName        = mailUserName;
         newUser.MailUserPwd         = mailUserPwd;
         newUser.Hobbies             = hobbies;
         newUser.AccountCreationDate = System.DateTime.Now;
         mailUsers.Add(newUser);
         return(true);
     }
     catch
     {
         return(false);
     }
 }