示例#1
0
        public bool addForumUser(string userName, string password, string email, DateTime registration, string forumName, DateTime lastPassChange)
        {
            dbl.append("trying to add new forum user");
            bool success = false;
            User user    = new User();

            user.userName       = userName;
            user.password       = password;
            user.email          = email;
            user.registration   = registration;
            user.forumName      = forumName;
            user.lastPassChange = lastPassChange;
            try
            {
                db.Users.Add(user);
                db.SaveChanges();
                success = true;
            }
            catch { success = false; }
            dbl.append("result is " + success);
            return(success);
        }