Exemplo n.º 1
0
        public string ValidateUniquePassword(string password)
        {
            DataSet dataSet = UserDao.ValidateUniquePassword(password);

            DataTable countTable = dataSet.Tables["User"];

            var reader = new NullableDataRowReader(countTable.Rows[0]);

            return(reader.GetString("passwordcount"));
        }
Exemplo n.º 2
0
        public string ValidateUniqueLogon(User user)
        {
            DataSet dataSet = UserDao.ValidateUniqueLogon(user);

            DataTable countTable = dataSet.Tables["User"];

            var reader = new NullableDataRowReader(countTable.Rows[0]);

            return(reader.GetString("logoncount"));
        }
Exemplo n.º 3
0
        public static User Transform(DataSet dataSet)
        {
            var user = new User();

            DataTable userTable = dataSet.Tables["User"];

            var reader = new NullableDataRowReader(userTable.Rows[0]);

            user.Id          = reader.GetString("Id");
            user.UserName    = reader.GetString("UserName");
            user.Logon       = reader.GetString("Logon");
            user.Password    = reader.GetString("Password");
            user.Level       = reader.GetInt32("Level");
            user.IsReference = reader.GetString("Reference");
            user.IsLocked    = reader.GetBoolean("IsLocked");

            return(user);
        }