Beispiel #1
0
        private void CreateUser(string name, string fullName)
        {
            Data.User user = new User() {
                AccountName = name,
                CommonName = name,
                Company = TbxCompany.Text,
                Country = TbxCountry.Text,
                CreatedAt = DateTime.UtcNow,
                Department = TbxDepartment.Text,
                DisplayName = fullName,
                GivenName = name,
                Location = TbxLocation.Text,
                Mail = TbxMail.Text,
                Title = TbxTitle.Text,
                Url = TbxUrl.Text
            };

            using (Data.DataClassesDataContext db = new Data.DataClassesDataContext()) {
                db.Users.InsertOnSubmit(user);
                db.SubmitChanges();
            }
        }
 partial void UpdateUser(User instance);
 partial void DeleteUser(User instance);
 partial void InsertUser(User instance);