Пример #1
0
        /// <summary>
        /// Регистрация пользователя;
        /// Добавление пользователя в БД;
        /// </summary>
        private void RegisterClick(object obj)
        {
            if (!String.IsNullOrEmpty(Nickname) && !String.IsNullOrEmpty(FirstName) &&
                !String.IsNullOrEmpty(SecondName))
            {
                RowMapper <User>    rowMapper = RowMapper;
                ActiveRecord <User> dao       = new ActiveRecord <User>("User", rowMapper);
                User user = new User();
                user.Nickname   = Nickname;
                user.SecondName = SecondName;
                user.FirstName  = FirstName;
                dao.Insert(user);

                _window.Close();
            }
        }