Esempio n. 1
0
        private void DeletePasswordFile(int id)
        {
            var query = $"Delete From {_tableName} Where UserId = @userId";
            var cmd   = new SqlCommand(query, _connector.GetConnectionObject());

            cmd.Parameters.AddWithValue("@userId", id);
            _connector.ExecuteSqlStatement(cmd);
        }
Esempio n. 2
0
        public void EditEntry(int id, Passwords newValues)
        {
            var query = UpdateQueryStatement();
            var cmd   = new SqlCommand(query, _connector.GetConnectionObject());

            cmd = InsertPasswordValuesIntoCommandObject(newValues, cmd);
            cmd.Parameters.AddWithValue("@id", id);
            _connector.ExecuteSqlStatement(cmd);
        }