コード例 #1
0
        public bool AddUser(AUser userReg)
        {
            using (DataClassesTourGuideDataContext dc = new DataClassesTourGuideDataContext())
            {
                User user = new User();
                user.RegTime = (DateTime)userReg.RegTime;
                user.RegIP = userReg.UserIP;
                user.UserFirstName = userReg.UserFirstName;
                user.UserLastName = userReg.UserLastName;
                user.UserPhone = userReg.UserPhone;
                user.UserEmail = userReg.UserEmail;
                user.UserPassword = userReg.UserPassword;
                user.UserBirthday = userReg.UserBirthday;
                user.Username = userReg.Username;
                user.salt = userReg.Salt;
                user.UserID = System.Guid.NewGuid();

                dc.Users.InsertOnSubmit(user);
                dc.SubmitChanges();
                return true;
            }
        }
コード例 #2
0
 partial void DeleteUser(User instance);
コード例 #3
0
 partial void UpdateUser(User instance);
コード例 #4
0
 partial void InsertUser(User instance);